# Kayak — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Access Kayak flight data including price prediction calendars, nearby airport lookups, and popular destination suggestions. Find optimal booking windows across ~300 days of pricing data, discover alternative airports near any location, and explore top destinations from any origin.

**Category:** Travel | **Website:** [kayak.com/](https://kayak.com/) | **Docs:** [parse.bot/marketplace/878059f2-450d-4b6c-a308-ce867410ae42/kayak-com-api](https://parse.bot/marketplace/878059f2-450d-4b6c-a308-ce867410ae42/kayak-com-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-kayak-com-api-878059f2/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_destinations

Get popular flight destinations from a given origin airport. Returns destination suggestions with airport details, coordinates, and location information. Results are personalized to the origin and ranked by popularity.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `limit` | integer | No | Maximum number of destinations to return (max 50) |
| `origin` | string | Yes | Origin airport code (e.g., JFK, WAS, SFO) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-kayak-com-api-878059f2/get_destinations \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"limit":"<integer>","origin":"<string>"}'
```

### get_nearby_airports

Get nearby airports for a given airport code. Returns alternative airports within proximity, useful for finding cheaper flights from nearby locations. Response includes distance, popularity, and display information for each nearby airport.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `code` | string | Yes | Airport or city code to find nearby airports for (e.g., LAX, WAS, ORD) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-kayak-com-api-878059f2/get_nearby_airports \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"code":"<string>"}'
```

### get_price_calendar

Get flight price prediction calendar for a route. Returns approximately 300 days of average prices with color-coded price levels (green=cheap, orange=moderate, red=expensive) to help find the cheapest travel dates. Pagination is not applicable; the full calendar is returned in a single response.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `destination` | string | Yes | Destination airport or city code (e.g., LAX, MIA, LHR) |
| `origin` | string | Yes | Origin airport or city code (e.g., WAS, JFK, LAX) |
| `trip_type` | string | No | Trip type: 'roundTrip' or 'oneWay' |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-kayak-com-api-878059f2/get_price_calendar \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"destination":"<string>","origin":"<string>","trip_type":"<string>"}'
```
