# Emirates — 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.

> Emirates provides 5 callable API endpoints through the Parse marketplace.

**Category:** Travel | **Website:** [emirates.com/](https://emirates.com/) | **Docs:** [parse.bot/marketplace/6d373a79-cea3-41f0-8bf9-f3e093605df7/emirates-com-api](https://parse.bot/marketplace/6d373a79-cea3-41f0-8bf9-f3e093605df7/emirates-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/emirates/`
**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 cheapest flights by month

Find the cheapest flights for a given route and month. Searches a representative date (mid-month) and returns available flights sorted by price with fare details including flight number, duration, and number of stops.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `destination` | string | Yes | Destination airport IATA code (e.g. 'LHR') |
| `month` | integer | No | Month number (1-12). If omitted, uses current month. |
| `origin` | string | Yes | Origin airport IATA code (e.g. 'DXB') |
| `year` | integer | No | Year (e.g. 2026). If omitted, uses current year. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/emirates/get-cheapest-flights-by-month \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"destination":"<string>","month":"<integer>","origin":"<string>","year":"<integer>"}'
```

### Get destinations

Get the full list of all destinations (airports) served by Emirates worldwide. Returns the same structure as search_airports with no filter applied.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/emirates/get-destinations \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Monitor page for link

Poll a page for a specific text string or HTML selector. Useful for monitoring time-sensitive availability on emirates.com pages. Returns whether the specified text was found and a timestamp.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `link_text` | string | No | Text to search for in the page HTML (case-insensitive) |
| `selector` | string | No | HTML string/selector to search for in the page (case-insensitive) |
| `url` | string | Yes | URL of the page to monitor |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/emirates/monitor-page-for-link \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"link_text":"<string>","selector":"<string>","url":"<string>"}'
```

### Search airports

Search for airports served by Emirates by keyword (city, country, or IATA code). Returns matching airports with codes, names, cities, countries and regions. If no query is provided, returns all airports.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | No | Search keyword to filter airports (e.g. 'London', 'LHR', 'United Kingdom'). If omitted, returns all airports. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/emirates/search-airports \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"query":"<string>"}'
```

### Search flights

Search for flights on a specific date. Returns detailed flight options with real-time pricing, fare brands (Flex/FlexPlus), cabin classes, segments, and seat availability. Each result includes full segment details and all available fare options.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `destination` | string | Yes | Destination airport IATA code (e.g. 'LHR') |
| `origin` | string | Yes | Origin airport IATA code (e.g. 'DXB') |
| `start_date` | string | Yes | Flight date in YYYY-MM-DD format (e.g. '2026-07-15'). Must be a future date. |
| `travel_class` | string | No | Cabin class. Accepted values: ECONOMY, PREMIUM_ECONOMY, BUSINESS, FIRST. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/emirates/search-flights \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"destination":"<string>","origin":"<string>","start_date":"<string>","travel_class":"<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.