turkishairlines.com APIwww.turkishairlines.com ↗
Search Turkish Airlines flights, check real-time flight status, and look up airport/city codes via 3 structured JSON endpoints.
curl -X GET 'https://api.parse.bot/scraper/0f9ef04a-be71-467a-8675-e23318aa7158/search_locations?query=Istanbul' \ -H 'X-API-Key: $PARSE_API_KEY'
Search for airports and cities served by Turkish Airlines. Returns airport codes, city names, countries, and whether multi-port selections are available.
| Param | Type | Description |
|---|---|---|
| queryrequired | string | Search text for airport or city name (e.g., 'London', 'Istanbul', 'JFK') |
{
"type": "object",
"fields": {
"query": "string — the search text submitted",
"total": "integer — number of matching locations",
"locations": "array of location objects with code, name, type, city, city_code, country, country_code, region, multi_port, domestic, associated_ports"
},
"sample": {
"data": {
"query": "Istanbul",
"total": 3,
"locations": [
{
"city": "Istanbul",
"code": "IST",
"name": "Istanbul",
"type": "city",
"region": "Europe",
"country": "Türkiye",
"domestic": true,
"city_code": "IST",
"multi_port": true,
"country_code": "TR",
"associated_ports": [
"IST",
"SAW"
]
},
{
"city": "Istanbul",
"code": "IST",
"name": "Istanbul Airport",
"type": "port",
"region": "Europe",
"country": "Türkiye",
"domestic": true,
"city_code": "IST",
"multi_port": false,
"country_code": "TR",
"associated_ports": []
}
]
},
"status": "success"
}
}About the turkishairlines.com API
The Turkish Airlines API exposes 3 endpoints covering airport lookup, flight availability with fare breakdowns, and live flight status. Use search_locations to resolve airport codes and city names, search_flights to retrieve itinerary options with per-cabin pricing across one-way or round-trip routes, and get_flight_status to pull departure and arrival details, gate assignments, and aircraft type for any TK flight number.
Airport and Location Search
The search_locations endpoint accepts a free-text query — a city name, airport name, or IATA code — and returns a ranked list of matching locations. Each result includes code, name, type, city, city_code, country, country_code, region, and boolean flags for domestic and multi_port. The multi_port flag indicates cities served by more than one airport, useful for disambiguating queries like "London" (LHR, LGW, LCY) before passing a code to the flight search.
Flight Availability and Fares
search_flights requires origin, destination, and departure_date (YYYY-MM-DD). Add return_date for a round-trip result. Optional adults, children, infants, and cabin_class (ECONOMY, BUSINESS, or FIRST) parameters filter the response. The returned legs array contains flight segments, pricing per passenger category, and fare_categories detailing brand rights — conditions like baggage allowance and change fees — for each available fare. This lets you compare fare families on the same flight, not just price totals.
Real-Time Flight Status
get_flight_status takes a flight_number (with or without the TK prefix, e.g. TK188 or 188) and an optional date defaulting to today UTC. The response includes a has_flights boolean, then a flights array where each segment carries scheduled and actual times, gate, terminal, aircraft type, and origin/destination airport details. The cleaned flight_number field in the response always strips the TK prefix for consistent downstream processing.
- Build a flight price tracker that monitors fare changes on specific Turkish Airlines routes using search_flights with fixed origin/destination pairs.
- Populate an autocomplete field for airport selection by querying search_locations as the user types a city or airport name.
- Display live departure boards for Turkish Airlines flights at a specific airport using get_flight_status with relevant flight numbers.
- Compare ECONOMY vs BUSINESS fare brand rights and baggage conditions on a given route by passing different cabin_class values to search_flights.
- Alert travelers to gate or terminal changes by polling get_flight_status for a monitored flight number on the day of travel.
- Resolve ambiguous city inputs (e.g., 'Paris' returning CDG and ORY) using the multi_port field from search_locations before initiating a fare search.
- Aggregate one-way price data across multiple departure dates for a route to identify the cheapest travel windows.
| 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 | 250 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.