FlightStats Search API Documentation Search carriers or airports by name and get the codes for the flight and airport endpoints. Set type to airline or airport. An empty result costs no credit. Cost: 1 credit per successful request.
Run this endpoint
Endpoint
Parameters
Start with the required fields, then add optional filters only when your use case needs them.
string
Required
Name or code to search, at least 2 characters, e.g. lufthansa.
coffee shops
string
Required
airline or airport.
example
Response Schema
Example response fields are illustrative; inspect the JSON before integrating.
Example response fields
Scan these fields before integrating.
data
meta
success
{
"data": {
"type": "airline",
"count": 4,
"query": "lufth",
"results": [
{
"code": "LH",
"iata": "LH",
"name": "Lufthansa"
},
{
"code": "CL",
"iata": "CL",
"name": "Lufthansa CityLine"
},
{
"code": "GEC",
"iata": "GEC",
"name": "Lufthansa Cargo"
},
{
"code": "LHX",
"iata": "LHX",
"name": "Lufthansa City Airlines"
}
]
},
"meta": {
"credits": 1,
"billable": true,
"endpoint_family": "search"
},
"success": true
}
Errors
Handle these documented responses before retrying or showing customer-facing failures.
Validation Error
A parameter is missing or invalid. This response is not billable.
{
"errors": {
"type": [
"The type is one of airline, airport."
]
},
"message": "The request validation failed"
}Upstream Unavailable
FlightStats could not be read after retries. This response is not billable. Retry later.
{
"meta": {
"billable": false,
"retryable": true,
"endpoint_family": "search"
},
"error": {
"code": "UPSTREAM_UNAVAILABLE",
"message": "FlightStats is temporarily unavailable. Please retry."
},
"success": false
}Generate Code with AI
Copy a ready-made prompt with all the endpoint details, parameters, and example responses. Paste it into ChatGPT, Claude, or any AI assistant to instantly generate working code.
Try It Live
Test this endpoint in our interactive playground with real data.