---
title: "SearchAPI.io - Google Flights Deals API"
description: "SearchAPI.io tool searchapi-io-google-flights-deals on looot: input fields, $0.004 per call, output shape, and code to run it with curl, JavaScript or Python."
sidebar:
  hidden: true
---

{/* Generated by scripts/generate-api-reference.mjs from data/api-reference.json. Do not edit. */}

The Google Flights Deals API surfaces cheap round-trip flight deals from a given origin, each ranked by how much cheaper it is than usual for that route, time of year, and trip length. It scrapes the google.com/travel/flights/deals discovery surface. **Note**: `departure_id` is required and selects the origin. The feed is origin-only by design: there is no `arrival_id`, and travel dates cannot be requested, the destinations and each deal's own cheapest dates are what the API returns. For a specific route or dates, use the Google Flights API. By default the API returns the cheapest deals to destinations anywhere. You can narrow that spread in one of two ways, and only one at a time: add a `q` prompt to have Google's AI curate the destinations (e.g. "beaches and islands"), or use the filters (`travel_class`, `stops`, `max_price`, `included_airlines`). Google honors a prompt or the filters, never both, so combining `q` with `max_price`, `included_airlines`, a `stops` other than `any`, a `travel_class` other than `economy`, or a passenger count above its default is rejected with a 400 rather than answered with results the filters were never applied to. Either way, narrowing may return fewer, or occasionally no, deals. Passenger counts (`adults`, `children`, `infants_in_seat`, `infants_on_lap`) scale displayed prices only when combined with a filter; on their own they leave the default deal feed unchanged. `currency` changes displayed prices and `hl` translates destination names/descriptions without changing which deals are returned. `gl` currently has no observable effect beyond being echoed into each deal's `booking_link`. **Cross-linking**: - Use a deal's destination kgmid with the Google Travel Explore Destination API to get detailed flight options for that destination. - Use a deal's destination `name` with the Google Hotels API `q` parameter to search for accommodations. Google Hotels takes free text, not a kgmid. - Use the booking_link (a Google Flights URL) to o

- **Tool id:** `searchapi-io-google-flights-deals`
- **Provider:** [SearchAPI.io](/providers/searchapi-io)
- **Job:** [Google flights deals search](/reference/jobs/search-google-flights-deals) (`search.google-flights-deals`)
- **Price:** $0.004 per call. A call that fails at the provider costs $0.

## Inputs

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `adults` | integer | no |   |
| `children` | integer | no |   |
| `currency` | string | no |   |
| `departure_id` | string | yes |   |
| `engine` | string | no | Fixed to "google_flights_deals" for this endpoint. Example: "google_flights_deals" |
| `gl` | string | no |   |
| `hl` | string | no |   |
| `included_airlines` | string | no |   |
| `infants_in_seat` | integer | no |   |
| `infants_on_lap` | integer | no |   |
| `max_price` | integer | no |   |
| `q` | string | no |   |
| `stops` | string | no |   |
| `travel_class` | string | no |   |

## Output

The run's `result` holds the provider's answer. Signed in, `looot inspect searchapi-io-google-flights-deals` prints its fields.

## Run it

Every call needs your API token in `LOOOT_TOKEN`; [Sign in](/get-started/sign-in#use-the-token-in-scripts-and-agents) shows how to get one. Each run also needs a new idempotency key, so a retry never pays twice. With `wait: 30` the answer comes back inline when the run ends within 30 seconds. Otherwise you get the running run back: poll `GET /v1/runs/<runId>`.

Example input with placeholder values:

<CodeGroup>

```bash curl
curl -X POST "https://api.looot.ai/v1/runs" \
  -H "Authorization: Bearer $LOOOT_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"endpointId":"searchapi-io-google-flights-deals","input":{"departure_id":"<departure_id>","engine":"google_flights_deals"},"wait":30}'
```

```js JavaScript
const response = await fetch("https://api.looot.ai/v1/runs", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.LOOOT_TOKEN}`,
    "Content-Type": "application/json",
    "Idempotency-Key": crypto.randomUUID(),
  },
  body: JSON.stringify({
    endpointId: "searchapi-io-google-flights-deals",
    input: {
      departure_id: "<departure_id>",
      engine: "google_flights_deals",
    },
    wait: 30,
  }),
});
const run = await response.json();
console.log(run.status, run.result);
```

```python Python
import os
import uuid

import requests

response = requests.post(
    "https://api.looot.ai/v1/runs",
    headers={
        "Authorization": f"Bearer {os.environ['LOOOT_TOKEN']}",
        "Idempotency-Key": str(uuid.uuid4()),
    },
    json={
        "endpointId": "searchapi-io-google-flights-deals",
        "input": {
            "departure_id": "<departure_id>",
            "engine": "google_flights_deals",
        },
        "wait": 30,
    },
    timeout=90,
)
run = response.json()
print(run["status"], run.get("result"))
```

</CodeGroup>

To let looot pick among every provider of this job instead, send `job:search.google-flights-deals` as `endpointId`; see [the job page](/reference/jobs/search-google-flights-deals).
