# Ceair — 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 and book China Eastern Airlines flights, check real-time flight status, and look up airport and city information all in one place. Get instant access to flight schedules, pricing, and departure/arrival updates for your travel planning.

**Category:** Travel | **Website:** [m.ceair.com/](https://m.ceair.com/) | **Docs:** [parse.bot/marketplace/e56d0c5f-d677-44d7-a102-cc2c440589f1/m-ceair-com-api](https://parse.bot/marketplace/e56d0c5f-d677-44d7-a102-cc2c440589f1/m-ceair-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-m-ceair-com-api-e56d0c5f/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### find_cheapest_day

Search all flights across a date window (center_date minus days_before through center_date plus days_after) and return the single cheapest flight per day, sorted ascending by price so the best deal is first. Makes one upstream search per day in the window; total days = days_before + days_after + 1. Days with no priced flights are omitted.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `adult_num` | integer | No | Number of adult passengers |
| `arr_city` | string | Yes | Arrival city code (e.g., BJS for Beijing). Use get_cities to find valid codes. |
| `center_date` | string | Yes | Center date of the search window in YYYY-MM-DD format |
| `days_after` | integer | No | Number of days after center_date to include in the search window |
| `days_before` | integer | No | Number of days before center_date to include in the search window |
| `dep_city` | string | Yes | Departure city code (e.g., SHA for Shanghai). Use get_cities to find valid codes. |
| `trip_type` | string | No | Trip type: OW (one-way) or RT (round-trip) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-m-ceair-com-api-e56d0c5f/find_cheapest_day \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"adult_num":"<integer>","arr_city":"<string>","center_date":"<string>","days_after":"<integer>","days_before":"<integer>","dep_city":"<string>","trip_type":"<string>"}'
```

### get_cities

Fetch a comprehensive list of all supported cities and airports, organized into domestic and international categories. Each city includes its code, name, country, region classification, and associated airports. Use this to look up valid city codes for search_flights.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-m-ceair-com-api-e56d0c5f/get_cities \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_flight_status

Get real-time flight status by flight number and date. Returns detailed flight information including departure/arrival times, terminals, aircraft type, weather conditions at both airports, and current status (e.g., UNFLY, DEPT, ARR). Covers China Eastern (MU) flights.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `carrier` | string | No | Airline carrier code (e.g., MU for China Eastern) |
| `date` | string | Yes | Flight date in YYYY-MM-DD format |
| `flight_no` | string | Yes | Flight number digits without carrier prefix (e.g., 5137) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-m-ceair-com-api-e56d0c5f/get_flight_status \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"carrier":"<string>","date":"<string>","flight_no":"<string>"}'
```

### search_flights

Search for available flights between departure and arrival cities on a specific date. Returns a flat list of flight offers with pricing, cabin classes, schedules, and aircraft details. Uses city codes (e.g., SHA for Shanghai, BJS for Beijing). Use get_cities to look up valid city codes. Results include the lowest available price per flight across all cabin classes.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `adult_num` | integer | No | Number of adult passengers |
| `arr_city` | string | Yes | Arrival city code (e.g., BJS for Beijing, HGH for Hangzhou). Use get_cities to find valid codes. |
| `dep_city` | string | Yes | Departure city code (e.g., SHA for Shanghai, CKG for Chongqing). Use get_cities to find valid codes. |
| `dep_date` | string | Yes | Departure date in YYYY-MM-DD format (must be a future date) |
| `trip_type` | string | No | Trip type: OW (one-way) or RT (round-trip) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-m-ceair-com-api-e56d0c5f/search_flights \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"adult_num":"<integer>","arr_city":"<string>","dep_city":"<string>","dep_date":"<string>","trip_type":"<string>"}'
```
