---
title: "Search Date Range for Best Prices"
method: GET
path: "/flights/v2/date-range"
tags: ["GoogleFlights"]
---

# Search Date Range for Best Prices

`GET /flights/v2/date-range`

## Request

- Base URL: `https://scrappa.co/api`
- URL: `https://scrappa.co/api/flights/v2/date-range`
- Auth: API key in header `X-API-KEY`

Version 2: fetch the cheapest starting option for from_date only.
Continue with next_departure_date in a separately billed request.

## Query parameters

- `origin` string, required
- `destination` string, required
- `adults` integer, nullable
- `children` integer, nullable
- `infants_in_seat` integer, nullable
- `infants_on_lap` integer, nullable
- `cabin_class` 'economy' | 'premium_economy' | 'business' | 'first' | 'null', nullable
- `exclude_basic` boolean, nullable
- `max_stops` 'any' | 'nonstop' | 'one_or_fewer' | 'two_or_fewer' | 'null', nullable
- `hl` string, nullable
- `gl` string, nullable
- `currency` string, nullable
- `outbound_times` string, nullable
- `bags` integer, nullable
- `api_version` integer
- `from_date` string, date, required
- `to_date` string, date, required
- `trip_duration` integer, nullable

## Response `200`

- object
  - `date_price_combinations` object[], required
    - `departure_date` string, required
    - `return_date` string, required
    - `price` number, required
    - `price_type` string, required
    - `departure_token` string, required
    - `itinerary_complete` boolean, required
    - `currency` string, required
    - `total_duration_minutes` integer, nullable, required
  - `search_metadata` object, required
    - `api_version` integer, required
    - `stage` string, required
    - `origin` string, required
    - `destination` string, required
    - `from_date` string, required
    - `to_date` string, required
    - `trip_duration_days` integer, required
    - `has_more` boolean, required
    - `next_departure_date` string, nullable, required
    - `passengers` object, required
      - `adults` integer, required
      - `children` integer, required
      - `infants_in_seat` integer, required
      - `infants_on_lap` integer, required
    - `cabin_class` string, required
    - `max_stops` string, required
    - `response_time_ms` integer, required

## Other responses

- `401`: Unauthorized - API key is missing or invalid
- `402`: Your API key is valid, but the account has no free, subscription, or package credits available.
- `422`: origin, destination, from_date, and to_date are required; the date range, trip_duration, passenger counts, cabin_class, max_stops, locale, and currency must be valid when provided.
- `429`: The request could not be completed because a temporary request limit was reached.
- `500`: Scrappa could not complete the Google Flights search after validation passed.
- `503`: The Google Flights search could not be completed because its upstream provider was temporarily unavailable.

---

[API](https://skmtc.dev/scrappa/apis/scrappa-api-documentation.md) · [All operations](https://skmtc.dev/scrappa/apis/scrappa-api-documentation/llms.txt) · [OpenAPI document](https://skmtc.dev/scrappa/apis/scrappa-api-documentation/revisions/1e1aa78ff103?raw)
