# Air Premia — 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.

> Search for the lowest available fares across Air Premia flight routes and discover current promotions to find the best deals on your next flight. Browse real-time pricing for specific sectors and stay updated on limited-time offers to maximize your savings.

**Category:** Travel | **Website:** [www.airpremia.com/](https://www.airpremia.com/) | **Docs:** [parse.bot/marketplace/a5b6f46c-ed6e-4920-82f9-2819898afe97/airpremia-com-api](https://parse.bot/marketplace/a5b6f46c-ed6e-4920-82f9-2819898afe97/airpremia-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-airpremia-com-api-a5b6f46c/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_sector_fares

Retrieve the lowest daily fare calendar for a given Air Premia route (origin-destination pair) over a date range. Returns per-day availability with fares broken down by cabin class (Economy and Premium Economy), including base fare, taxes, and total. Dates with no availability are marked as sold out. The API requires end_date to align to the last day of its month; any provided end_date is automatically snapped to the month's end. Supports a maximum date span of approximately two months from today.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `adults` | string | No | Number of adult passengers. |
| `begin_date` | string | No | Start date for fare search in YYYY-MM-DD format. Must be today or later; dates in the past are automatically adjusted to today. Defaults to today. |
| `children` | string | No | Number of child passengers. |
| `destination` | string | No | 3-letter IATA airport code for arrival (e.g. LAX, NRT, HKG, SFO, EWR, HNL, BKK, IAD). |
| `end_date` | string | No | End date for fare search in YYYY-MM-DD format. Automatically snapped to the last day of the given month. Defaults to end of next month. |
| `infants` | string | No | Number of infant passengers. |
| `origin` | string | No | 3-letter IATA airport code for departure (e.g. ICN, LAX, NRT). |
| `trip_type` | string | No | Trip type for fare lookup. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-airpremia-com-api-a5b6f46c/get_sector_fares \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"adults":"<string>","begin_date":"<string>","children":"<string>","destination":"<string>","end_date":"<string>","infants":"<string>","origin":"<string>","trip_type":"<string>"}'
```

### list_promotions

List Air Premia promotional events and deals with pagination. Returns active and past promotions including discount campaigns, credit card partnerships, and route-specific fare sales. Results are auto-iterated across pages.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page` | integer | No | Page number for pagination (1-based). |
| `size` | integer | No | Number of promotions per page. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-airpremia-com-api-a5b6f46c/list_promotions \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"page":"<integer>","size":"<integer>"}'
```
