# Google Flights Scraper API

> Google Flights Scraper API is a paid API for AI agents from api.scrapeforagents.tech, paid per call via x402, $0.025/call, status unknown (last checked 2026-10-02).

Searches Google Flights and returns structured flight itinerary data for a given origin, destination, and date range

## Facts

- Endpoint: POST https://api.scrapeforagents.tech/v1/google-flights?utm_source=zero.xyz
- Price: $0.025/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/google-flights-scraper-api-2db6bb12
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_z4r4dAnVkgkkTp8GCxKrU

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability google-flights-scraper-api-2db6bb12 -d '<json body>'
```

Example prompt: Search Google Flights for nonstop round-trip flights from LAX to JFK departing on 2025-08-15 and returning on 2025-08-22 for 1 adult in USD, and show me only results under $400.

## When to prefer this

Use this endpoint when you need structured, queryable flight data from Google Flights without managing a browser or scraping infrastructure yourself. It is ideal for AI agents that need to compare flights, filter by stops or price, or present itinerary options to users. Prefer this over raw web scraping when you want clean JSON output and pay only for successful, non-empty results.

## Known failure modes

- Missing required fields (departure_id, arrival_id, outbound_date) result in a validation error
- Invalid IATA airport codes return empty results or an error
- Past or invalid dates yield no results
- Overly restrictive filters (max_price too low, specific airlines with no service on route) return an empty items array — which is not charged
- Google Flights rate limiting or layout changes may cause scraping failures — not charged if empty

## How this service works

Pay-per-call structured web data. Failed or empty runs are not charged.

## Output

Returns a JSON object with a count of matched itineraries and an array of flight items, each containing flight ID, trip type, outbound date, arrival and departure airport codes and names, and result category. Only itineraries matching the specified filters (price, stops, airlines) are included.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "gl": {
   "type": "string",
   "default": "us",
   "description": "Country code for the search page, such as us."
  },
  "hl": {
   "type": "string",
   "default": "en",
   "description": "Language code for the search page, such as en."
  },
  "adults": {
   "type": "integer",
   "default": 1,
   "maximum": 9,
   "minimum": 1,
   "description": "Number of adult travelers included in the displayed price."
  },
  "airlines": {
   "type": "string",
   "default": "",
   "description": "Optional comma-separated airline codes, such as AA,DL. Keep matching returned itineraries."
  },
  "currency": {
   "type": "string",
   "default": "USD",
   "description": "Three-letter currency code for displayed prices, such as USD or EUR."
  },
  "maxItems": {
   "type": "integer",
   "default": 100,
   "minimum": 0,
   "description": "Maximum flight rows to save. Set 0 for every itinerary exposed in the initial result set."
  },
  "max_price": {
   "type": "integer",
   "minimum": 1,
   "description": "Keep only returned itineraries at or below this displayed price."
  },
  "max_stops": {
   "type": "integer",
   "minimum": 0,
   "description": "Keep itineraries with at most this many stops. Set 0 for nonstop flights."
  },
  "arrival_id": {
   "type": "string",
   "description": "One three-letter IATA airport code, such as JFK. The search is for one arrival airport."
  },
  "return_date": {
   "type": "string",
   "description": "Optional return date in YYYY-MM-DD format. Leave empty for a one-way search."
  },
  "departure_id": {
   "type": "string",
   "description": "One three-letter IATA airport code, such as LAX. The search is for one departure airport."
  },
  "outbound_date": {
   "type": "string",
   "description": "Departure date in YYYY-MM-DD format. Use a future date with published fares."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "count": 1,
  "items": [
   {
    "flightId": null,
    "tripType": null,
    "outboundDate": null,
    "arrivalAirport": null,
    "resultCategory": null,
    "departureAirport": null,
    "arrivalAirportName": null,
    "departureAirportName": null
   }
  ],
  "product": "google-flights"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/google-flights-scraper-api-2db6bb12/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.scrapeforagents.tech](https://www.zero.xyz/host/api.scrapeforagents.tech/llms.txt)
