Flight Tickets
Search available ticket options for a city pair. Results are sorted by price (cheapest first) and cached for 1 hour. Prices are returned in USD with original currency metadata when the quoted currency differs.
Each itinerary is a complete journey option from origin to destination, possibly with connections. Results include airline and flight number per leg, departure/arrival airports and local times, leg duration, stop count, and layover wait times at connecting airports.
Important: This endpoint expects IATA 3-letter airport codes (LHR, JFK, CDG) — not ICAO. Resolve codes via Airport Search first.
Request
Requirements
x-api-key on every request (direct subscription). Learn more →https://data.skylinkapi.com/v3.1/tickets/search| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
origin | string | Yes | - | Origin airport IATA code, e.g. LHR |
destination | string | Yes | - | Destination airport IATA code, e.g. JFK |
date | string (date) | No | 7 days ahead | Travel date YYYY-MM-DD |
passengers | integer | No | 1 | Passenger count (1–9) |
Response
{
"origin": "LHR",
"destination": "JFK",
"date": "2026-05-01",
"passengers": 1,
"count": 2,
"flights": [
{
"price_usd": 542.0,
"original_price": 498.0,
"original_currency": "EUR",
"total_duration_min": 465,
"stops": 0,
"legs": [
{
"flight_number": "BA117",
"airline": "British Airways",
"airline_code": "BA",
"departure_airport": "LHR",
"departure_airport_name": "London Heathrow Airport",
"arrival_airport": "JFK",
"arrival_airport_name": "John F. Kennedy International Airport",
"departure_time": "09:00",
"arrival_time": "11:45",
"departure_datetime": "2026-05-01T09:00:00",
"arrival_datetime": "2026-05-01T11:45:00",
"duration_min": 465
}
]
},
{
"price_usd": 398.0,
"original_price": 367.0,
"original_currency": "EUR",
"total_duration_min": 680,
"stops": 1,
"legs": [
{
"flight_number": "IB3163",
"airline": "Iberia",
"airline_code": "IB",
"departure_airport": "LHR",
"departure_airport_name": "London Heathrow Airport",
"arrival_airport": "MAD",
"arrival_airport_name": "Adolfo Suárez Madrid–Barajas Airport",
"departure_time": "07:15",
"arrival_time": "10:30",
"departure_datetime": "2026-05-01T07:15:00",
"arrival_datetime": "2026-05-01T10:30:00",
"duration_min": 135
},
{
"flight_number": "IB6251",
"airline": "Iberia",
"airline_code": "IB",
"departure_airport": "MAD",
"departure_airport_name": "Adolfo Suárez Madrid–Barajas Airport",
"arrival_airport": "JFK",
"arrival_airport_name": "John F. Kennedy International Airport",
"departure_time": "13:05",
"arrival_time": "16:15",
"departure_datetime": "2026-05-01T13:05:00",
"arrival_datetime": "2026-05-01T16:15:00",
"duration_min": 490
}
],
"layovers": [
{
"airport": "MAD",
"airport_name": "Adolfo Suárez Madrid–Barajas Airport",
"duration_min": 155
}
]
}
]
}Top-level fields
| Field | Type | Required | Description |
|---|---|---|---|
origin | string | Yes | Query origin IATA |
destination | string | Yes | Query destination IATA |
date | string | Yes | Travel date used for the search |
passengers | integer | Yes | Passenger count |
count | integer | Yes | Number of itineraries in flights |
flights | array | Yes | Price-sorted options (may be empty when no availability) |
Important: count: 0 with flights: [] is a valid response — show a no-availability state rather than treating it as an error.
Itinerary (flights[])
| Field | Type | Required | Null? | Description |
|---|---|---|---|---|
price_usd | number | Yes | Never | Total price in USD |
original_price | number | Yes | Never | Source quote before USD conversion |
original_currency | string | Yes | Never | ISO currency of original_price, e.g. EUR |
total_duration_min | integer | Yes | Never | Door-to-door minutes including layovers |
stops | integer | Yes | Never | Number of connections (0 = nonstop) |
legs | array | Yes | Never | Operating segments in order |
layovers | array | No | Yes | Present when stops > 0 |
Leg (legs[])
| Field | Type | Required | Description |
|---|---|---|---|
flight_number | string | Yes | Marketing flight number |
airline | string | Yes | Airline display name |
airline_code | string | Yes | IATA airline code |
departure_airport | string | Yes | Departure IATA |
departure_airport_name | string | Yes | Departure airport name |
arrival_airport | string | Yes | Arrival IATA |
arrival_airport_name | string | Yes | Arrival airport name |
departure_time | string | Yes | Local departure time HH:MM |
arrival_time | string | Yes | Local arrival time HH:MM |
departure_datetime | string | Yes | ISO local departure datetime |
arrival_datetime | string | Yes | ISO local arrival datetime |
duration_min | integer | Yes | Leg block time in minutes |
Layover (layovers[])
| Field | Type | Required | Description |
|---|---|---|---|
airport | string | Yes | Connection airport IATA |
airport_name | string | Yes | Connection airport name |
duration_min | integer | Yes | Ground time before next leg |
Client types
"""Flight ticket search models for /tickets/search."""from __future__ import annotationsfrom dataclasses import dataclass@dataclassclass TicketLeg: flight_number: str airline: str airline_code: str departure_airport: str departure_airport_name: str arrival_airport: str arrival_airport_name: str departure_time: str arrival_time: str departure_datetime: str arrival_datetime: str duration_min: int@dataclassclass TicketItinerary: price_usd: float original_price: float original_currency: str total_duration_min: int stops: int legs: list[TicketLeg]@dataclassclass TicketSearchResponse: origin: str destination: str date: str passengers: int count: int flights: list[TicketItinerary]Integration
Ticket search UIs typically debounce airport selection and cache responses per (origin, destination, date, passengers) tuple for up to an hour. The example below fetches results, maps the cheapest option into a card model, and handles empty flights arrays gracefully.
import osfrom dataclasses import dataclassimport requestsBASE = "https://data.skylinkapi.com/v3.1"HEADERS = { "x-api-key": os.getenv("SKYLINK_API_KEY", "YOUR_API_KEY")}@dataclassclass TicketOption: price_usd: float stops: int total_duration_min: int first_flight: str | Nonedef search_tickets( *, origin: str, destination: str, date: str | None = None, passengers: int = 1,) -> dict: """Search available flight tickets for a city pair.""" params: dict[str, str | int] = { "origin": origin.upper(), "destination": destination.upper(), "passengers": passengers, } if date: params["date"] = date r = requests.get(f"{BASE}/tickets/search", headers=HEADERS, params=params, timeout=(10, 30)) r.raise_for_status() return r.json()def cheapest_ticket(origin: str, destination: str, *, date: str | None = None) -> TicketOption | None: data = search_tickets(origin=origin, destination=destination, date=date) flights = data.get("flights") or [] if not flights: return None best = flights[0] legs = best.get("legs") or [] first = legs[0]["flight_number"] if legs else None return TicketOption( price_usd=float(best["price_usd"]), stops=int(best["stops"]), total_duration_min=int(best["total_duration_min"]), first_flight=first, )if __name__ == "__main__": import json data = search_tickets(origin="JFK", destination="LAX") print(json.dumps({"count": data.get("count"), "origin": data.get("origin")}, indent=2, default=str))Implementation notes
Important: Quotes are indicative market snapshots, not live airline inventory. Disclose in passenger-facing UI that prices may change at booking time.
For real-time status on a booked flight, use Flight Status.
Error responses
For shared platform errors, see Error Handling. Endpoint-specific behavior:
422 — invalid parameters
Returned when origin/destination are missing or fail validation.
Integration guides
| Guide | Covers |
|---|---|
| Ticket search | Cheapest vs fastest, itineraries, multi-pax |
| Error handling | Empty results, IATA codes, indicative pricing |
| Caching & monitoring | 1 h cache key and debounce |
Your SkyLink licence key, for keys bought direct from skylinkapi.com.
In: header
Query Parameters
Origin airport IATA code (e.g. 'LHR')
Destination airport IATA code (e.g. 'JFK')
Travel date (YYYY-MM-DD). Defaults to 7 days from today.
Number of passengers (default 1, max 9)
11 <= value <= 9Response Body
application/json
application/json
curl -X GET "https://data.skylinkapi.com/v3.1/tickets/search?origin=string&destination=string"{
"origin": "LHR",
"destination": "JFK",
"date": "2026-05-01",
"passengers": 1,
"count": 3,
"flights": [
{
"price_usd": 542,
"original_price": 498,
"original_currency": "EUR",
"total_duration_min": 465,
"stops": 0,
"legs": [
{
"flight_number": "BA117",
"airline": "British Airways",
"airline_code": "BA",
"departure_airport": "LHR",
"departure_airport_name": "London Heathrow Airport",
"arrival_airport": "JFK",
"arrival_airport_name": "John F Kennedy International Airport",
"departure_time": "09:00",
"arrival_time": "11:45",
"departure_datetime": "2026-05-01T09:00:00",
"arrival_datetime": "2026-05-01T11:45:00",
"duration_min": 465
}
]
},
{
"price_usd": 398,
"original_price": 367,
"original_currency": "EUR",
"total_duration_min": 680,
"stops": 1,
"legs": [
{
"flight_number": "IB3163",
"airline": "Iberia",
"airline_code": "IB",
"departure_airport": "LHR",
"departure_airport_name": "London Heathrow Airport",
"arrival_airport": "MAD",
"arrival_airport_name": "Adolfo Suárez Madrid–Barajas Airport",
"departure_time": "07:15",
"arrival_time": "10:30",
"departure_datetime": "2026-05-01T07:15:00",
"arrival_datetime": "2026-05-01T10:30:00",
"duration_min": 135
},
{
"flight_number": "IB6251",
"airline": "Iberia",
"airline_code": "IB",
"departure_airport": "MAD",
"departure_airport_name": "Adolfo Suárez Madrid–Barajas Airport",
"arrival_airport": "JFK",
"arrival_airport_name": "John F Kennedy International Airport",
"departure_time": "13:05",
"arrival_time": "16:15",
"departure_datetime": "2026-05-01T13:05:00",
"arrival_datetime": "2026-05-01T16:15:00",
"duration_min": 490
}
],
"layovers": [
{
"airport": "MAD",
"airport_name": "Adolfo Suárez Madrid–Barajas Airport",
"duration_min": 155
}
]
}
]
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}