# One-Way Flight Search

Search for one-way flights between airports. Returns flight options with prices, durations, airlines, and layover information.

- **Documentation:** [https://scrappa.co/docs/google-flights-api/google_flights_one_way](https://scrappa.co/docs/google-flights-api/google_flights_one_way)
- **API group:** Google Flights API
- **Endpoint:** `GET https://scrappa.co/api/flights/one-way`

## Authentication

Send your Scrappa API key in the `X-API-KEY` request header. Paid endpoints also support accountless x402 payments when called without an API key.

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `origin` | string | Yes | Origin airport IATA code (e.g., JFK, LAX, ORD) |
| `destination` | string | Yes | Destination airport IATA code (e.g., LHR, CDG, SFO) |
| `departure_date` | string | Yes | Departure date in Y-m-d format (e.g., 2026-09-15) |
| `adults` | integer | No | Number of adult passengers (1-9, default: 1) |
| `children` | integer | No | Number of child passengers (0-9, default: 0) |
| `infants_in_seat` | integer | No | Number of infants in seat (0-9, default: 0) |
| `infants_on_lap` | integer | No | Number of infants on lap (0-9, default: 0) |
| `cabin_class` | string | No | Cabin class: economy, premium_economy, business, or first |
| `exclude_basic` | boolean | No | Exclude basic economy fares when searching in economy class (default: false) |
| `max_stops` | string | No | Maximum stops: any, nonstop, one_or_fewer, or two_or_fewer |
| `sort_by` | string | No | Sort by: top_flights, cheapest, departure_time, arrival_time, or duration |
| `hl` | string | No | Language code (e.g., en, de, en-US) |
| `gl` | string | No | Country/region code (e.g., us, de, gb) |
| `currency` | string | No | Currency code for prices (e.g., USD, EUR, GBP) |
| `airlines` | array | No | Filter by airline IATA codes (e.g., ["AA", "UA", "DL"] or "AA,UA,DL") |
| `include_baggage` | boolean | No | Include baggage fee information for the cheapest flight (1 = yes, 0 = no, default: 0) |
| `departure_time_min` | integer | No | Minimum departure hour (0-23). Use with departure_time_max to filter by time range. |
| `departure_time_max` | integer | No | Maximum departure hour (0-23). Use with departure_time_min to filter by time range. |
| `arrival_time_min` | integer | No | Minimum arrival hour (0-23). Use with arrival_time_max to filter by time range. |
| `arrival_time_max` | integer | No | Maximum arrival hour (0-23). Use with arrival_time_min to filter by time range. |
| `max_duration_minutes` | integer | No | Maximum flight duration in minutes. Filters out flights longer than this. |
| `max_price` | integer | No | Maximum price in the search currency. Filters out flights more expensive than this. |
| `outbound_times` | string | No | Outbound time window as comma-separated hours, e.g. "6,18" for departures between 06:00 and 18:00. Two further values narrow the arrival window. |
| `bags` | integer | No | Carry-on bag count. Only 0 is currently supported. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/flights/one-way?origin=JFK&destination=LAX&departure_date=2026-09-15"
```

## Example response

```json
{
    "flights": [],
    "search_metadata": []
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | origin, destination, and departure_date are required; passenger counts, cabin_class, max_stops, sort_by, airline filters, locale, time, duration, and price filters must be valid when provided. |
| 402 | Insufficient Credits | Your API key is valid, but the account has no free, subscription, or package credits available. |
| 429 | Rate Limited | The request could not be completed because a temporary request limit was reached. |
| 503 | Google Flights Temporarily Unavailable | The Google Flights search could not be completed because its upstream provider was temporarily unavailable. |
| 500 | Google Flights Search Error | Scrappa could not complete the Google Flights search after validation passed. |

## More Scrappa resources

- [API documentation](https://scrappa.co/docs)
- [Full LLM-readable API reference](https://scrappa.co/llms-full.txt)
- [OpenAPI specification](https://scrappa.co/docs/api.json)
- [Pricing](https://scrappa.co/pricing)
