Serpapi logo

Serpapi

Community
borski
serpapi

Google Flights cash prices, Google Hotels, and Google Travel Explore via SerpAPI. Use for award-vs-cash comparison, hotel search, and destination discovery.

Overview

Publisherborski
Repositorytravel-hacking-toolkit
Skill nameserpapi
Stars
690
Forks
75
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by borski on GitHub. Read the source before you install it.

Installation

Install the Serpapi AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/borski/travel-hacking-toolkit/tree/main/plugins/travel-hacking-toolkit/skills/serpapi
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/borski/travel-hacking-toolkit.git /tmp/travel-hacking-toolkit
mkdir -p .claude/skills
cp -r /tmp/travel-hacking-toolkit/plugins/travel-hacking-toolkit/skills/serpapi .claude/skills/serpapi
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Serpapi in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Serpapi on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Serpapi is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

SerpAPI Skill

Scrape Google Flights, Google Hotels, and Google Travel Explore via SerpAPI. Provides cash flight prices (for Chase/Amex portal comparison), hotel pricing, and destination discovery.

Source: serpapi.com — Free tier available, paid plans for higher volume.

Authentication

SERPAPI_API_KEY is set in .env. All requests use api_key query parameter.

API Base

https://serpapi.com/search

Google Flights (Cash Prices)

Search for flight prices and schedules. Essential for comparing: "Is 88,000 United miles better than paying $900 cash through the Chase portal?" (Chase portal pricing is now dynamic via Points Boost, ~1.5-2.0 cpp on select bookings; verify the actual quote.)

One-Way Search

bash
curl -s "https://serpapi.com/search?engine=google_flights&departure_id=SFO&arrival_id=NRT&outbound_date=2026-08-10&type=2&adults=2&travel_class=1&currency=USD&stops=2&sort_by=2&api_key=$SERPAPI_API_KEY" | jq '{best: [.best_flights[]? | {price: .price, duration: .total_duration, stops: (.layovers | length), flights: [.flights[] | {from: .departure_airport.id, to: .arrival_airport.id, airline: .airline, flight: .flight_number, depart: .departure_airport.time, arrive: .arrival_airport.time}]}], price_insights: .price_insights}'

Parameters

ParamRequiredDescription
engineYesgoogle_flights
departure_idYesAirport code(s), comma-separated: SFO,PDX
arrival_idYesAirport code(s), comma-separated: NRT,HND
outbound_dateYesYYYY-MM-DD
return_dateRound tripYYYY-MM-DD (required if type=1)
typeNo1 = round trip (default), 2 = one way, 3 = multi-city
adultsNoDefault 1
childrenNoDefault 0
travel_classNo1 = economy, 2 = premium economy, 3 = business, 4 = first
stopsNo0 = any, 1 = nonstop, 2 = 1 stop or fewer, 3 = 2 stops or fewer
sort_byNo1 = top flights, 2 = price, 3 = departure, 4 = arrival, 5 = duration
include_airlinesNoIATA codes: SK,KL,UA or alliances: STAR_ALLIANCE,SKYTEAM,ONEWORLD
max_priceNoMaximum ticket price in USD
max_durationNoMaximum flight duration in minutes
bagsNoNumber of carry-on bags
deep_searchNotrue for browser-identical results (slower)
currencyNoDefault USD

Multi-City (Open Jaw)

Use type=3 with multi_city_json:

bash
curl -s "https://serpapi.com/search?engine=google_flights&type=3&multi_city_json=%5B%7B%22departure_id%22%3A%22SFO%22%2C%22arrival_id%22%3A%22NRT%22%2C%22date%22%3A%222026-08-05%22%7D%2C%7B%22departure_id%22%3A%22ICN%22%2C%22arrival_id%22%3A%22SFO%22%2C%22date%22%3A%222026-08-26%22%7D%5D&adults=2&travel_class=1&currency=USD&api_key=$SERPAPI_API_KEY" | jq '.'

The JSON value for multi_city_json is URL-encoded. Decoded:

json
[{"departure_id":"SFO","arrival_id":"NRT","date":"2026-08-05"},{"departure_id":"ICN","arrival_id":"SFO","date":"2026-08-26"}]

Response Fields

Each flight in best_flights[] and other_flights[]:

FieldDescription
priceCash price in USD
total_durationTotal minutes
flights[]Array of legs with airline, flight number, times, airplane, legroom
layovers[]Array with duration and airport for each connection
departure_tokenToken to get return flight options (round trip)
booking_tokenToken to get booking options

price_insights includes lowest_price, price_level (low/typical/high), and typical_price_range.

Portal Comparison Math

Chase Sapphire Reserve: dynamic Points Boost pricing, typically 1.5-2.0 cpp on select bookings (not a fixed floor). Verify actual portal price for the specific booking. If cash price is $900, portal cost = 60,000 UR points. If award price is 88,000 United miles, cash via portal is better value.

Amex: typically 1 cpp via portal (worse value, use transfers instead).

Capital One Venture X: 1 cpp via portal, but transfer partners can be better.

Google Hotels

Search hotels and vacation rentals with pricing from multiple OTAs.

bash
curl -s "https://serpapi.com/search?engine=google_hotels&q=hotels+Tokyo+Japan&check_in_date=2026-08-10&check_out_date=2026-08-13&adults=2&currency=USD&sort_by=3&api_key=$SERPAPI_API_KEY" | jq '[.properties[]? | {name: .name, type: .type, rating: .overall_rating, reviews: .reviews, price: .rate_per_night.extracted_lowest, class: .extracted_hotel_class, amenities: .amenities}] | .[0:10]'

Parameters

ParamRequiredDescription
engineYesgoogle_hotels
qYesSearch query: hotels Tokyo Japan
check_in_dateYesYYYY-MM-DD
check_out_dateYesYYYY-MM-DD
adultsNoDefault 2
childrenNoDefault 0
sort_byNo3 = lowest price, 8 = highest rating, 13 = most reviewed
min_price / max_priceNoPrice range filter
hotel_classNo2,3,4,5 (comma-separated)
ratingNo7 = 3.5+, 8 = 4.0+, 9 = 4.5+
vacation_rentalsNoSet to true for Airbnb-style results
property_tokenNoGet details for a specific property

Google Travel Explore

Discover destinations and cheapest flights from an origin. Great for "where can I fly cheaply in August?"

bash
curl -s "https://serpapi.com/search?engine=google_travel_explore&departure_id=SFO&outbound_date=2026-08-05&return_date=2026-08-26&adults=2&travel_class=1&currency=USD&api_key=$SERPAPI_API_KEY" | jq '[.destinations[]? | {name: .name, country: .country, airport: .destination_airport.code, price: .flight_price, duration: .flight_duration, stops: .number_of_stops, airline: .airline}] | .[0:15]'

Parameters

ParamRequiredDescription
engineYesgoogle_travel_explore
departure_idYesAirport code or kgmid
arrival_idNoSpecific destination
arrival_area_idNoRegion kgmid (e.g., /m/02j9z for Europe)
outbound_dateNoYYYY-MM-DD
return_dateNoYYYY-MM-DD
monthNo1-12 for flexible dates
travel_durationNo1 = weekend, 2 = 1 week, 3 = 2 weeks
interestNo/g/11bc58l13w = Outdoors, /m/0b3yr = Beaches
include_airlinesNoFilter by airline or alliance
max_priceNoMaximum price
stopsNoSame as Google Flights

Workflow: Compare Award vs Cash

  1. Search cash prices on Google Flights via SerpAPI
  2. Estimate portal cost. Chase uses dynamic "Points Boost" pricing (~1.5-2.0cpp on select bookings, not a flat rate). Amex/Capital One ~1.0cpp. For rough math, run the actual portal quote against the cash price; do not assume a flat cpp on Chase.
  3. Compare with award price from Seats.aero
  4. Lower number wins (accounting for the value you place on each currency)

Notes

  • Cached results are free (1hr cache). Set no_cache=true to force fresh.
  • deep_search=true gives browser-identical results but is slower.
  • Results include price_insights with historical price data and trend.
  • Multi-city supports open jaw itineraries natively.
  • Hotels support vacation rentals mode for Airbnb-style results.

Frequently asked questions

What does the Serpapi AI skill do?

Google Flights cash prices, Google Hotels, and Google Travel Explore via SerpAPI. Use for award-vs-cash comparison, hotel search, and destination discovery.

Why use Serpapi on TypingMind?

Because you install it once and use it with any model. Serpapi is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Serpapi in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/borski/travel-hacking-toolkit/tree/main/plugins/travel-hacking-toolkit/skills/serpapi. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Serpapi?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Serpapi?

As many as you like. As long as a model supports skills, you can use Serpapi with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Serpapi AI skill free?

Yes. It is published on GitHub by borski under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇