# 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 for Locus Pro. Each call burns credits from your workspace balance.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/credits/kayak/`
**Auth:** `Authorization: Bearer <LOCUS_CREDITS_SECRET_KEY>` (an `lcr_` secret key or a scoped `lcac_` agent credential)
**Required header:** `Idempotency-Key: <fresh UUID per call>`. A retry with the same key replays the stored result without a new charge.
**Response:** the provider response after any endpoint-specific normalization. `X-Locus-Credits-Charged` carries the charge and `X-Locus-Credits-Balance` the remaining balance. Insufficient credits return `402` before the provider is called.
**Pricing:** estimated costs below are USD. Locus debits the credit equivalent at your workspace rate.

Full call contract: https://docs.paywithlocus.com/api-reference/introduction

> Using a Pay With Locus wallet key (`claw_` prefix)? Wallet routes are documented separately: https://docs.paywithlocus.com/wrapped-apis/for-agents

## 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/credits/kayak/get-destinations \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/kayak/get-nearby-airports \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/kayak/get-price-calendar \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"destination":"<string>","origin":"<string>","trip_type":"<string>"}'
```

## Next steps

- [All wrapped API providers](https://paywithlocus.com/wapi/index.md): pick another provider.
- [Find and call tools](https://paywithlocus.com/agent/tools.md): price ceilings, async results, and errors.
- [Credits and billing](https://paywithlocus.com/agent/billing.md): what a call costs and how to add credits.
- [Agent docs index](https://paywithlocus.com/agent/index.md): every Locus agent page.