[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"api-page:google-flights-api":3},{"status":4,"api":5,"seo":428},"success",{"blocked":6,"description":7,"about":8,"stats":9,"name":11,"title":12,"slug":13,"logo":14,"created_at":15,"agent":16,"user":28,"endpoint_groups":31,"faqs":304,"features":371,"periodic_plans":372,"payasyougo_plans":426,"createdAtText":427},false,"Real-time flight search powered by Google Flights — one-way & round-trip fares, price calendar, and airport autocomplete.","# ✈️ Google Flights API — Real-Time Flight Search\n\n> Live airfare, price calendars and airport data from Google Flights — through one simple REST API.\n\nSearch **real-time flight prices** for any route in the world, build **cheapest-day price calendars**, track **price history**, and resolve **airports** — all with clean JSON responses and zero scraping on your side. Perfect for travel apps, fare-alert bots, metasearch sites, chatbots and price-comparison tools.\n\n---\n\n## ✨ Why this API\n\n- **Real-time fares** — prices come straight from Google Flights at request time.\n- **One-way & round-trip** — full passenger mix (adults, children, infants), cabin class, and stop filters.\n- **Price calendar** — find the cheapest day to fly across a date range in a single call.\n- **Price history** — see how a route's lowest fare has moved over time.\n- **Airport autocomplete** — search 6,000+ airports by IATA code, city or name (instant, no extra quota cost).\n- **Fast** — popular queries are cached and returned in milliseconds.\n- **Simple** — plain query parameters in, structured JSON out. No tokens, no async polling.\n\n---\n\n## 🚀 Quick start\n\nAfter subscribing to a plan, every request needs the two RapidAPI headers (the dashboard fills them in for you):\n\n```\nX-RapidAPI-Key:  YOUR_RAPIDAPI_KEY\nX-RapidAPI-Host: google-flights-data.p.rapidapi.com\n```\n\n### cURL\n\n```bash\ncurl --request GET \\\n  --url 'https://google-flights-data.p.rapidapi.com/v1/flights/search?from=JFK&to=LAX&departDate=2026-07-15&maxResults=5' \\\n  --header 'X-RapidAPI-Key: YOUR_RAPIDAPI_KEY' \\\n  --header 'X-RapidAPI-Host: google-flights-data.p.rapidapi.com'\n```\n\n### JavaScript (fetch)\n\n```javascript\nconst res = await fetch(\n  'https://google-flights-data.p.rapidapi.com/v1/flights/search?from=JFK&to=LAX&departDate=2026-07-15',\n  {\n    headers: {\n      'X-RapidAPI-Key': 'YOUR_RAPIDAPI_KEY',\n      'X-RapidAPI-Host': 'google-flights-data.p.rapidapi.com',\n    },\n  },\n);\nconst data = await res.json();\nconsole.log(data.lowestPrice, data.itineraries);\n```\n\n### Python (requests)\n\n```python\nimport requests\n\nurl = \"https://google-flights-data.p.rapidapi.com/v1/flights/search\"\nquerystring = {\"from\": \"JFK\", \"to\": \"LAX\", \"departDate\": \"2026-07-15\"}\nheaders = {\n    \"X-RapidAPI-Key\": \"YOUR_RAPIDAPI_KEY\",\n    \"X-RapidAPI-Host\": \"google-flights-data.p.rapidapi.com\",\n}\n\nresp = requests.get(url, headers=headers, params=querystring)\nprint(resp.json())\n```\n\n> Replace `google-flights-data.p.rapidapi.com` with the exact host shown on the **Endpoints** tab of this API.\n\n---\n\n## 📚 Endpoints\n\n### 1. Search flights — `GET /v1/flights/search`\n\nLive itineraries for a one-way or round-trip route.\n\n| Parameter | Required | Default | Description |\n|-----------|:--------:|---------|-------------|\n| `from` | ✅ | — | Origin IATA code (e.g. `JFK`) |\n| `to` | ✅ | — | Destination IATA code (e.g. `LAX`) |\n| `departDate` | ✅ | — | Departure date, `YYYY-MM-DD` |\n| `returnDate` | — | — | Return date `YYYY-MM-DD`. Add it to make the search round-trip |\n| `adults` | — | `1` | Adults (1–9) |\n| `children` | — | `0` | Children (0–8) |\n| `infantsInSeat` | — | `0` | Infants in their own seat |\n| `infantsOnLap` | — | `0` | Lap infants |\n| `cabinClass` | — | `economy` | `economy`, `premium-economy`, `business`, `first` |\n| `stops` | — | `any` | `any`, `0` (nonstop), `1`, `2` |\n| `currency` | — | `USD` | ISO 4217 currency code |\n| `locale` | — | `en-US` | Result language (BCP-47) |\n| `country` | — | `US` | Market/country (ISO 3166-1) |\n| `sort` | — | `best` | `best`, `price`, `duration`, `departure`, `arrival` |\n| `maxResults` | — | `50` | Max itineraries (1–100) |\n| `refresh` | — | `false` | `true` to bypass cache and force a live fetch |\n\n**Sample response**\n\n```json\n{\n  \"currency\": \"USD\",\n  \"lowestPrice\": 197,\n  \"source\": \"live\",\n  \"fetchedAt\": \"2026-06-22T20:42:00.000Z\",\n  \"resultCount\": 5,\n  \"itineraries\": [\n    {\n      \"airlines\": [\"JetBlue\"],\n      \"price\": 197,\n      \"currency\": \"USD\",\n      \"departureTime\": \"7:35 PM\",\n      \"arrivalTime\": \"10:49 PM\",\n      \"arrivalDayOffset\": 0,\n      \"departureAirport\": \"JFK\",\n      \"arrivalAirport\": \"LAX\",\n      \"durationMinutes\": 374,\n      \"durationLabel\": \"6 hr 14 min\",\n      \"stops\": 0,\n      \"stopAirports\": [],\n      \"co2Kg\": null,\n      \"priceLevel\": \"typical\",\n      \"selfTransfer\": false\n    }\n  ]\n}\n```\n\n| Field | Meaning |\n|-------|---------|\n| `lowestPrice` | Cheapest price across the returned itineraries |\n| `source` | `live` (fetched now) or `cache` (served from a recent fetch) |\n| `arrivalDayOffset` | `1` means the flight arrives the next day, `2` two days later, etc. |\n| `stops` | `0` = nonstop |\n| `priceLevel` | Google's read on the price: `low`, `typical`, `high`, or `null` |\n| `co2Kg` | Estimated CO₂ in kg, when shown by Google |\n\n---\n\n### 2. Price calendar — `GET /v1/flights/calendar`\n\nCheapest fare **per departure date** across a range (up to 30 days). Great for \"when is it cheapest to fly?\" features.\n\n| Parameter | Required | Default | Description |\n|-----------|:--------:|---------|-------------|\n| `from`, `to` | ✅ | — | Route IATA codes |\n| `startDate`, `endDate` | ✅ | — | Inclusive date range, `YYYY-MM-DD` |\n| `tripLengthDays` | — | — | For round trips: nights at destination |\n| `cabinClass` | — | `economy` | Cabin class |\n| `currency` | — | `USD` | Currency code |\n\n**Sample response**\n\n```json\n{\n  \"from\": \"JFK\",\n  \"to\": \"LAX\",\n  \"currency\": \"USD\",\n  \"cheapest\": { \"date\": \"2026-07-09\", \"price\": 178 },\n  \"days\": [\n    { \"date\": \"2026-07-08\", \"price\": 199, \"currency\": \"USD\" },\n    { \"date\": \"2026-07-09\", \"price\": 178, \"currency\": \"USD\" },\n    { \"date\": \"2026-07-10\", \"price\": 205, \"currency\": \"USD\" }\n  ]\n}\n```\n\n> This endpoint queries one day at a time, so it takes longer than a single search. Keep the date range tight for the fastest response.\n\n---\n\n### 3. Price history — `GET /v1/flights/price-history`\n\nLowest prices observed for a route/date over time, so you can show trends or \"good deal\" badges.\n\n| Parameter | Required | Default | Description |\n|-----------|:--------:|---------|-------------|\n| `from`, `to` | ✅ | — | Route IATA codes |\n| `departDate` | ✅ | — | Departure date, `YYYY-MM-DD` |\n| `limit` | — | `50` | Max data points (1–200) |\n\n**Sample response**\n\n```json\n{\n  \"from\": \"JFK\",\n  \"to\": \"LAX\",\n  \"departDate\": \"2026-07-15\",\n  \"count\": 3,\n  \"series\": [\n    { \"observedAt\": \"2026-06-22T21:07:03Z\", \"lowestPrice\": 254 },\n    { \"observedAt\": \"2026-06-21T09:14:00Z\", \"lowestPrice\": 268 },\n    { \"observedAt\": \"2026-06-20T18:02:00Z\", \"lowestPrice\": 249 }\n  ]\n}\n```\n\n> History builds up as routes are searched over time. A route with no prior searches returns an empty `series`.\n\n---\n\n### 4. Airport search — `GET /v1/airports/search`\n\nAutocomplete airports by IATA code, city or name. Ideal for search boxes. Instant and lightweight.\n\n| Parameter | Required | Default | Description |\n|-----------|:--------:|---------|-------------|\n| `q` | ✅ | — | Query: IATA code, city or airport name |\n| `limit` | — | `10` | Max results (1–50) |\n\n**Sample response**\n\n```json\n{\n  \"count\": 2,\n  \"results\": [\n    {\n      \"iata\": \"MAD\",\n      \"name\": \"Adolfo Suárez Madrid–Barajas Airport\",\n      \"city\": \"Madrid\",\n      \"country\": \"Spain\",\n      \"lat\": 40.4719,\n      \"lon\": -3.5626\n    }\n  ]\n}\n```\n\n---\n\n## 🧭 Common use cases\n\n- **Fare-alert bots** — poll `search`/`price-history` and notify users when a route drops.\n- **\"Cheapest day to fly\"** — power a date picker with `calendar`.\n- **Travel chatbots / AI agents** — resolve cities with `airports/search`, then quote fares with `search`.\n- **Metasearch & comparison sites** — surface live prices, airlines, stops and durations.\n\n---\n\n## ⚠️ Error responses\n\nAll errors share a consistent JSON shape:\n\n```json\n{ \"error\": \"bad_request\", \"message\": \"Unknown origin airport code: \\\"ZZZ\\\".\", \"statusCode\": 400 }\n```\n\n| Status | `error` | When |\n|:------:|---------|------|\n| `400` | `bad_request` | Invalid/missing parameters or unknown IATA code |\n| `403` | `forbidden` | Missing/invalid RapidAPI subscription |\n| `429` | `rate_limited` | Plan quota exceeded |\n| `502` | `upstream_error` | Temporary issue reaching Google Flights — retry shortly |\n\n---\n\n## ❓ FAQ\n\n**How fresh are the prices?**\nLive at request time. Identical recent searches may be served from a short-lived cache (look at the `source` field) — pass `refresh=true` to force a live fetch.\n\n**Which currencies and markets are supported?**\nAny ISO 4217 `currency` and ISO 3166-1 `country`/market that Google Flights supports. Defaults are `USD` / `US`.\n\n**Do airport lookups count against my quota?**\nThey're served locally and are extremely fast; treat them as free, lightweight calls.\n\n**Why is `price` sometimes `null`?**\nOccasionally Google hides a price for a specific itinerary; the rest of the itinerary data is still returned.\n\n**Is this affiliated with Google?**\nNo. This API is independent and not affiliated with, endorsed by, or sponsored by Google. \"Google Flights\" is a trademark of Google LLC. Prices are indicative — always confirm on the airline/booking site before purchase.\n\n---\n\n## 📨 Support\n\nQuestions, feature requests or a route that looks off? Reach out through the **Discussions** tab on this API's RapidAPI page and we'll help.",{"score":10},"2.39","Google Flights","Google Flights API","google-flights-api","https://cdn.jojapi.com/api/346e8d3e-2743-4284-abad-028dc3fc3d03","2026-08-28 03:34:05",{"enabled":17,"closed":18,"request_enabled":6,"catalog_url":19,"discovery_url":20,"directory_url":21,"rails":22,"networks":25,"docs":27},true,null,"https://google-flights.jojapi.net/_jojapi/agent/plans","https://google-flights.jojapi.net/.well-known/x402","https://agents.jojapi.net/apis/google-flights-api",[23,24],"x402","mpp",[26],"eip155:8453","https://docs.jojapi.com/consumers/agents",{"nick":29,"name":30,"verified":6,"website":18},"toms-barak","Tomás Barak",[32,233,255,283],{"endpoints":33,"name":232,"description":40,"ungrouped":6},[34,128,160],{"blocked":6,"hidden":6,"agent_price":18,"credits":18,"flexible_credits_description":18,"consumptions":35,"description":47,"method":48,"name":49,"url_path":49,"root_url":50,"parameters":51,"responses":101,"result_stats":123},[36,42],{"name":37,"slug":38,"cost":39,"label":40,"avg":41},"Requests","requests","1","",1,{"name":43,"slug":44,"cost":45,"label":40,"avg":46},"Autocomplete Requests","autocomplete-requests","{{toInt(default(kvGet(response.headers[\"x-rapidapi-billing\"], \"Autocomplete Requests\"), 0))}}",0,"Cheapest fare per departure date across a range (max 30 days). For round trips, supply `tripLengthDays`. Note: this performs multiple upstream lookups, so it is slower than a single search.","GET","/v1/flights/calendar","https://google-flights.jojapi.net",{"url":52,"header":92,"post":98,"body":99,"path":100},[53,57,61,70,73,76,80,84,88],{"key":54,"example":55,"schema":18,"example_disabled":6,"example_type":56,"value_type":56,"enum_values":18,"default_value":55,"required":17,"name":40,"description":40},"currency","USD","string",{"key":58,"example":40,"schema":18,"example_disabled":6,"example_type":56,"value_type":59,"enum_values":18,"default_value":40,"required":6,"name":40,"description":60},"tripLengthDays","number","For round trips: nights at destination",{"key":62,"example":40,"schema":18,"example_disabled":6,"example_type":56,"value_type":63,"enum_values":64,"default_value":65,"required":17,"name":40,"description":69},"cabinClass","enum",[65,66,67,68],"economy","premium-economy","business","first","Cabin class",{"key":71,"example":72,"schema":18,"example_disabled":6,"example_type":56,"value_type":56,"enum_values":18,"default_value":72,"required":17,"name":40,"description":40},"locale","en-US",{"key":74,"example":75,"schema":18,"example_disabled":6,"example_type":56,"value_type":56,"enum_values":18,"default_value":75,"required":17,"name":40,"description":40},"country","US",{"key":77,"example":78,"schema":18,"example_disabled":6,"example_type":56,"value_type":56,"enum_values":18,"default_value":40,"required":17,"name":40,"description":79},"startDate","2026-09-15","Range start date (YYYY-MM-DD)",{"key":81,"example":82,"schema":18,"example_disabled":6,"example_type":56,"value_type":56,"enum_values":18,"default_value":40,"required":17,"name":40,"description":83},"to","LAX","Destination IATA airport code",{"key":85,"example":86,"schema":18,"example_disabled":6,"example_type":56,"value_type":56,"enum_values":18,"default_value":40,"required":17,"name":40,"description":87},"endDate","2026-09-21","Range end date (YYYY-MM-DD)",{"key":89,"example":90,"schema":18,"example_disabled":6,"example_type":56,"value_type":56,"enum_values":18,"default_value":40,"required":17,"name":40,"description":91},"from","JFK","Origin IATA airport code",[93],{"key":94,"is_auth":17,"example":95,"example_disabled":17,"example_type":56,"name":96,"description":95,"required":17,"always_error":97},"X-JoJAPI-Key","You must log in to get API key","JoJ API Key","Please log in to get API key",[],[],[],[102,111,118],{"status":103,"status_code":104,"description":105,"schema":106,"examples":107,"example":110},"200",200,"Default Response","{\"type\":\"object\",\"required\":[\"from\",\"to\",\"currency\",\"cheapest\",\"days\"],\"properties\":{\"from\":{\"type\":\"string\"},\"to\":{\"type\":\"string\"},\"currency\":{\"type\":\"string\"},\"cheapest\":{\"type\":[\"object\",\"null\"],\"properties\":{\"date\":{\"type\":\"string\"},\"price\":{\"type\":\"number\"}}},\"days\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"required\":[\"date\",\"price\",\"currency\"],\"properties\":{\"date\":{\"type\":\"string\"},\"price\":{\"type\":[\"number\",\"null\"]},\"currency\":{\"type\":\"string\"}}}}}}",[108],{"name":109,"summary":40,"description":40,"example":110},"Example_1","{\"from\":\"\",\"to\":\"\",\"currency\":\"\",\"cheapest\":{\"date\":\"\",\"price\":0},\"days\":[{\"date\":\"\",\"price\":0,\"currency\":\"\"}]}",{"status":112,"status_code":113,"description":105,"schema":114,"examples":115,"example":117},"400",400,"{\"type\":\"object\",\"required\":[\"error\",\"message\",\"statusCode\"],\"properties\":{\"error\":{\"type\":\"string\"},\"message\":{\"type\":\"string\"},\"statusCode\":{\"type\":\"integer\"},\"details\":{}}}",[116],{"name":109,"summary":40,"description":40,"example":117},"{\"error\":\"\",\"message\":\"\",\"statusCode\":0}",{"status":119,"status_code":120,"description":105,"schema":114,"examples":121,"example":117},"502",502,[122],{"name":109,"summary":40,"description":40,"example":117},{"x2":124,"x3":125,"x4":124,"x5":125,"uptime":126,"avg_latency":127,"avg_credits":125},"50.00","0.00","100.00","2,951",{"blocked":6,"hidden":6,"agent_price":18,"credits":18,"flexible_credits_description":18,"consumptions":129,"description":132,"method":48,"name":133,"url_path":133,"root_url":50,"parameters":134,"responses":149,"result_stats":158},[130,131],{"name":37,"slug":38,"cost":39,"label":40,"avg":41},{"name":43,"slug":44,"cost":45,"label":40,"avg":46},"Historical lowest prices observed for a route/date by this API over time. Requires Postgres persistence to be enabled; returns an empty series otherwise.","/v1/flights/price-history",{"url":135,"header":144,"post":146,"body":147,"path":148},[136,139,140,141],{"key":137,"example":78,"schema":18,"example_disabled":6,"example_type":56,"value_type":56,"enum_values":18,"default_value":40,"required":17,"name":40,"description":138},"departDate","Departure date (YYYY-MM-DD)",{"key":81,"example":82,"schema":18,"example_disabled":6,"example_type":56,"value_type":56,"enum_values":18,"default_value":40,"required":17,"name":40,"description":83},{"key":89,"example":90,"schema":18,"example_disabled":6,"example_type":56,"value_type":56,"enum_values":18,"default_value":40,"required":17,"name":40,"description":91},{"key":142,"example":143,"schema":18,"example_disabled":6,"example_type":56,"value_type":59,"enum_values":18,"default_value":143,"required":17,"name":40,"description":40},"limit","50",[145],{"key":94,"is_auth":17,"example":95,"example_disabled":17,"example_type":56,"name":96,"description":95,"required":17,"always_error":97},[],[],[],[150,155],{"status":103,"status_code":104,"description":105,"schema":151,"examples":152,"example":154},"{\"type\":\"object\",\"required\":[\"from\",\"to\",\"departDate\",\"count\",\"series\"],\"properties\":{\"from\":{\"type\":\"string\"},\"to\":{\"type\":\"string\"},\"departDate\":{\"type\":\"string\"},\"count\":{\"type\":\"integer\"},\"series\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"required\":[\"observedAt\",\"lowestPrice\"],\"properties\":{\"observedAt\":{\"format\":\"date-time\",\"type\":\"string\"},\"lowestPrice\":{\"type\":\"number\"}}}}}}",[153],{"name":109,"summary":40,"description":40,"example":154},"{\"from\":\"\",\"to\":\"\",\"departDate\":\"\",\"count\":0,\"series\":[{\"observedAt\":\"\",\"lowestPrice\":0}]}",{"status":112,"status_code":113,"description":105,"schema":114,"examples":156,"example":117},[157],{"name":109,"summary":40,"description":40,"example":117},{"x2":126,"x3":125,"x4":125,"x5":125,"uptime":126,"avg_latency":159,"avg_credits":125},"82",{"blocked":6,"hidden":6,"agent_price":18,"credits":18,"flexible_credits_description":18,"consumptions":161,"description":164,"method":48,"name":165,"url_path":165,"root_url":50,"parameters":166,"responses":218,"result_stats":230},[162,163],{"name":37,"slug":38,"cost":39,"label":40,"avg":41},{"name":43,"slug":44,"cost":45,"label":40,"avg":46},"Returns live itineraries from Google Flights for a one-way or round-trip route. Results are cached server-side; pass `refresh=true` to force a live fetch.","/v1/flights/search",{"url":167,"header":213,"post":215,"body":216,"path":217},[168,177,182,183,185,188,191,193,194,196,198,199,201,207,209,211],{"key":169,"example":40,"schema":18,"example_disabled":6,"example_type":56,"value_type":63,"enum_values":170,"default_value":171,"required":17,"name":40,"description":176},"sort",[171,172,173,174,175],"best","price","duration","departure","arrival","Result ordering",{"key":178,"example":179,"schema":18,"example_disabled":6,"example_type":56,"value_type":180,"enum_values":18,"default_value":179,"required":17,"name":40,"description":181},"refresh","false","boolean","Bypass cache and force a live fetch",{"key":89,"example":90,"schema":18,"example_disabled":6,"example_type":56,"value_type":56,"enum_values":18,"default_value":40,"required":17,"name":40,"description":91},{"key":54,"example":55,"schema":18,"example_disabled":6,"example_type":56,"value_type":56,"enum_values":18,"default_value":55,"required":17,"name":40,"description":184},"ISO 4217 currency code",{"key":186,"example":187,"schema":18,"example_disabled":6,"example_type":56,"value_type":59,"enum_values":18,"default_value":187,"required":17,"name":40,"description":40},"children","0",{"key":189,"example":40,"schema":18,"example_disabled":6,"example_type":56,"value_type":56,"enum_values":18,"default_value":40,"required":6,"name":40,"description":190},"returnDate","Return date (YYYY-MM-DD). Presence makes the search round-trip.",{"key":192,"example":143,"schema":18,"example_disabled":6,"example_type":56,"value_type":59,"enum_values":18,"default_value":143,"required":17,"name":40,"description":40},"maxResults",{"key":137,"example":78,"schema":18,"example_disabled":6,"example_type":56,"value_type":56,"enum_values":18,"default_value":40,"required":17,"name":40,"description":138},{"key":195,"example":187,"schema":18,"example_disabled":6,"example_type":56,"value_type":59,"enum_values":18,"default_value":187,"required":17,"name":40,"description":40},"infantsInSeat",{"key":71,"example":72,"schema":18,"example_disabled":6,"example_type":56,"value_type":56,"enum_values":18,"default_value":72,"required":17,"name":40,"description":197},"BCP-47 locale for results",{"key":81,"example":82,"schema":18,"example_disabled":6,"example_type":56,"value_type":56,"enum_values":18,"default_value":40,"required":17,"name":40,"description":83},{"key":200,"example":39,"schema":18,"example_disabled":6,"example_type":56,"value_type":59,"enum_values":18,"default_value":39,"required":17,"name":40,"description":40},"adults",{"key":202,"example":40,"schema":18,"example_disabled":6,"example_type":56,"value_type":63,"enum_values":203,"default_value":204,"required":17,"name":40,"description":206},"stops",[204,187,39,205],"any","2","Maximum number of stops (any, 0=nonstop, 1, 2)",{"key":74,"example":75,"schema":18,"example_disabled":6,"example_type":56,"value_type":56,"enum_values":18,"default_value":75,"required":17,"name":40,"description":208},"ISO 3166-1 country for pricing/market",{"key":62,"example":40,"schema":18,"example_disabled":6,"example_type":56,"value_type":63,"enum_values":210,"default_value":65,"required":17,"name":40,"description":69},[65,66,67,68],{"key":212,"example":187,"schema":18,"example_disabled":6,"example_type":56,"value_type":59,"enum_values":18,"default_value":187,"required":17,"name":40,"description":40},"infantsOnLap",[214],{"key":94,"is_auth":17,"example":95,"example_disabled":17,"example_type":56,"name":96,"description":95,"required":17,"always_error":97},[],[],[],[219,224,227],{"status":103,"status_code":104,"description":105,"schema":220,"examples":221,"example":223},"{\"type\":\"object\",\"required\":[\"currency\",\"lowestPrice\",\"source\",\"fetchedAt\",\"resultCount\",\"itineraries\"],\"properties\":{\"currency\":{\"type\":\"string\"},\"lowestPrice\":{\"type\":[\"number\",\"null\"]},\"source\":{\"type\":\"string\",\"enum\":[\"live\",\"cache\"]},\"fetchedAt\":{\"format\":\"date-time\",\"type\":\"string\"},\"resultCount\":{\"type\":\"integer\"},\"itineraries\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"required\":[\"airlines\",\"price\",\"currency\",\"departureTime\",\"arrivalTime\",\"arrivalDayOffset\",\"departureAirport\",\"arrivalAirport\",\"durationMinutes\",\"durationLabel\",\"stops\",\"stopAirports\",\"co2Kg\",\"priceLevel\",\"selfTransfer\"],\"properties\":{\"airlines\":{\"description\":\"Operating carrier(s)\",\"type\":\"array\",\"items\":{\"type\":\"string\"}},\"price\":{\"type\":[\"number\",\"null\"]},\"currency\":{\"type\":\"string\"},\"departureTime\":{\"type\":[\"string\",\"null\"]},\"arrivalTime\":{\"type\":[\"string\",\"null\"]},\"arrivalDayOffset\":{\"description\":\"Days arrival is offset from departure\",\"type\":\"integer\"},\"departureAirport\":{\"type\":[\"string\",\"null\"]},\"arrivalAirport\":{\"type\":[\"string\",\"null\"]},\"durationMinutes\":{\"type\":[\"integer\",\"null\"]},\"durationLabel\":{\"type\":[\"string\",\"null\"]},\"stops\":{\"description\":\"0 = nonstop\",\"type\":\"integer\"},\"stopAirports\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}},\"co2Kg\":{\"type\":[\"integer\",\"null\"]},\"priceLevel\":{\"type\":[\"string\",\"null\"],\"enum\":[\"low\",\"typical\",\"high\",null],\"description\":\"Google's overall price assessment\"},\"selfTransfer\":{\"type\":\"boolean\"}}}}}}",[222],{"name":109,"summary":40,"description":40,"example":223},"{\"currency\":\"\",\"lowestPrice\":0,\"source\":\"live\",\"fetchedAt\":\"\",\"resultCount\":0,\"itineraries\":[{\"airlines\":[],\"price\":0,\"currency\":\"\",\"departureTime\":\"7:35 PM\",\"arrivalTime\":\"10:49 PM\",\"arrivalDayOffset\":0,\"departureAirport\":\"\",\"arrivalAirport\":\"\",\"durationMinutes\":0,\"durationLabel\":\"6 hr 14 min\",\"stops\":0,\"stopAirports\":[],\"co2Kg\":0,\"priceLevel\":\"low\",\"selfTransfer\":true}]}",{"status":112,"status_code":113,"description":105,"schema":114,"examples":225,"example":117},[226],{"name":109,"summary":40,"description":40,"example":117},{"status":119,"status_code":120,"description":105,"schema":114,"examples":228,"example":117},[229],{"name":109,"summary":40,"description":40,"example":117},{"x2":126,"x3":125,"x4":125,"x5":125,"uptime":126,"avg_latency":231,"avg_credits":125},"54","Flights",{"endpoints":234,"name":254,"description":40,"ungrouped":6},[235],{"blocked":6,"hidden":6,"agent_price":18,"credits":18,"flexible_credits_description":18,"consumptions":236,"description":239,"method":48,"name":240,"url_path":240,"root_url":50,"parameters":241,"responses":248,"result_stats":18},[237,238],{"name":37,"slug":38,"cost":39,"label":40,"avg":18},{"name":43,"slug":44,"cost":45,"label":40,"avg":18},"Check service health","/health",{"url":242,"header":243,"post":245,"body":246,"path":247},[],[244],{"key":94,"is_auth":17,"example":95,"example_disabled":17,"example_type":56,"name":96,"description":95,"required":17,"always_error":97},[],[],[],[249],{"status":103,"status_code":104,"description":105,"schema":250,"examples":251,"example":253},"{\"type\":\"object\",\"required\":[\"status\",\"uptimeSeconds\",\"cache\",\"database\",\"airports\",\"version\"],\"properties\":{\"status\":{\"type\":\"string\"},\"uptimeSeconds\":{\"type\":\"number\"},\"cache\":{\"type\":\"string\"},\"database\":{\"type\":\"string\"},\"airports\":{\"type\":\"integer\"},\"version\":{\"type\":\"string\"}}}",[252],{"name":109,"summary":40,"description":40,"example":253},"{\"status\":\"\",\"uptimeSeconds\":0,\"cache\":\"\",\"database\":\"\",\"airports\":0,\"version\":\"\"}","System",{"endpoints":256,"name":282,"description":40,"ungrouped":6},[257],{"blocked":6,"hidden":6,"agent_price":18,"credits":18,"flexible_credits_description":18,"consumptions":258,"description":261,"method":48,"name":262,"url_path":262,"root_url":50,"parameters":263,"responses":276,"result_stats":18},[259,260],{"name":37,"slug":38,"cost":39,"label":40,"avg":18},{"name":43,"slug":44,"cost":45,"label":40,"avg":18},"Search airports by IATA code, city or name. Backed by a bundled dataset — fast and free (does not count against upstream rate limits).","/v1/airports/search",{"url":264,"header":271,"post":273,"body":274,"path":275},[265,267],{"key":142,"example":266,"schema":18,"example_disabled":6,"example_type":56,"value_type":59,"enum_values":18,"default_value":266,"required":17,"name":40,"description":40},"10",{"key":268,"example":269,"schema":18,"example_disabled":6,"example_type":56,"value_type":56,"enum_values":18,"default_value":40,"required":17,"name":40,"description":270},"q","New York","Search by IATA code, city or airport name",[272],{"key":94,"is_auth":17,"example":95,"example_disabled":17,"example_type":56,"name":96,"description":95,"required":17,"always_error":97},[],[],[],[277],{"status":103,"status_code":104,"description":105,"schema":278,"examples":279,"example":281},"{\"type\":\"object\",\"required\":[\"count\",\"results\"],\"properties\":{\"count\":{\"type\":\"integer\"},\"results\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"required\":[\"iata\",\"name\",\"city\",\"country\",\"lat\",\"lon\"],\"properties\":{\"iata\":{\"type\":\"string\"},\"name\":{\"type\":\"string\"},\"city\":{\"type\":\"string\"},\"country\":{\"type\":\"string\"},\"lat\":{\"type\":\"number\"},\"lon\":{\"type\":\"number\"}}}}}}",[280],{"name":109,"summary":40,"description":40,"example":281},"{\"count\":0,\"results\":[{\"iata\":\"\",\"name\":\"\",\"city\":\"\",\"country\":\"\",\"lat\":0,\"lon\":0}]}","Airports",{"endpoints":284,"name":303,"description":40,"ungrouped":6},[285],{"blocked":6,"hidden":6,"agent_price":18,"credits":18,"flexible_credits_description":18,"consumptions":286,"description":289,"method":48,"name":290,"url_path":290,"root_url":50,"parameters":291,"responses":298,"result_stats":18},[287,288],{"name":37,"slug":38,"cost":39,"label":40,"avg":18},{"name":43,"slug":44,"cost":45,"label":40,"avg":18},"Service OpenAPI Spec","/openapi.json",{"url":292,"header":293,"post":295,"body":296,"path":297},[],[294],{"key":94,"is_auth":17,"example":95,"example_disabled":17,"example_type":56,"name":96,"description":95,"required":17,"always_error":97},[],[],[],[299],{"status":103,"status_code":104,"description":105,"schema":18,"examples":300,"example":302},[301],{"name":109,"summary":40,"description":40,"example":302},"{}","openapi.json",[305,308,311,314,317,320,323,326,329,332,335,338,341,344,347,350,353,356,359,362,365,368],{"question":306,"answer":307},"How do I authenticate?","> Create a key in your workspace and send it on every request:\n> ```\n> X-JoJAPI-Key: jk_your_key\n> ```\n> One key works across every API you have subscribed to; scope it to just this\n> API if you prefer. Usage comes back on each response in the\n> `X-Jojapi-*-Used` headers.\n\nThere are no other tokens, no OAuth flow and no session to keep alive.",{"question":309,"answer":310},"Do I need a Google account, API key or scraper of my own?","No. The API talks to Google Flights for you and returns structured JSON. You only\nneed your marketplace key.",{"question":312,"answer":313},"Is there a sandbox or test call I can make before writing code?","Yes — use the marketplace playground. The cheapest call to try is\n`GET /v1/airports/search?q=London`: it answers instantly from a bundled dataset\nand never depends on upstream availability.",{"question":315,"answer":316},"How fresh are the prices?","Live at request time. Identical searches made shortly after one another may be\nserved from a short-lived cache (up to an hour) — check the `source` field:\n`live` means it was just fetched, `cache` means it was reused. Pass\n`refresh=true` to force a live fetch and bypass the cache.",{"question":318,"answer":319},"Where does the data come from?","Public Google Flights results, parsed into a stable JSON shape. Prices, airlines,\ndurations, stops and CO₂ estimates are the ones Google displays for that route,\nmarket and currency at that moment.",{"question":321,"answer":322},"Why do results differ slightly from what I see on google.com/travel/flights?","Three usual reasons: (1) you are comparing different markets — Google prices by\ncountry/currency, so pass the `currency` and `country` you actually want;\n(2) you hit the cache — add `refresh=true`; (3) fares genuinely move minute to\nminute. Always treat prices as indicative and confirm on the airline or booking\nsite.",{"question":324,"answer":325},"Which routes and airports are covered?","Anything Google Flights covers. Airport codes are resolved from a bundled dataset\nof **6,000+ airports** exposed through `GET /v1/airports/search`.",{"question":327,"answer":328},"Can I use city or metro codes like `NYC` or `LON`?","No — `from` and `to` take a specific **airport** IATA code (`JFK`, `EWR`, `LHR`,\n`LGW`, …). Metro codes are not supported and return\n`400 bad_request`. Call `GET /v1/airports/search?q=New York` first and let the\nuser pick, or map city → airport on your side.",{"question":330,"answer":331},"Which currencies, languages and markets can I request?","Any ISO 4217 `currency`, BCP-47 `locale` and ISO 3166-1 `country`. Defaults are\n`USD` / `en-US` / `US`. `country` is the market Google prices for, which is what\nactually moves the number — set it together with `currency` for a coherent quote.",{"question":333,"answer":334},"Do you support round trips? Multi-city? Open-jaw?","Round trips: yes — add `returnDate` to `GET /v1/flights/search` and the search\nbecomes round-trip, with prices for the complete itinerary. Multi-city and\nopen-jaw itineraries are not supported today.",{"question":336,"answer":337},"Can I filter by nonstop, cabin class or passenger mix?","Yes: `stops` (`any`, `0` for nonstop, `1`, `2`), `cabinClass` (`economy`,\n`premium-economy`, `business`, `first`) and the full passenger mix — `adults`\n(1–9), `children`, `infantsInSeat`, `infantsOnLap`.",{"question":339,"answer":340},"Why is `price` sometimes `null`?","Google occasionally displays an itinerary without a fare (typically sold-out or\nfareless rows). Rather than invent a number, the field comes back `null` and the\nrest of the itinerary — airlines, times, duration, stops — is still returned.\n`lowestPrice` only considers itineraries that do have a price.",{"question":342,"answer":343},"What do `priceLevel`, `co2Kg`, `selfTransfer` and `arrivalDayOffset` mean?","- `priceLevel` — Google's own read on the fare: `low`, `typical`, `high`, or\n  `null` when it has no opinion. Handy for a \"good deal\" badge.\n- `co2Kg` — estimated CO₂ in kilograms, when Google shows it; `null` otherwise.\n- `selfTransfer` — `true` when the itinerary combines separate tickets, so the\n  traveller re-checks bags and bears the risk of a missed connection.\n- `arrivalDayOffset` — `0` means same-day arrival, `1` next day, `2` two days\n  later. Use it instead of comparing the time strings.",{"question":345,"answer":346},"Are `departureTime` / `arrivalTime` local times?","Yes — local to their own airport, formatted the way Google displays them\n(`7:35 PM`). For overnight flights pair `arrivalTime` with `arrivalDayOffset`.\n`durationMinutes` is the total travel time and is timezone-safe.",{"question":348,"answer":349},"Does the response include flight numbers, fare rules, baggage or booking links?","No. Each itinerary carries operating airlines, price and currency, departure and\narrival times and airports, duration, stop count and stop airports, CO₂ and price\nlevel. Booking happens on the airline or an OTA — this API is for search,\ncomparison and price monitoring, not ticketing.",{"question":351,"answer":352},"Why does `price-history` come back with an empty `series`?","History accumulates from live searches: a route/date that has not been searched\nbefore has nothing to report yet. Search the route first, keep querying it over\ntime, and the series fills in.",{"question":354,"answer":355},"How fast is each endpoint?","`airports/search` answers in milliseconds (local dataset). A cached\n`flights/search` is near-instant; a live one takes a few seconds, since it\nfetches and parses a real results page. `flights/calendar` is the slowest by\ndesign — it queries **one day at a time**, up to a 30-day range — so keep the\nrange tight when latency matters.",{"question":357,"answer":358},"Do airport lookups count against my quota?","They are billed like any other HTTP call by the marketplace, but they never touch\nGoogle, so they are instant and never fail with `502`. If you autocomplete on\nevery keystroke, debounce the input or cache codes client-side.",{"question":360,"answer":361},"What do the error codes mean, and which should I retry?","| Status | `error` | Meaning | Retry? |\n|:------:|---------|---------|--------|\n| `400` | `bad_request` | Invalid parameters or an unknown IATA code | No — fix the request |\n| `403` | `forbidden` | Missing or invalid subscription/key | No — check your key |\n| `429` | `rate_limited` | Plan quota exceeded | Yes, after backing off or upgrading |\n| `502` | `upstream_error` | Temporary problem reaching Google Flights | Yes, with exponential backoff |\n\nEvery error uses the same envelope:\n`{ \"error\": \"...\", \"message\": \"...\", \"statusCode\": ... }`.",{"question":363,"answer":364},"I keep getting `502 upstream_error` — what should I do?","It means Google throttled or blocked that particular fetch; it is transient. Wait\na few seconds and retry with exponential backoff. If it persists for a specific\nroute, report it (see below) — a markup change on Google's side is possible and\ngets fixed on our end.",{"question":366,"answer":367},"Is this API affiliated with Google?","No. This API is independent and is not affiliated with, endorsed by, or sponsored\nby Google. \"Google Flights\" is a trademark of Google LLC. Prices are indicative\nand can change at any time — always confirm on the airline or booking site before\npurchase.",{"question":369,"answer":370},"How do I report a wrong result or request a feature?","Use the support/contact channel on this API's listing.\n\nInclude the exact request (route, dates, `currency`/`country`, all parameters),\nthe timestamp, and what you expected versus what you got. That is usually enough\nto reproduce it immediately.",[],[373,391,403,415],{"type":374,"slug":375,"blocked":6,"period":376,"currency":377,"pricing":378,"rate_limit":381,"objects":382,"name":389,"display_name":389,"features":390},"periodic","8xh3s8xxo9u4l98fc943z55z","1 MONTH","usd",{"price":46,"credits":46,"past_due_timeout_num":379,"past_due_timeout_type":380},3,"DAY",{"max_requests":18,"time_window":18},[383,386],{"id":384,"name":37,"slug":38,"quota":385,"tiers":18},"n080a4d91",500,{"id":387,"name":43,"slug":44,"quota":388,"tiers":18},"n6637a66e",50000,"BASIC",[],{"type":374,"slug":392,"blocked":6,"period":376,"currency":377,"pricing":393,"rate_limit":395,"objects":396,"name":401,"display_name":401,"features":402},"dppn5p52q76c7ydzu8ml8yp6",{"price":394,"credits":46,"past_due_timeout_num":379,"past_due_timeout_type":380},9.99,{"max_requests":18,"time_window":18},[397,399],{"id":384,"name":37,"slug":38,"quota":398,"tiers":18},15000,{"id":387,"name":43,"slug":44,"quota":400,"tiers":18},250000,"PRO",[],{"type":374,"slug":404,"blocked":6,"period":376,"currency":377,"pricing":405,"rate_limit":407,"objects":408,"name":413,"display_name":413,"features":414},"x8begaj7dx34n74jrume7gjw",{"price":406,"credits":46,"past_due_timeout_num":379,"past_due_timeout_type":380},39.99,{"max_requests":18,"time_window":18},[409,411],{"id":384,"name":37,"slug":38,"quota":410,"tiers":18},100000,{"id":387,"name":43,"slug":44,"quota":412,"tiers":18},500000,"ULTRA",[],{"type":374,"slug":416,"blocked":6,"period":376,"currency":377,"pricing":417,"rate_limit":419,"objects":420,"name":424,"display_name":424,"features":425},"2dz0jxvnloegsj4rl9p6s7t5",{"price":418,"credits":46,"past_due_timeout_num":379,"past_due_timeout_type":380},149,{"max_requests":18,"time_window":18},[421,422],{"id":384,"name":37,"slug":38,"quota":412,"tiers":18},{"id":387,"name":43,"slug":44,"quota":423,"tiers":18},1000000,"MEGA",[],[],"2026-08-28",{"canonical":429,"page_title":430,"meta":431},"https://jojapi.com/hub/api/google-flights-api","Google Flights API Documentation & Playground - JoJ API",{"description":7,"keywords":432},"API,API Documentation,API Playground,Plans & Pricing,Google Flights,toms-barak"]