This document provides information about the Google Flights API and the available parameters.
Google Flights API
The Google Flights API enables retrieval of Google Flights search results and returns structured JSON output. It supports flight search queries with filters such as departure and return dates, origin and destination, number of passengers, cabin class, number of stops, and more.
API Setup
Endpoint
https://serp-api.netnut.io/search
Authentication
Use HTTP Basic Authentication:
Authorization: Basic <base64(username:password)>
Where <base64(username:password)> is the Base64-encoded string of your NetNut credentials.
Request Format
The request is sent as a GET request. All parameters are passed directly in the URL query string.
Maximum number of stops. 0 = Nonstop only, 1 = 1 stop or fewer, 2 = 2 stops or fewer. Omit to return all results
currency
string
No
Currency code for prices (e.g., USD, EUR, GBP). Defaults to USD
hl
string
No
Language code for results (e.g., en, es, fr). Defaults to en
gl
string
No
Country code for localization (e.g., us, gb). Defaults to us
rawHtml
integer
No
1 = Return both parsed JSON and raw HTML. 2 = Return raw HTML only. Omit for JSON only
Code Examples
Response Format
The Google Flights API returns structured JSON. No HTML is returned by default. When rawHtml=1, the response includes both the parsed JSON and the raw HTML. When rawHtml=2, the response returns only the raw HTML.