Ceair APIm.ceair.com ↗
Search China Eastern flights, check real-time MU flight status, and look up city/airport codes via the m.ceair.com API. 3 endpoints, JSON responses.
What is the Ceair API?
The m.ceair.com API exposes 3 endpoints covering China Eastern Airlines flight search, real-time flight status, and city/airport code lookup. Use search_flights to query available routes between city pairs on a given date and get back cabin classes, pricing, and aircraft details. The get_flight_status endpoint returns live departure and arrival times, terminal assignments, weather conditions, and current flight state for MU-operated services.
curl -X POST 'https://api.parse.bot/scraper/43fdabd8-4ad8-451f-94fa-d37591a26ef9/search_flights' \
-H 'X-API-Key: $PARSE_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"arr_city": "BJS",
"dep_city": "SHA",
"dep_date": "2026-07-17",
"adult_num": "1",
"trip_type": "OW"
}'Typed, relational, agent-ready
A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.
- Fully typed · autocompletes
- Objects link to objects
- Typed errors & pagination
Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:
uv add parse-sdk uv run parse init uv run parse add --marketplace m-ceair-com-api
uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
"""Walkthrough: China Eastern Airlines SDK — search flights, check status, browse cities."""
from parse_apis.china_eastern_airlines_api import ChinaEastern, TripType, FlightNotFound
client = ChinaEastern()
# Search one-way flights from Shanghai to Beijing
for offer in client.flightoffers.search(dep_city="SHA", arr_city="BJS", dep_date="2026-06-20", trip_type=TripType.OW, limit=3):
print(offer.flight_no, offer.origin, offer.destination, offer.departure_time, offer.lowest_price)
# Look up real-time flight status
status = client.flightstatuses.get(flight_no="5137", date="2026-06-17")
print(status.flight_no, status.status, status.scheduled_departure, status.aircraft_type)
print(status.departure_terminal, status.route_code, status.tail_number)
# Refresh to get latest status update
updated = status.refresh(date="2026-06-17")
print(updated.status_code, updated.departure_gate, updated.scheduled_arrival)
# Browse available cities to find valid codes for search
city = client.cities.list(limit=1).first()
if city:
print(city.code, city.city_name, city.country_name, city.region)
# Handle case where flight number doesn't exist
try:
client.flightstatuses.get(flight_no="9999", date="2026-06-17")
except FlightNotFound as exc:
print(f"Flight not found: {exc.flight_no}")
print("exercised: flightoffers.search / flightstatuses.get / refresh / cities.list / FlightNotFound")
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.
| Param | Type | Description |
|---|---|---|
| arr_cityrequired | string | Arrival city code (e.g., BJS for Beijing, HGH for Hangzhou). Use get_cities to find valid codes. |
| dep_cityrequired | string | Departure city code (e.g., SHA for Shanghai, CKG for Chongqing). Use get_cities to find valid codes. |
| dep_daterequired | string | Departure date in YYYY-MM-DD format (must be a future date) |
| adult_num | integer | Number of adult passengers |
| trip_type | string | Trip type: OW (one-way) or RT (round-trip) |
{
"type": "object",
"fields": {
"flights": "array of flight offer objects with flight number, airline, origin/destination, schedule, duration, plane type, terminals, and lowest price",
"resultMsg": "string with result message",
"resultCode": "string indicating success (S200) or error code"
},
"sample": {
"data": {
"flights": [
{
"origin": "SHA",
"duration": 135,
"flightNo": "5099",
"planeType": "919",
"cabinClass": "经济舱",
"originName": "虹桥国际机场",
"airlineCode": "MU",
"airlineName": "东方航空",
"arrTerminal": "T2",
"arrivalTime": "09:15",
"depTerminal": "T2",
"destination": "PEK",
"lowestPrice": 500,
"departureDate": "2026-06-20",
"departureTime": "07:00",
"destinationName": "首都国际机场"
}
],
"resultMsg": "请求成功。",
"resultCode": "S200"
},
"status": "success"
}
}About the Ceair API
Flight Search
The search_flights endpoint accepts a required departure city code (dep_city), arrival city code (arr_city), and dep_date in YYYY-MM-DD format. Optional parameters include adult_num and trip_type (either OW for one-way or RT for round-trip). City codes follow China Eastern's internal scheme — for example, SHA for Shanghai and BJS for Beijing — and should be validated first using get_cities. A successful response includes a data object containing a flightItems array with per-segment cabin details, schedules, aircraft type, and productInfos pricing structures. When no flights are available, data returns null and resultCode signals the reason.
Real-Time Flight Status
get_flight_status takes a flight_no (digits only, without the carrier prefix) and a date. The optional carrier parameter defaults to MU (China Eastern). The response returns an aocFlightList array where each object includes scheduled and actual departure/arrival times, gate and terminal assignments, aircraft type, weather conditions at both origin and destination airports, and a status code such as UNFLY (not yet departed), DEPT (departed), or ARR (arrived). This makes the endpoint useful for real-time tracking as well as historical same-day lookups.
City and Airport Reference
get_cities takes no input and returns a data object split into domesticCity and foreignCity sections. Each section contains a hotCityList for frequently used cities and a cityGroup array organized alphabetically. Each city entry includes city codes, airport codes, railway station codes where applicable, and country information. This endpoint serves as the reference layer for building valid inputs to search_flights and scoping coverage before querying routes.
The Ceair API is a managed, monitored endpoint for m.ceair.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when m.ceair.com changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official m.ceair.com API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Display available China Eastern flights and fares between two cities for a flight booking widget
- Build a flight status tracker that shows live MU departure and arrival times with terminal info
- Populate a city/airport picker autocomplete using codes from get_cities
- Alert travelers when a monitored MU flight status changes to DEPT or ARR
- Compare cabin class pricing across multiple China Eastern route options on a given date
- Aggregate weather conditions at departure and arrival airports from flight status responses
- Validate route availability before presenting China Eastern itinerary options to users
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does China Eastern Airlines have an official developer API?+
What flight status values does get_flight_status return, and what do they mean?+
aocFlightList response includes a status field that can be UNFLY (flight has not yet departed), DEPT (departed), or ARR (arrived). Each object also carries scheduled and actual times, terminal and gate details, aircraft type, and weather at both airports, so you can distinguish delay conditions from on-time performance.Does the API cover airlines other than China Eastern?+
search_flights and get_flight_status endpoints are scoped to China Eastern (MU) operated and marketed flights. Codeshare partners may appear within flight results, but the source is China Eastern's own inventory. You can fork this API on Parse and revise it to add endpoints targeting other airline sources if broader carrier coverage is needed.Does the API support round-trip pricing or multi-city itineraries?+
search_flights endpoint supports one-way (OW) and round-trip (RT) queries via the trip_type parameter, returning pricing for those modes. Multi-city or open-jaw itinerary search is not currently covered by the three endpoints. You can fork the API on Parse and revise it to add a multi-city search endpoint if that structure is required.How should I find the right city code before calling search_flights?+
get_cities first — it returns the full list of supported domestic and international cities with their codes, grouped alphabetically and by popularity. Match the city name to its code in the response, then pass that code as dep_city or arr_city in your search_flights request. City codes are not always IATA codes; for example, Shanghai uses SHA and Beijing uses BJS.