Flights API: requests open. How it works

Flights API reference

Flights API documentation

One standard API for every flight, whichever airline system it comes from. Every active account gets a sandbox key with dummy data and the same endpoints and format as production, so you can build your integration today.

Overview

The IATA.co flights API is one simple, standard API for flight search and booking. Behind it, IATA.co aggregates several airline content sources, and every one of them is translated into the same IATA.co standard format: the same fields, the same types, the same ids, whichever airline system a fare comes from. You integrate once; new content sources appear in your results without any change on your side.

Base URL: https://iata.co/api/v1. HTTPS only, JSON in and out (Content-Type: application/json), your API key on every request. Dates are YYYY-MM-DD, times are 24-hour HH:MM local to the airport, prices are decimals in the currency given, durations are whole minutes, airports and airlines are IATA codes.

Sandbox and production

Sandbox key (starts with ia_test_): included with every active IATA.co account, generated on the API access page of your dashboard. It answers every endpoint below with dummy flight data in the standard format and never calls a real airline system. Bookings are fully validated and answered with a test PNR, but nothing is stored, booked or charged. Build and test your whole integration with it.

Production key (starts with ia_live_): issued after your production API access request is paid and approved. Live search and booking are opened for production keys by our team; until then a production key answers /ping and returns 503 live_not_open on the other endpoints. Moving from sandbox to production is a key change, not a code change.

Every response carries an X-Api-Mode header (sandbox or live) and every JSON body a "mode" field, so you always know which environment answered.

Authentication and API keys

Send your key as a bearer token in the Authorization header. A key is shown once, when you generate it; only a SHA-256 hash of it is kept on our side, so store it on your server and never in a browser or mobile app. Generating a new key replaces the previous key of the same kind at once.

A key only works while your IATA.co account is active. If the monthly account fee lapses past its grace period, every request answers 402 account_inactive until it is paid.

GET /api/v1/ping
Authorization: Bearer ia_test_YOUR_SANDBOX_KEY

HTTP/1.1 200 OK
{ "ok": true, "mode": "sandbox",
  "account": { "name": "…", "plan": "active",
    "paid_until": "2026-11-24T10:00:00.000Z" } }

Rate limits

Each key may send 60 requests per minute. Every response carries X-RateLimit-Limit; above the limit you get HTTP 429 rate_limited with a Retry-After header in seconds.

HTTP/1.1 429 Too Many Requests
X-RateLimit-Limit: 60
Retry-After: 60
{ "error": "rate_limited",
  "message": "More than 60 requests in a minute. Retry after 60 seconds." }

The standard flight object

Every fare, from every source, is one flight object. id is ours (flt_…) and is what you book with. price is the total for all passengers. legs holds one leg per direction (one for one-way, two for return); each leg lists its segments, the individual flights, in order. Nothing in it is specific to any airline system, and fields are only ever added, never renamed, within /api/v1.

{ "id": "flt_01",
  "price": 148.2, "currency": "USD",
  "airline": { "code": "EK", "name": "Emirates" },
  "refundable": false,
  "baggage": { "cabin": "7 kg", "checked": "30 kg" },
  "legs": [ {
    "from": "KHI", "to": "DXB", "date": "2026-12-14",
    "depart": "04:15", "arrive": "05:40", "next_day": false,
    "duration_minutes": 145, "stops": 0, "via": [],
    "segments": [ { "airline": "EK", "flight_no": "EK601",
      "from": "KHI", "to": "DXB", "depart": "04:15",
      "arrive": "05:40", "duration_minutes": 145 } ] } ] }

Booking

Book a flight from a search with its search_id and flight_id, a contact, and one passenger per traveller matching the search (adults, then children, then infants, in any order). Names exactly as in the passport, in Latin letters. Ages follow the airline rules on the travel dates (adult 12+, child 2 to 11, infant under 2) and each passport must be valid after the last flight.

Live: the fare is re-priced with the airline first, then the booking is created and its price is taken from your prepaid balance in one step (402 insufficient_balance if it does not cover it; a booking is never charged twice). It starts as "reserved"; our team tickets it and it becomes "issued" with its PNR and ticket numbers. Sandbox: the same validation, answered at once as "issued" with a test PNR; nothing is stored or charged.

POST /api/v1/bookings
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

{ "search_id": "srch_test_…", "flight_id": "flt_01",
  "contact": { "title": "Mrs", "given_name": "Amina",
    "family_name": "Khan", "email": "amina@agency.com",
    "phone_country": "PK", "phone": "3001234567" },
  "passengers": [ { "type": "adult", "title": "Mrs",
    "given_name": "Amina", "family_name": "Khan",
    "nationality": "PK", "birth_date": "1990-06-05",
    "passport_number": "AB1234567",
    "passport_expiry": "2031-01-01" } ],
  "special_requests": "" }

HTTP/1.1 201 Created
{ "mode": "live", "id": "IA-7K2M9QXD", "status": "reserved",
  "payment_status": "paid", "pnr": null, "tickets": [],
  "price": 148.2, "currency": "USD", "flight": { … },
  "passengers": [ … ] }

Booking status

GET /api/v1/bookings/{id} returns a live booking in the same format, so you can check when it is issued and read the PNR and ticket numbers. status is reserved, issued, cancelled or expired. Sandbox bookings are not stored, so this endpoint answers 404 for them.

GET /api/v1/bookings/IA-7K2M9QXD
Authorization: Bearer YOUR_LIVE_KEY

HTTP/1.1 200 OK
{ "mode": "live", "id": "IA-7K2M9QXD", "status": "issued",
  "pnr": "X7K2QM", "tickets": [ { "passenger": 0,
    "number": "176-2345678901" } ], … }

Errors

Errors use standard HTTP status codes and a JSON body with a stable error code and a readable message: 400 invalid_json · 401 missing_api_key, invalid_api_key · 402 account_inactive, insufficient_balance · 404 search_not_found, flight_not_found, booking_not_found, not_found · 409 search_expired, fare_unavailable · 422 invalid_search, invalid_passengers (with a "details" list naming each field) · 429 rate_limited · 503 live_not_open, search_unavailable · 5xx a problem on our side.

HTTP/1.1 422 Unprocessable Entity
{ "error": "invalid_passengers",
  "message": "Some passenger or contact details need fixing. …",
  "details": [ "passengers[0].birth_date: Enter a full date of birth." ] }

Free to join

Your first flight search is a minute away.

Activate your account, top up when you are ready, and build on the sandbox API from day one.

  • Sandbox API included
  • Prepaid balance
  • Bearer keys, server-side only
  • 60 requests a minute per key
Join our WhatsApp group