/google-search-flights

Allows scraping search results from Google Flights.

↗ Open in API Explorer
GET

Google Search Flights

Allows scraping search results from Google Flights.

Request

Endpoint: GET https://api.outscraper.cloud/google-search-flights

Parameters

NameInTypeRequiredDescriptionExampleConstraints
query query array<string> Yes Each query is a list with the first item: origin - airport code, for example 'EWR', 'JFK', 'CMB' etc. Second item: destination - airport code, for example 'EWR', 'JFK', 'CMB' etc. - -
language query string enum No The parameter specifies the language to use for website. - default en, allowed en, de, es, es-419, fr, hr, it, nl, …
region query string enum No The parameter specifies the country to use for website. It's recommended to use it for a better search experience. - allowed AF, AL, DZ, AS, AD, AO, AI, AG, …
departure_date query string No Departure date as a UNIX timestamp (e.g., '1756069200'). Defaults to current date. - -
return_date query string No Return date as a UNIX timestamp (e.g., '1757451600'). If missing, scraper uses only departure_date. - -
fields query string No The parameter defines which fields you want to include with each item returned in the response. By default, it returns all fields. Use &fields=query,name to return only the specific ones. - -
async query boolean Yes The parameter defines the way you want to submit your task to Outscraper. It can be set to false to open an HTTP connection and keep it open until you got your results, or true (default) to just submit your requests to Outscraper and retrieve them later (usually within 1-3 minutes) with the Request Results endpoint. Each response is available for 4 hours after a request has been completed. A good practice is to send async requests and start checking the results after the estimated execution time. Check out this Python implementation as an example. As most of the requests take some time to be executed the async=true option is preferred to avoid HTTP requests timeouts. - default true
ui query boolean No The parameter defines whether a task will be executed as a UI task. This is commonly used when you want to create a regular platform task with API. Using this parameter overwrites the async parameter to true. - default false
format query array<string enum> No The parameter defines the format of the output data. Using this parameter overwrites the ui parameter to true. - -
webhook query string No The parameter defines the URL address (callback) to which Outscraper will create a POST request with a JSON body once a task/request is finished. Using this parameter overwrites the webhook from integrations. - -

Responses

200

application/json

The response contains the status of the request and data.

{
  "id": "your-request-id",
  "status": "Success",
  "data": [
    [
      {
        "query": "restaurants, Manhattan, NY, USA",
        "name": "Upland",
        "place_id": "ChIJWVD7FadZwokRs_pS6XY7VOU",
        "google_id": "0x89c259a715fb5059:0xe5543b76e952fab3",
        "full_address": "345 Park Ave S, New York, NY 10010",
        "borough": "Manhattan",
        "street": "345 Park Ave S",
        "postal_code": "10010",
        "area_service": false,
        "country_code": "US",
        "country": "United States of America",
        "city": "New York",
        "us_state": "New York",
        "state": "New York",
        "plus_code": null,
        "latitude": 40.7419313,
        "longitude": -73.984644,
        "time_zone": "America/New_York",
        "popular_times": null,
        "site": "https://uplandnyc.com/?utm_source=Google+My+Business&utm_medium=Website+Button",
        "phone": "+1 212-686-1006",
        "type": "Californian restaurant",
        "logo": "https://lh4.googleusercontent.com/-zvSnhN_Mek4/AAAAAAAAAAI/AAAAAAAAAAA/XHbA606mawk/s44-p-k-no-ns-nd/photo.jpg",
        "description": "Spacious, casually chic brasserie with hearty dishes featuring Californian & Italian influences.",
        "located_in": null,
        "located_google_id": null,
        "category": "Californian restaurant",
        "subtypes": "Californian restaurant, American restaurant, Bar, Italian restaurant, Takeout Restaurant, Restaurant",
        "posts": null,
        "reviews_tags": null,
        "rating": 4.5,
        "reviews": 1766,
        "photos_count": 4255,
        "cid": "16524898314635901619",
        "reviews_link": "https://search.google.com/local/reviews?placeid=ChIJWVD7FadZwokRs_pS6XY7VOU&q=restaurants,+Manhattan,+NY,+USA&authuser=0&hl=en&gl=US",
        "reviews_id": "-1921845759073649997",
        "photo": "https://lh5.googleusercontent.com/p/AF1QipPFzGn4Ie2huHtDmrAmxl0GkSIp5rrXipoxPF55=w800-h500-k-no",
        "street_view": "https://lh5.googleusercontent.com/p/AF1QipPFzGn4Ie2huHtDmrAmxl0GkSIp5rrXipoxPF55=w1600-h1000-k-no",
        "working_hours_old_format": "Monday: 11:30 AM-3 PM,5-10 PM | Tuesday: 11:30 AM-3 PM,5-10 PM | Wednesday: 11:30 AM-3 PM,5-10 PM | Thursday: 11:30 AM-3 PM,5-10 PM | Friday: 11:30 AM-3 PM,5-11 PM | Saturday: 10 AM-3 PM,5-11 PM | Sunday: 10 AM-3 PM,5-9 PM",
        "working_hours": {
          "Monday": "11:30 AM-3 PM,5-10 PM",
          "Tuesday": "11:30 AM-3 PM,5-10 PM",
          "Wednesday": "11:30 AM-3 PM,5-10 PM",
          "Thursday": "11:30 AM-3 PM,5-10 PM",
          "Friday": "11:30 AM-3 PM,5-11 PM",
          "Saturday": "10 AM-3 PM,5-11 PM",
          "Sunday": "10 AM-3 PM,5-9 PM"
        },
        "other_hours": [
          {
            "lunch": {
              "Monday": "11:30 AM-3 PM",
              "Tuesday": "11:30 AM-3 PM",
              "Wednesday": "11:30 AM-3 PM",
              "Thursday": "11:30 AM-3 PM",
              "Friday": "11:30 AM-3 PM",
              "Saturday": "Closed",
              "Sunday": "Closed"
            }
          },
          {
            "dinner": {
              "Monday": "5-10 PM",
              "Tuesday": "5-10 PM",
              "Wednesday": "5-10 PM",
              "Thursday": "5-10 PM",
              "Friday": "5-10 PM",
              "Saturday": "5-10 PM",
              "Sunday": "5-9 PM"
            }
          },
          {
            "delivery": {
              "Monday": "11:30 AM-3:30 PM,5-10 PM",
              "Tuesday": "11:30 AM-3:30 PM,5-10 PM",
              "Wednesday": "11:30 AM-3:30 PM,5-10 PM",
              "Thursday": "11:30 AM-3:30 PM,5-10 PM",
              "Friday": "Closed",
              "Saturday": "Closed",
              "Sunday": "11 AM-3 PM,5-10 PM"
            }
          },
          {
            "takeout": {
              "Monday": "11:30 AM-3:30 PM,5-10 PM",
              "Tuesday": "11:30 AM-3:30 PM,5-10 PM",
              "Wednesday": "11:30 AM-3:30 PM,5-10 PM",
              "Thursday": "11:30 AM-3:30 PM,5-10 PM",
              "Friday": "Closed",
              "Saturday": "Closed",
              "Sunday": "11 AM-3 PM,5-10 PM"
            }
          },
          {
            "brunch": {
              "Monday": "Closed",
              "Tuesday": "Closed",
              "Wednesday": "Closed",
              "Thursday": "Closed",
              "Friday": "Closed",
              "Saturday": "10 AM-3 PM",
              "Sunday": "10 AM-3 PM"
            }
          }
        ],
        "business_status": "OPERATIONAL",
        "about": {
          "Service options": {
            "Delivery": true,
            "Takeout": true,
            "Dine-in": true
          },
          "Highlights": {
            "Great coffee": true,
            "Great dessert": true,
            "Great tea selection": true
          },
          "Popular for": {
            "Lunch": true,
            "Dinner": true,
            "Solo dining": true
          },
          "Accessibility": {
            "Wheelchair accessible entrance": true,
            "Wheelchair accessible restroom": true,
            "Wheelchair accessible seating": true,
            "Wheelchair accessible parking lot": false
          },
          "Offerings": {
            "Alcohol": true,
            "Beer": true,
            "Cocktails": true,
            "Coffee": true,
            "Comfort food": true,
            "Hard liquor": true,
            "Healthy options": true,
            "Late-night food": true,
            "Small plates": true,
            "Vegetarian options": true,
            "Wine": true
          },
          "Dining options": {
            "Brunch": true,
            "Lunch": true,
            "Dinner": true,
            "Dessert": true,
            "Seating": true
          },
          "Amenities": {
            "Bar onsite": true,
            "High chairs": true,
            "Restroom": true,
            "Wi-Fi": true
          },
          "Atmosphere": {
            "Romantic": true,
            "Upscale": true
          },
          "Crowd": {
            "Family-friendly": true,
            "Groups": true,
            "LGBTQ+ friendly": true,
            "Tourists": true,
            "Transgender safespace": true
          },
          "Planning": {
            "Lunch reservations recommended": true,
            "Dinner reservations recommended": true,
            "Accepts reservations": true,
            "Usually a wait": true
          },
          "Payments": {
            "Debit cards": true,
            "Credit cards": true
          },
          "Other": {
            "LGBTQ+ friendly": true
          }
        },
        "range": "$$$",
        "reviews_per_score": {
          "1": 50,
          "2": 35,
          "3": 113,
          "4": 394,
          "5": 1174
        },
        "reservation_links": [
          "https://resy.com/cities/ny/upland",
          "https://uplandnyc.com/?utm_source=Google%20My%20Business&utm_medium=Reservation%20Button"
        ],
        "booking_appointment_link": "https://resy.com/cities/ny/upland",
        "menu_link": null,
        "order_links": null,
        "owner_id": "111762591187585073824",
        "verified": true,
        "owner_title": "Upland",
        "owner_link": "https://www.google.com/maps/contrib/111762591187585073824",
        "location_link": "https://www.google.com/maps/place/Upland/@40.7419313,-73.984644,14z/data=!4m8!1m2!2m1!1sUpland!3m4!1s0x89c259a715fb5059:0xe5543b76e952fab3!8m2!3d40.7419313!4d-73.984644"
      },
      {
        "query": "restaurants, Manhattan, NY, USA",
        "name": "Scarpetta",
        "place_id": "ChIJt8W7n79ZwokRsyXs3QDbE3o",
        "google_id": "0x89c259bf9fbbc5b7:0x7a13db00ddec25b3",
        "full_address": "88 Madison Ave, New York, NY 10016",
        "borough": "Manhattan",
        "street": "88 Madison Ave",
        "postal_code": "10016",
        "area_service": false,
        "country_code": "US",
        "country": "United States of America",
        "city"…

202

application/json

The response contains a request ID that can be used to fetch results by using Request Results endpoint. Each response is available for 4 hours after a request has been completed.

{
  "id": "your-request-id",
  "status": "Pending",
  "results_location": "https://api.outscraper.cloud/requests/your-request-id"
}

204

application/json

The request was finished with failure and has no results.

{
  "id": "your-request-id",
  "status": "Failure"
}

401

application/json

Wrong or missing API Key (token).

{
  "error": true,
  "errorMessage": "401 Unauthorized: The server could not verify that you are authorized to access the URL requested. You either supplied the wrong credentials (e.g. a bad password), or your browser doesn't understand how to supply the credentials required."
}

402

application/json

Past due invoices or a payment method not connected.

{
  "error": true,
  "errorMessage": "Please close past due invoices or verify your card information is correct."
}

422

application/json

Wrong query url parameters.

{
  "error": true,
  "errorMessage": "422 Unprocessable Entity: The request was well-formed but was unable to be followed due to semantic errors."
}

Code Samples

cURL

curl -X GET "https://api.outscraper.cloud/google-search-flights?query=[['EWR','JFK']]&departure_date=1756069200&return_date=1757451600&async=false" -H  "X-API-KEY: YOUR-API-KEY"

cURL (async)

curl -X GET "https://api.outscraper.cloud/google-search-flights?query=[['CMB','DXB']]" -H  "X-API-KEY: YOUR-API-KEY"

Related Endpoints

Returns Google Maps photos from places when using search queries (e.g., restaurants, Manhattan, NY, USA) or from a single place when using IDs or names (e.g., NoMad Restaurant, NY…

Returns Google Maps reviews from places when using search queries (e.g., restaurants, Manhattan, NY, USA) or from a single place when using Google IDs or names (e.g., NoMad Restau…

Returns places from Google Maps based on a given search query (or many queries). The results from searches are the same as you would see by visiting a regular Google Maps site. Ho…