canonical: https://jentic.com/apis/serpapi/serpapi-travel

# SerpApi Travel APIs

The SerpApi Travel APIs return Google Flights and Google Hotels search results as structured JSON. A flight search takes departure_id and arrival_id airport codes, an outbound_date, and filters such as travel_class, stops, bags, max_price, and include_airlines, and returns itineraries with prices, durations, airlines, layovers, carbon emissions, and booking tokens. A hotel search takes a q location, check_in_date, and check_out_date, filters by price, rating, hotel_class, free_cancellation, or vacation_rentals, and returns properties with rates, ratings, amenities, and location data.

## For AI agents

Search Google Flights for itineraries and prices between two airports, and Google Hotels for hotels or vacation rentals with rates, ratings, and amenities, returned as JSON.

## Scope

Does not book flights, reserve hotels, or process travel payments. Use for searching Google Flights and Google Hotels results only.

## Capabilities

- Search Google Flights between departure_id and arrival_id airports for an outbound_date and optional return_date
- Filter flights by travel_class, stops, bags, max_price, max_duration, and included or excluded airlines
- Sort flight results by price, departure time, duration, or emissions with sort_by
- Follow a departure_token to pick a return leg and a booking_token to get booking options
- Search Google Hotels for a q location between check_in_date and check_out_date
- Filter hotels by min_price, max_price, rating, hotel_class, free_cancellation, and eco_certified
- Switch hotel search to vacation rentals with bedrooms and bathrooms filters

## Use cases

### AI Travel Planning Agent Through Jentic

A trip-planning agent connected through Jentic can pull live flight and hotel options without anyone hand-wiring SerpApi's api_key query parameter. It searches by intent, receives searchFlights or searchHotels with its input schema, and fills in airports, dates, and filters from the user's request. The JSON results let it present ranked options rather than links.

Example prompt: Search Jentic for 'search flights between two airports', load searchFlights, and call it with engine 'google_flights', departure_id 'DUB', arrival_id 'JFK', outbound_date '2027-03-12', type 2, and stops 1

### Fare Comparison and Filtering

Travellers want the trade-off between price, stops, and cabin. The flight search accepts travel_class, stops, bags, max_price, and max_duration, and sort_by orders results by price, duration, or emissions, so an agent can show the cheapest nonstop or the lowest-emission option. Setting deep_search to true returns results matching what Google Flights shows in the browser.

Example prompt: Call GET /search with engine 'google_flights', departure_id 'LHR', arrival_id 'HND', outbound_date '2027-01-10', return_date '2027-01-20', travel_class 3, and sort_by 2

### Hotel and Vacation Rental Shortlists

Accommodation searches need dates, a place, and a few hard requirements. The hotel search takes q, check_in_date, and check_out_date, with adults, children, and children_ages for party size, and narrows by rating, hotel_class, free_cancellation, and price. Setting vacation_rentals switches to rentals, where bedrooms and bathrooms filters apply.

Example prompt: Call the hotel search with engine 'google_hotels', q 'Lisbon', check_in_date '2027-05-02', check_out_date '2027-05-05', adults 2, rating 9, and free_cancellation true

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | `/search` | Search Google Flights |
| GET | `/search?engine=google_hotels` | Search Google Hotels |

## Key resources

- **Google Flights search** — Itineraries with prices, durations, airlines, layovers, emissions, and booking tokens
- **Google Hotels search** — Hotels and vacation rentals with rates, ratings, amenities, and location data

## AI readiness

This API is usable in Jentic One now. Its AI-readiness score against Jentic's framework shows where it stands today and where improvements would make it even easier for agents to use.

- **Score:** 45 / 100
- **Maturity:** Foundational
- **Dimensions:**
  - Foundational Compliance: 74 / 100
  - Developer Experience & Jentic Compatibility: 63 / 100
  - AI-Readiness & Agent Experience: 45 / 100
  - Agent Usability: 94 / 100
  - Security: 15 / 100
  - AI Discoverability: 63 / 100
- **View full report:** https://jentic.com/apis/serpapi/serpapi-travel/scorecard
- **How the score is calculated:** https://docs.jentic.com/reference/api-readiness-framework/overview/
- **More about the dimensions:** https://docs.jentic.com/reference/api-readiness-framework/specification/#dimensional-model-overview

### Score it yourself

Every API in the directory is allowlisted, so you can re-score it with no key required.

- **Score your own API:** https://jentic.com/scorecard.md
- **Scoring CLI agent skill:** https://github.com/jentic/jentic-api-scorecard/blob/main/skills/jentic-api-scorecard/SKILL.md

```sh
npx @jentic/api-scorecard-cli score <openapi-url>
```

## Why Jentic

- **Setup:** Wiring SerpApi Travel by hand means appending its api_key query parameter to each call, setting the right engine value for flights or hotels, and decoding integer enums such as travel_class and sort_by yourself. Through Jentic you install once, import it from the API Directory, store the key once, and your agent calls it.
- **Permission scoping:** Flight and hotel search share the /search path and differ only by the engine query parameter, so a rule bounds whether your agent may call this API rather than which engine. Both operations are read-only searches, so the agent cannot book or pay through them.
- **Credential handling:** Your SerpApi key is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'search flights between two airports' or 'find hotels for my dates', and Jentic returns the matching SerpApi operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **SerpApi Search API** — SerpApi's general Google and multi-engine search results
- **Duffel API** — Flight search and booking directly with airlines
- **Kiwi.com Tequila API** — Flight search and virtual interlining itineraries
- **Booking.com API** — Accommodation search and availability from Booking.com

## FAQ

### Is there a SerpApi Travel MCP server?

You don't need an MCP server to give your agent SerpApi's flight and hotel search. Jentic connects it directly from the API Directory: import it, store your api_key once, and your agent calls Google Flights or Google Hotels search when a trip question comes up.

### Can I limit what my agent is allowed to do with the SerpApi Travel APIs?

Yes, at the API level. Both searches are read-only GET calls on /search, so the practical rule is whether your agent may call SerpApi Travel at all: allow it for your trip-planning agent and leave it out for other agents, and every search it runs is logged by your self-hosted instance. Neither operation books or pays for travel.

### What authentication do the SerpApi Travel APIs use?

Per the OpenAPI spec, SerpApi authenticates with a private API key passed as the api_key query parameter on every search. Through Jentic the key is stored encrypted by your own Jentic One instance and appended at call time, so it never appears in the agent's prompt or in URLs it can see.

### Can I book a flight with the SerpApi Travel APIs?

No. The flight search returns itineraries and a booking_token; passing booking_token back to the search returns booking options from Google Flights, but the purchase happens with the airline or agent, not through SerpApi.

### What are the rate limits for the SerpApi Travel APIs?

The OpenAPI spec does not state rate limits. SerpApi plans are metered by monthly searches; check https://serpapi.com/pricing for current limits.

### How do I search for hotels through Jentic?

Search Jentic for 'find hotels for my dates' and it returns searchHotels with its input schema. Supply engine google_hotels, q (the location), check_in_date, and check_out_date, which are all required, plus optional filters such as hotel_class or max_price. To run it on your own infrastructure, install Jentic One from its GitHub repo.
