# 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. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-emirates-com-api-6d373a79/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## 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/parse-emirates-com-api-6d373a79/get_cheapest_flights_by_month \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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/parse-emirates-com-api-6d373a79/get_destinations \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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/parse-emirates-com-api-6d373a79/monitor_page_for_link \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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/parse-emirates-com-api-6d373a79/search_airports \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -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/parse-emirates-com-api-6d373a79/search_flights \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"destination":"<string>","origin":"<string>","start_date":"<string>","travel_class":"<string>"}'
```
