# Google Flights API

$0.005 per call, pay only for 200 responses  
Search Google Flights for flight itineraries and current fares.

/flights5 credits / requestSearch

## x402 pay per call

**$0.005 per successful call**, paid in USDC on Base. No account or API key required. The live PAYMENT-REQUIRED header quotes the authoritative price.

### curl request

```
curl -i 'https://api.fastaf.co/x402/v1/flights?departure_id=JFK&arrival_id=LHR&outbound_date=2027-01-15&type=2'
```

### Example 402 payment challenge

Illustrative recipient address, not a payment destination. Request a fresh challenge, sign it with an x402 v2 client and retry the same URL with PAYMENT-SIGNATURE. The header is base64 JSON v2; the compatibility body uses v1 aliases on Base. Only successful results settle.

```
HTTP/1.1 402 Payment Required
Content-Type: application/json
PAYMENT-REQUIRED: eyJ4NDAyVmVyc2lvbiI6MiwicmVzb3VyY2UiOnsidXJsIjoiaHR0cHM6Ly9hcGkuZmFzdGFmLmNvL3g0MDIvdjEvZmxpZ2h0cz9kZXBhcnR1cmVfaWQ9SkZLJmFycml2YWxfaWQ9TEhSJm91dGJvdW5kX2RhdGU9MjAyNy0wMS0xNSZ0eXBlPTIiLCJkZXNjcmlwdGlvbiI6Ikdvb2dsZSBGbGlnaHRzIiwibWltZVR5cGUiOiJhcHBsaWNhdGlvbi9qc29uIn0sImFjY2VwdHMiOlt7InNjaGVtZSI6ImV4YWN0IiwibmV0d29yayI6ImVpcDE1NTo4NDUzIiwiYW1vdW50IjoiNTAwMCIsImFzc2V0IjoiMHg4MzM1ODlmQ0Q2ZURiNkUwOGY0YzdDMzJENGY3MWI1NGJkQTAyOTEzIiwicGF5VG8iOiIweDExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTEiLCJtYXhUaW1lb3V0U2Vjb25kcyI6MzAwLCJleHRyYSI6eyJuYW1lIjoiVVNEIENvaW4iLCJ2ZXJzaW9uIjoiMiJ9fV19

{
  "error": "payment_required",
  "x402Version": 2,
  "resource": {
    "url": "https://api.fastaf.co/x402/v1/flights?departure_id=JFK&arrival_id=LHR&outbound_date=2027-01-15&type=2",
    "description": "Google Flights",
    "mimeType": "application/json"
  },
  "accepts": [
    {
      "scheme": "exact",
      "network": "eip155:8453",
      "amount": "5000",
      "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "payTo": "0x1111111111111111111111111111111111111111",
      "maxTimeoutSeconds": 300,
      "extra": {
        "name": "USD Coin",
        "version": "2"
      }
    }
  ]
}
```

### Decoded PAYMENT-REQUIRED header

```
{
  "x402Version": 2,
  "resource": {
    "url": "https://api.fastaf.co/x402/v1/flights?departure_id=JFK&arrival_id=LHR&outbound_date=2027-01-15&type=2",
    "description": "Google Flights",
    "mimeType": "application/json"
  },
  "accepts": [
    {
      "scheme": "exact",
      "network": "eip155:8453",
      "amount": "5000",
      "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "payTo": "0x1111111111111111111111111111111111111111",
      "maxTimeoutSeconds": 300,
      "extra": {
        "name": "USD Coin",
        "version": "2"
      }
    }
  ]
}
```

### JSON discovery response example

Search Google Flights for flight itineraries and current fares. JSON response; source fields may vary. This example is illustrative.

```
{
  "best_flights": [
    {
      "price": 550,
      "flights": [
        {
          "departure_airport": {
            "id": "JFK"
          },
          "arrival_airport": {
            "id": "LHR"
          }
        }
      ]
    }
  ]
}
```

### Response with an API key

The same data over REST with a prepaid key. The JSON body is the example above; failed requests are not charged.

```
curl -H "Authorization: Bearer $FASTAF_API_KEY" 'https://api.fastaf.co/v1/flights?departure_id=JFK&arrival_id=LHR&outbound_date=2027-01-15&type=2'
```

### MCP tools

search\_flights MCP tool calls require an API key or OAuth; x402 payments apply to HTTP data calls.

[Full endpoint reference for agents](/llms/flights.txt)

## Pricing

**x402:** $0.005 per successful call, USDC on Base, no account. **API key:** 5 credits per request from one-time credit packs, without expiry. Credit packs are shared by every endpoint and never renew.

Pack

Price

Credits

Per call

Per 1,000 calls

Starter

$10

20,000

$0.0025

$2.50

Growth

$29

75,000

$0.00193

$1.93

Scale

$99

300,000

$0.00165

$1.65

Pro

$299

1,000,000

$0.0015

$1.50

Business

$799

3,000,000

$0.00133

$1.33

Free: 500 credits every month after email verification, no card. See [pricing](/pricing/). Alternatives: [FastAF vs SerpApi](/compare/serpapi/), [vs toll402](/compare/toll402/), [vs serp402](/compare/serp402/), [vs AgentBIT](/compare/agentbit/), [vs Amazon PA-API](/compare/amazon-pa-api/).

## Parameters

Name

Description

departure\_id

Required three-letter uppercase IATA departure airport code; no default.

arrival\_id

Required three-letter uppercase IATA arrival airport code; no default.

outbound\_date

Required outbound date in YYYY-MM-DD format; no default.

return\_date

Return date in YYYY-MM-DD format, on or after outbound\_date; optional.

type

Trip type: 1 round trip, 2 one way; omitted uses source default.

adults

Adult passenger count, positive integer; omitted uses source default.

currency

Three-letter uppercase currency code; omitted uses source default.

hl

Interface language code; omitted uses source default.

gl

Two-letter country code; omitted uses source default.

travel\_class

Cabin class: 1 economy, 2 premium economy, 3 business, 4 first; omitted uses source default.

## Response fields

*   best\_flights

Passing these fields to an LLM? See [token-aware scraping: only what your LLM needs](/use-cases/token-aware-scraping/).

Building a travel agent? Read [Google Flights API for AI agents](/use-cases/google-flights-api-for-agents/) for the request an agent sends and what to keep from the results.

## Guides

*   [Add FastAF to Claude Code, Codex and Cursor](/how-to/add-fastaf-claude-code-codex-cursor/)
    
    One remote MCP server, three clients: the claude, codex and Cursor mcp.json setup for https://api.fastaf.co/mcp, with the API key auth it really uses.
    

## FAQ

### What input is required?

departure\_id, arrival\_id, outbound\_date.

### What does a call cost?

5 credits or $0.005 via x402. Start with 500 free credits every month after email verification; optional credit packs are available.

### How much does one Google Flights API call cost?

With x402 it is $0.005 per successful call in USDC on Base, with no account. With an API key it is 5 credits per request, which is $0.0025 on the $10 Starter pack down to $0.00133 on the $799 Business pack. Failed requests are never charged.

### Do I need an account or an API key for Google Flights API?

Not for x402: send the request, pay the 402 challenge in USDC and retry. For credits, sign up free, confirm your email and use the API key in the Authorization header. Accounts get 500 free credits every month after email verification; they do not apply to x402.

## Other APIs

*   [Google SERP API](/apis/google-serp-api/)
    
    Structured web search results
    
*   [Google Maps API](/apis/google-maps-api/)
    
    Place search and place details
    
*   [Google News API](/apis/google-news-api/)
    
    Current news search results
    
*   [Google Jobs API](/apis/google-jobs-api/)
    
    Job listings and apply links
    

[All APIs →](/apis/) · [Guides and benchmarks on the blog →](/blog/)

### What it is used for

*   Search Google Flights for flight itineraries and current fares.

[Start free](/pricing/)[Docs](/docs/)

## Related

*   [Google Flights API for AI Agents](/use-cases/google-flights-api-for-agents/)
*   [Google SERP API](/apis/google-serp-api/)
*   [Google Maps API](/apis/google-maps-api/)
