# Get cheapest fare by date (v1)

Get the cheapest fare for each departure date in a window of up to 93 days, one way or for a fixed trip length.

- Platform: Google Flights
- Request: `GET https://api.toolzerhub.com/v1/google-flights/price-calendar`
- Auth: `x-api-key` header
- Cost: 1 credit per successful request. Failed requests are not billed.
- Page: https://docs.toolzerhub.com/reference/google-flights/prices/get-google-flights-price-calendar

| Parameter | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| `origin` | query | yes | string | Departure airport IATA code(s). |
| `destination` | query | yes | string | Arrival airport IATA code(s). |
| `start_date` | query | yes | string | First departure date. |
| `end_date` | query | yes | string | Last departure date, at most 92 days after start_date. |
| `trip_length_days` | query | no | integer | Nights away. Omit for one-way fares; set it for round-trip fares that return this many days after each departure. |
| `adults` | query | no | integer |  Default: 1. |
| `children` | query | no | integer |  Default: 0. |
| `infants_in_seat` | query | no | integer |  Default: 0. |
| `infants_on_lap` | query | no | integer | At most one per adult. Default: 0. |
| `cabin` | query | no | enum: economy, premium_economy, business, first |  Default: economy. |
| `stops` | query | no | enum: any, nonstop, one_stop, two_stops | Most stops allowed: one_stop means one stop or fewer, two_stops two or fewer. Default: any. |
| `currency` | query | no | string | ISO 4217 currency for prices. Default: USD. |

## Example request

```bash
curl "https://api.toolzerhub.com/v1/google-flights/price-calendar?origin=<origin>&destination=<destination>&start_date=<start_date>&end_date=<end_date>" \
  -H "x-api-key: $TOOLZERHUB_API_KEY"
```

Success responses are wrapped as `{ "data": ... }`. Errors return `{ "error": { "code", "status", "message", "retryable", "details" } }`. See https://docs.toolzerhub.com/docs/responses-and-errors.
