API reference / Reference

get/v1/airports

Search airports

Operation
listAirports
Authentication
API key

For a departure-airport field. **A different question from `/v1/ports`**, which answers where a traveller *arrives* in one of our four markets.

Defaults to the 4,169 airports with an IATA code and scheduled service. The capture holds 85,558 rows and 81,000 of them are airfields, heliports and permanently closed strips, which bury the useful answer in a picker. `include_all` reaches them.

**Not metered** — no eligibility work is done, and billing a partner for reading a static list would make the usage statement harder to defend.

Request

Parameters

qquerystring
country_iso2querystring
limitqueryinteger
include_allquerybooleannull

Responses

200Matching airports, ranked: exact code, then prefix, then city, then name.
airportsAirport[]required
countsobjectrequired
sourcestringrequired

OurAirports, community-maintained. Unlike every other route on this tag, this is a reference rather than a government capture.

next_cursorstringnullrequired
400The request body or query failed validation.
errorobjectrequired
401No key, an unknown key, a revoked key, or a key whose tenant is not active. All four return an identical body on purpose: distinguishing them would let a caller discover which partners we have.
errorobjectrequired
403The key is valid but does not hold the scope this route requires.
errorobjectrequired
404Not found, or not yours. A resource belonging to another tenant answers 404 rather than 403, because 403 would confirm the record exists.
errorobjectrequired

Example

curl
curl -X GET https://api.haavisa.com/v1/airports \
  -H "Authorization: Bearer $HAAVISA_API_KEY"

More in Reference

Something unclear? The eligibility guide explains the model behind the answers; the errors guide covers the envelope.