google-flights-api
Skill48 starsChanged 33 days agoMITView on GitHub
Google Flights route search by date as structured JSON: price, airline, total duration, stops and per-leg detail across best_flights and other_flights. Round-trip, one-way and multi-city, with cabin class, stops, airline and sort filters. One endpoint on the v2 engine, 1 credit per request.
- Reads credentials
In this repository81 other files it gives its agents.
- airbnb-scraper-apiSkill
- aldi-grocery-dataSkill
- aliexpress-product-dataSkill
- amazon-product-dataSkill
- apple-app-store-apiSkill
- booking-com-hotel-dataSkill
- canadian-tire-apiSkill
- capterra-reviews-apiSkill
- chatgpt-scraper-apiSkill
- chewy-product-dataSkill
- companies-house-apiSkill
- costco-product-dataSkill
- cvs-product-dataSkill
- decathlon-product-dataSkill
- dollar-general-apiSkill
- douyin-scraper-apiSkill
- ebay-product-dataSkill
- etsy-product-dataSkill
- facebook-scraper-apiSkill
- g2-software-reviews-apiSkill
- gemini-scraper-apiSkill
- github-apiSkill
- glassdoor-salary-dataSkill
- google-ads-transparency-apiSkill
- google-ai-mode-apiSkill
- google-hotels-apiSkill
- google-maps-apiSkill
- google-news-apiSkill
- google-play-store-apiSkill
- google-search-apiSkill
- google-shopping-apiSkill
- google-trends-apiSkill
- harbor-freight-apiSkill
- heb-grocery-dataSkill
- home-depot-product-dataSkill
- iherb-product-dataSkill
- indeed-jobs-apiSkill
- instagram-scraper-apiSkill
- kroger-grocery-dataSkill
- kuaishou-scraper-apiSkill
- linkedin-ad-library-apiSkill
- linkedin-scraper-apiSkill
- lowes-product-dataSkill
- menards-product-dataSkill
- mercadolibre-product-dataSkill
- meta-ad-library-apiSkill
- micro-center-apiSkill
- nordstrom-product-dataSkill
- nordstrom-rack-product-dataSkill
- petco-product-dataSkill
- petsmart-product-dataSkill
- pinterest-apiSkill
- realtor-com-property-dataSkill
- reddit-search-apiSkill
- redfin-property-dataSkill
- rightmove-property-dataSkill
- sams-club-product-dataSkill
- scavioSkill
- sec-edgar-apiSkill
- sephora-product-dataSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 4 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 20
Search Google Flights for a route and date and return structured JSON — price, airline, duration, stops, and per-leg details.
- Distinctive: line 24
Use this skill when the user asks to:
- Very specific: line 47
When the balance runs out the API answers 402 with a JSON body carrying billing_url.
- Distinctive: line 59
Every request costs 1 credit.
- Very specific: line 66
Read best_flights[] and other_flights[].
- Distinctive: line 153
Never fabricate prices, airlines, times, or durations.
- Very specific: line 164
If no flights are returned, relax stops, airline filters, or try nearby dates.
- Very specific: line 165
If SCAVIO_API_KEY is not set, prompt the user to export it before continuing.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Google Flights API - Route Search, Prices, Carriers, Stops
Search Google Flights for a route and date and return structured JSON — price, airline, duration, stops, and per-leg details. One credit per request.
When to trigger
Use this skill when the user asks to:
- Find flights between two airports on given dates
- Compare airfares, airlines, durations, or number of stops
- Plan round-trip, one-way, or multi-city itineraries
- Filter flights by cabin class, stops, or specific airlines
Setup
Get a free API key at scavio.dev (50 free credits to get started, no card required):
export SCAVIO_API_KEY=sk_live_your_keyIf you do not have a key yet
An agent running this skill without SCAVIO_API_KEY set will get 401 on every
call below. The whole path from nothing to a working key is self-serve:
- Sign up at dashboard.scavio.dev - email or Google, no card required.
- A key is created for the account automatically at signup. It is on the dashboard under API Keys, ready to copy.
- A new account starts with 50 credits. Endpoints in this skill cost 1 credit each unless the table below says otherwise.
When the balance runs out the API answers 402 with a JSON body carrying
billing_url. Topping up needs no code change - the same key keeps working.
The smallest purchase is 2,500 credits for $25, and monthly plans work out
cheaper per credit if the usage is steady rather than one-off.
Endpoint
POST https://api.scavio.dev/api/v2/google/flights
Authorization: Bearer $SCAVIO_API_KEYEvery request costs 1 credit.
Workflow
- Provide
departure_idandarrival_id(IATA codes) and anoutbound_date(YYYY-MM-DD). - For a round trip (
type: 1, the default) also passreturn_date. Usetype: 2for one-way,type: 3for multi-city. - Refine with
travel_class,stops,adults,sort_by, and airline filters. - Read
best_flights[]andother_flights[]; each itinerary lists itsflightslegs,price,total_duration, and airline.
Parameters
| Parameter | Type | Default | Description |
departure_id | string | required | Origin IATA (comma-separated allowed, e.g. JFK) |
arrival_id | string | required | Destination IATA (e.g. LAX) |
outbound_date | string | required | Departure date YYYY-MM-DD |
type | number | 1 | 1 round trip, 2 one way, 3 multi-city |
return_date | string | -- | Required when type=1 |
adults | number | 1 | Adult passengers (1-9) |
children | number | -- | Children (0-9) |
infants_in_seat | number | -- | Infants in seat (0-4) |
infants_on_lap | number | -- | Lap infants (0-4) |
travel_class | number | -- | 1 economy, 2 premium, 3 business, 4 first |
stops | number | -- | 0 any, 1 nonstop, 2 <=1 stop, 3 <=2 stops |
sort_by | number | -- | 1 top, 2 price, 3 departure, 4 arrival, 5 duration, 6 emissions |
include_airlines | string | -- | Restrict to these airlines |
exclude_airlines | string | -- | Exclude these airlines |
hl | string | -- | UI language |
gl | string | -- | Geo country |
currency | string | -- | Currency code (e.g. USD) |
Example
import requests
# Your key from https://scavio.dev. Load it from your environment or secret
# store in real code - keep it out of source control.
API_KEY = "sk_your_key_here"
response = requests.post(
"https://api.scavio.dev/api/v2/google/flights",
headers={"Authorization": f"Bearer {API_KEY}"},
json={
"departure_id": "JFK",
"arrival_id": "LAX",
"outbound_date": "2026-09-10",
"return_date": "2026-09-17",
"type": 1,
"travel_class": 1,
"stops": 1,
"sort_by": 2,
"currency": "USD",
},
)
data = response.json()
for f in data.get("best_flights", []):
legs = f["flights"]
print(f["price"], f["total_duration"], "min",
legs[0]["airline"], legs[0]["departure_airport"]["id"], "->",
legs[-1]["arrival_airport"]["id"])Response
{
"best_flights": [
{
"flights": [
{
"departure_airport": { "id": "JFK", "time": "2026-09-10 08:00" },
"arrival_airport": { "id": "LAX", "time": "2026-09-10 11:25" },
"airline": "Example Air",
"flight_number": "EA 123",
"duration": 385
}
],
"total_duration": 385,
"price": 342,
"type": "Round trip"
}
],
"other_flights": [],
"response_time": 1980,
"credits_used": 1,
"credits_remaining": 994,
"cached": false
}Guardrails
- Each call costs 1 credit.
- Never fabricate prices, airlines, times, or durations. Only return API data.
departure_idandarrival_idmust be IATA codes;outbound_dateisYYYY-MM-DD.- A round trip (
type=1) requiresreturn_date. - Prices reflect the requested
currency; state the currency when quoting fares.
Failure handling
400means an invalid parameter (e.g. round trip withoutreturn_date, bad IATA/date) — fix and retry.401means the API key is invalid or missing. CheckSCAVIO_API_KEY.429means rate or usage limit exceeded. Wait before retrying. See rate limits.502/503mean upstream is temporarily unavailable. Wait a few seconds before retrying.- If no flights are returned, relax
stops, airline filters, or try nearby dates. - If
SCAVIO_API_KEYis not set, prompt the user to export it before continuing.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

