Docs / API reference

POST/v1/data/google/flights

Google Flights

Search one-way or round-trip Google Flights routes.

Execution model

Live request

Runtime depends on endpoint, target, pagination, rendering mode, and active plan limits.

Credit weight

Live catalog

Current weights are managed from the Data API Weights admin table and shown on pricing before use.

Google Flights Endpoint

Search one-way or round-trip Google Flights routes.

Getting Started

Send your API key as a bearer token. Start with the smallest request below.

Run Google Flights

Send the smallest useful request and read the structured response.

curl -X POST "https://api.datablue.dev/v1/data/google/flights" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "origin": "MAA",
  "destination": "BLR",
  "departure_date": "2026-08-12",
  "adults": 1,
  "seat": "economy",
  "currency": "INR",
  "country": "IN"
}'
Example response
{
  "success": true,
  "origin": "MAA",
  "destination": "BLR",
  "departure_date": "2026-08-12",
  "trip_type": "one_way",
  "adults": 1,
  "seat": "economy",
  "total_results": 8,
  "price_trend": "typical",
  "time_taken": 3.42,
  "flights": [
    {
      "position": 1,
      "is_best": true,
      "airline": "IndiGo",
      "flight_number": "6E 123",
      "origin": "MAA",
      "destination": "BLR",
      "departure_time": "6:30 AM",
      "arrival_time": "7:35 AM",
      "duration": "1 hr 5 min",
      "duration_minutes": 65,
      "stops": 0,
      "price": "₹4,213",
      "price_value": 4213
    }
  ]
}

Options

Query and Target

Set the search term, identifier, or source URL that defines the request.

curl -X POST "https://api.datablue.dev/v1/data/google/flights" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "origin": "JFK",
  "destination": "LHR",
  "departure_date": "2026-08-12",
  "adults": 1,
  "seat": "economy",
  "currency": "INR",
  "country": "IN"
}'
Example response
{
  "success": true,
  "origin": "MAA",
  "destination": "BLR",
  "departure_date": "2026-08-12",
  "trip_type": "one_way",
  "adults": 1,
  "seat": "economy",
  "total_results": 8,
  "price_trend": "typical",
  "time_taken": 3.42,
  "flights": [
    {
      "position": 1,
      "is_best": true,
      "airline": "IndiGo",
      "flight_number": "6E 123",
      "origin": "MAA",
      "destination": "BLR",
      "departure_time": "6:30 AM",
      "arrival_time": "7:35 AM",
      "duration": "1 hr 5 min",
      "duration_minutes": 65
    }
  ]
}

Location and Language

Localize results with country, language, coordinates, or delivery-location fields.

curl -X POST "https://api.datablue.dev/v1/data/google/flights" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "origin": "MAA",
  "destination": "BLR",
  "departure_date": "2026-08-12",
  "adults": 1,
  "seat": "economy",
  "currency": "USD",
  "country": "us",
  "language": "en"
}'
Example response
{
  "success": true,
  "origin": "MAA",
  "destination": "BLR",
  "departure_date": "2026-08-12",
  "trip_type": "one_way",
  "adults": 1,
  "seat": "economy",
  "total_results": 8,
  "price_trend": "typical",
  "time_taken": 3.42,
  "flights": [
    {
      "position": 1,
      "is_best": true,
      "airline": "IndiGo",
      "flight_number": "6E 123",
      "origin": "MAA",
      "destination": "BLR",
      "departure_time": "6:30 AM",
      "arrival_time": "7:35 AM",
      "duration": "1 hr 5 min",
      "duration_minutes": 65
    }
  ]
}

Filters and Sorting

Narrow or order the returned records.

curl -X POST "https://api.datablue.dev/v1/data/google/flights" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "origin": "MAA",
  "destination": "BLR",
  "departure_date": "2026-08-12",
  "adults": 1,
  "seat": "economy",
  "currency": "INR",
  "country": "IN",
  "max_stops": 10
}'
Example response
{
  "success": true,
  "origin": "MAA",
  "destination": "BLR",
  "departure_date": "2026-08-12",
  "trip_type": "one_way",
  "adults": 1,
  "seat": "economy",
  "total_results": 8,
  "price_trend": "typical",
  "time_taken": 3.42,
  "flights": [
    {
      "position": 1,
      "is_best": true,
      "airline": "IndiGo",
      "flight_number": "6E 123",
      "origin": "MAA",
      "destination": "BLR",
      "departure_time": "6:30 AM",
      "arrival_time": "7:35 AM",
      "duration": "1 hr 5 min",
      "duration_minutes": 65
    }
  ]
}

Additional Options

Set endpoint-specific options for this request.

curl -X POST "https://api.datablue.dev/v1/data/google/flights" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "origin": "MAA",
  "destination": "BLR",
  "departure_date": "example",
  "adults": 1,
  "seat": "economy",
  "currency": "INR",
  "country": "IN",
  "return_date": "example",
  "children": 0,
  "infants_in_seat": 0,
  "infants_on_lap": 0
}'
Example response
{
  "success": true,
  "origin": "MAA",
  "destination": "BLR",
  "departure_date": "2026-08-12",
  "trip_type": "one_way",
  "adults": 1,
  "seat": "economy",
  "total_results": 8,
  "price_trend": "typical",
  "time_taken": 3.42,
  "flights": [
    {
      "position": 1,
      "is_best": true,
      "airline": "IndiGo",
      "flight_number": "6E 123",
      "origin": "MAA",
      "destination": "BLR",
      "departure_time": "6:30 AM",
      "arrival_time": "7:35 AM",
      "duration": "1 hr 5 min",
      "duration_minutes": 65
    }
  ]
}

Response

Read success first, then consume the endpoint-specific records and pagination fields shown below.

Error Handling

Handle 401 for authentication, 422 for invalid input, 429 for limits, and retry only transient failures.

Parameters

NameTypeRequirementDescription
originstringRequiredOrigin IATA airport code, e.g. MAA or JFK.
destinationstringRequiredDestination IATA airport code, e.g. BLR or LAX.
departure_datestringRequiredDeparture date in YYYY-MM-DD format.
return_datestringOptionalReturn date in YYYY-MM-DD format. Omit for one-way.
adultsnumberOptionalAdult passenger count (1-9).
childrennumberOptionalChild passenger count (0-8).
infants_in_seatnumberOptionalInfants with own seat (0-4).
infants_on_lapnumberOptionalLap infants (0-4).
seatstringOptionalCabin class: economy, premium_economy, business, first.
max_stopsnumberOptionalMaximum stops, where 0 means nonstop.
languagestringOptionalGoogle UI language code.
currencystringOptionalCurrency code, e.g. USD, INR, EUR.
countrystringOptionalCountry code for geo-targeting.

Response fields

FieldTypeDescription
successbooleanWhether the request completed successfully.
origin / destinationstringRequested airport codes.
trip_typestringone_way or round_trip.
price_trendstringPrice trend indicator when available.
flightsarrayFlight rows with airline, flight_number, times, duration, stops, price, aircraft, delay, and emissions.
time_takennumberAPI response time in seconds.

Request and response

curl -X POST "https://api.datablue.dev/v1/data/google/flights" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "origin": "MAA",
  "destination": "BLR",
  "departure_date": "2026-08-12",
  "adults": 1,
  "seat": "economy",
  "currency": "INR",
  "country": "IN"
}'
Example response
{
  "success": true,
  "origin": "MAA",
  "destination": "BLR",
  "departure_date": "2026-08-12",
  "trip_type": "one_way",
  "adults": 1,
  "seat": "economy",
  "total_results": 8,
  "price_trend": "typical",
  "time_taken": 3.42,
  "flights": [
    {
      "position": 1,
      "is_best": true,
      "airline": "IndiGo",
      "flight_number": "6E 123",
      "origin": "MAA",
      "destination": "BLR",
      "departure_time": "6:30 AM",
      "arrival_time": "7:35 AM",
      "duration": "1 hr 5 min",
      "duration_minutes": 65,
      "stops": 0,
      "price": "₹4,213",
      "price_value": 4213
    }
  ]
}