Skip to content

Scrape Google Flights Fare and Availability Data Through One API Request

Google Flights pages change with the session, load prices through JavaScript, and sit behind bot detection.

OUTPUT FORMATSHTMLJSONMarkdown

A managed scraping API removes the proxy rotation, headless browser and CAPTCHA handling from your code so you can focus on the route, date and fare fields you actually need. This guide explains the request flow, the controls that matter, and how to tell a rendering problem from an extraction problem.

What the API returns

You send a public Google Flights URL on google.com together with your API key. The service renders the page in a real headless browser, rotates residential proxies, and returns rendered HTML that is ready to parse. From that page you can pull origin, destination, departure and return dates, airline, fare class, layovers, baggage allowance and total price. The same call can be used across routes worldwide, which makes it suitable for fare monitoring, availability checks and travel-pattern analysis.

If you prefer structured output over raw HTML, you can attach extraction rules. CSS or XPath selectors target exact elements, while AI-driven rules let you describe the fields you want in natural language and receive JSON back. The API also supports Markdown output for LLM workflows, full-page screenshots for visual verification, and JavaScript scenarios that click, scroll or type before the page is captured.

The four-step request flow

  1. Create an account and get an API key. The signup includes 1,000 free credits to get started and no credit card is required.
  2. Install the Python SDK or use the Node, Go, PHP or Ruby client. Each scrape becomes a single function call, so you do not manage proxy rotation or a headless Chrome instance yourself.
  3. Send a GET request with your API key and a Google Flights URL. JavaScript rendering and residential proxy rotation happen server-side, and you receive rendered HTML back.
  4. Add advanced parameters only when the page needs them: render_js for JavaScript, stealth_proxy for aggressive CAPTCHA or bot checks, country_code for geo-targeting, and ai_extract_rules for natural-language extraction.

The dashboard request builder can generate a ready-to-copy snippet in Python, Node, Go, PHP, Ruby or cURL if you prefer not to write the request by hand.

Request controls and what they change

The controls below are the ones that most often affect a Google Flights scrape. They are request parameters, not separate products, and each one has a credit consequence described in the pricing section.

  • render_js: turns on JavaScript rendering so prices and availability that load after the initial HTML are present in the response.
  • stealth_proxy: routes the request through premium proxies when a target responds with CAPTCHAs or aggressive blocking.
  • country_code: sets the geographic origin of the request, which can change the currency, language and fare inventory shown.
  • extract_rules: applies CSS or XPath selectors to return only the fields you specify.
  • ai_extract_rules: lets you describe fields in natural language and receive structured JSON without writing selectors.
  • screenshot: captures the full page for visual verification or debugging.
  • js_scenario: runs click, scroll and type actions before the page is captured, useful when a fare requires interaction to appear.

A worked example: one route, one request

Suppose you want to monitor a single route for a set of travel dates. You copy a public Google Flights search URL for that route and dates, then send it as the url parameter in a GET request with your API key. Because the page loads prices dynamically, you enable render_js. The response is rendered HTML containing the fare cards for that search.

If you only need the airline, departure time, number of stops and total price, you add extract_rules with selectors for those elements, or ai_extract_rules with a short description of the fields. The API returns JSON instead of the full page. You can then store one row per itinerary and compare it against the next scheduled run. If the target starts returning a CAPTCHA page instead of fare cards, enable stealth_proxy and retry before changing your extraction rules.

Rendering failure vs. extraction failure

A blank or incomplete response usually means the page did not finish rendering. Check that render_js is enabled and that the URL is a public Google Flights page rather than a post-login view. A CAPTCHA or block page means the request was identified as automated traffic; enable stealth_proxy and retry. A response that contains the full page but missing fields means the extraction rules did not match the current markup. Inspect the rendered HTML, update the selectors, or switch to ai_extract_rules so the field description does the work. Separating these three cases prevents you from paying for repeated requests that cannot succeed.

Credit costs and plan limits

Requests start at 1 credit each. Each successful request that enables JS rendering costs 5 API credits. Each successful request that enables Premium proxies costs 10 or 25 API credits, depending on whether JS rendering is disabled or not. API credits are valid for one month and don't roll over. Concurrent requests are the number of requests that can be sent at the same time.

The plan table below is a dated reference. Prices, credit allowances and feature availability can change, so check the current pricing page before committing to a plan. All prices shown are exclusive of VAT.

When a managed API is the right choice

Use a managed API when your team needs fare or availability data on a schedule and does not want to own proxy pools, browser fleets or CAPTCHA handling. It is also a good fit when you need structured output quickly and would rather describe fields than maintain selectors against a changing page.

Build your own stack when you need full control over the browser fingerprint, when your volume is small enough that a single headless browser is sufficient, or when your legal review requires direct control over every request. In either case, review the target site's terms of service before deploying and avoid post-login content.

Plan reference
PlanPriceAPI creditsConcurrent requestsPriority supportAccount managerTeam management
Hobby$19 /mo75,00025Not includedNot includedNot included
Freelance$49 /mo250,00050Not includedNot includedNot included
Startup$99 /mo1,000,000100Not includedNot includedNot included
Business$249 /mo3,000,000200IncludedIncludedIncluded
Business +$599 /mo8,000,000400IncludedIncludedIncluded
Enterprise 14$999 /mo14,000,000500IncludedIncludedIncluded
Enterprise 24$1,599 /mo24,000,000600IncludedIncludedIncluded
Enterprise 41$2,399 /mo41,000,000700IncludedIncludedIncluded
Enterprise 69$3,599 /mo69,000,000800IncludedIncludedIncluded
Enterprise 120$5,799 /mo120,000,000900IncludedIncludedIncluded

All prices are exclusive of VAT. JavaScript rendering, rotating and premium proxies, geotargeting, and screenshots/extraction rules are included on every plan. API credits are valid for one month and do not roll over. Requests start at one credit each; JavaScript rendering costs 5 API credits per successful request; premium proxies cost 10 or 25 API credits depending on whether JS rendering is disabled or not. Geotargeting routes through 200+ countries and territories (40+ on classic proxies).

Frequently asked questions

Do I need an account to scrape Google Flights?

You do not need a Google account or any external account. You sign up for an API key, which includes 1,000 free credits and does not require a card. You then send the public Google Flights URL and the service handles rendering and proxies.

Is scraping Google Flights legal?

Public-facing pages can usually be scraped, but you should review the target site's terms of service before deploying and avoid post-login content. Legal requirements vary by jurisdiction and by how you use the data.

What data can I extract from Google Flights?

You can pull any content that appears on the public rendered page. Two extraction paths return structured JSON: extract_rules, which matches elements with CSS selectors, and ai_extract_rules, which interprets a natural-language description of the fields you want. Typical fields include origin, destination, dates, airline, fare class, layovers, baggage allowance and total price.

How do I start scraping Google Flights?

Sign up, copy your API key, and send a GET request with the target URL. The service renders the page, rotates proxies and returns the data. The signup includes 1,000 free credits to test.

Will I get blocked when scraping Google Flights?

The service rotates residential proxies and uses a real headless browser so requests look like normal traffic. If a target becomes aggressive, enable stealth_proxy on the request.

Can I scrape Google Flights without writing code?

Yes. The dashboard request builder lets you paste a URL, set parameters and copy the generated snippet in Python, Node, Go, PHP, Ruby or cURL.