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

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/credits/ceair/`
**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

### 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/credits/ceair/find-cheapest-day \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/ceair/get-cities \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/ceair/get-flight-status \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/ceair/search-flights \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"adult_num":"<integer>","arr_city":"<string>","dep_city":"<string>","dep_date":"<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.