Attest tools · airports

Airport reference data

a task needs the static facts about an airport: what an IATA or ICAO code means, where the airport is (city, region, country, coordinates, elevation), whether it has scheduled airline service, which airports a country…

1 credit per successful callGET /api/v1/airports

Bearer key · query string

GET /api/v1/airports

curl -s "https://getattest.com.au/api/v1/airports?code=LHR" \
  -H "authorization: Bearer $ATTEST_API_KEY"

Send the key as a bearer token in the authorization header. One key and one credit balance cover every service, including Attest Capture. A failed call is refunded automatically. No key yet? POST /api/v1/keys issues one with 25 free credits and no signup — see the key guide.

Captured 2026-09-21

Example

This request was run against the running service on 2026-09-21 and the response below is what came back, unedited.

Request JSON

{
  "code": "LHR"
}

Captured response JSON

{
  "call_id": "0fad4054-104a-446a-b5a4-be9e141ef268",
  "query": {
    "code": "LHR"
  },
  "found": true,
  "matched_on": "iata",
  "count": 1,
  "airport": {
    "icao": "EGLL",
    "iata": "LHR",
    "ident": "EGLL",
    "name": "London Heathrow Airport",
    "type": "large_airport",
    "city": "London",
    "region": "GB-ENG",
    "region_name": "England",
    "country": "GB",
    "country_name": "United Kingdom",
    "latitude": 51.470748,
    "longitude": -0.459909,
    "elevation_ft": 83,
    "scheduled_service": true,
    "home_link": "http://www.heathrow.com/",
    "wikipedia_link": "https://en.wikipedia.org/wiki/Heathrow_Airport",
    "keywords": [
      "LON",
      "Londres"
    ]
  },
  "source": "OurAirports (public domain)",
  "source_url": "https://ourairports.com/data/",
  "data_snapshot": "2026-09-20",
  "data_age_days": 0,
  "notice": "General information from a public-domain reference dataset, not an operational, navigation or flight-planning source. Airport details change: this answer reflects the OurAirports snapshot taken on the date in data_snapshot, and OurAirports publishes its data with no guarantee of accuracy or fitness for use. No timezone is returned — OurAirports does not publish one, and no licence-cleared dataset for deriving it from the coordinates is bundled here. Distances are straight-line great-circle figures between published reference points, not flown or flight-planned distances.",
  "checked_at": "2026-09-20T16:55:56.641Z",
  "credits_charged": 1,
  "credits_remaining": 9999
}

For agents

Use when

Use this when a task needs the static facts about an airport: what an IATA or ICAO code means, where the airport is (city, region, country, coordinates, elevation), whether it has scheduled airline service, which airports a country has, or the straight-line distance and initial bearing between two of them.

8 fields

Input

Scroll the table horizontally to see all fields.

Field / Type / Required / What it does
FieldTypeRequiredWhat it does
codestringOptionalOne IATA (LHR) or ICAO (EGLL) code. Returns that single airport. Cannot be combined with q, country or from/to.
qstringOptionalFree-text search over airport, city and code. Returns a list.
countrystringOptionalISO 3166-1 alpha-2 country code. Returns that country's airports as a list.
fromstringOptionalOrigin IATA or ICAO code for a distance query. Must be sent with to.
tostringOptionalDestination IATA or ICAO code. Must be sent with from.
typestringOptionalFilters a q or country list by airport size. Refused on a code or from/to query, which have no list to shape.
limitintegerOptionalPage size for a q or country list.
offsetintegerOptionalRows to skip for a q or country list.

HTTP 200

Response

Every successful response also carries call_id (your receipt for the charge), credits_charged and credits_remaining.

Scroll the table horizontally to see all fields.

Field / What it holds
FieldWhat it holds
queryThe parsed query echoed back, in the same words the response uses.
foundWhether the code matched an airport (code queries).
matched_onWhich field the code matched: iata or icao.
airportThe matched airport: name, city, region, country, coordinates, elevation and whether it has scheduled service (code queries).
airportsThe page of matching airports (q and country queries).
countRows returned in this page.
totalRows the query matched in total, so a caller knows whether another page exists.
data_snapshotThe date the bundled OurAirports snapshot was taken.
data_age_daysWhole days between data_snapshot and this call.
noticeWhat this data is and is not: reference information, not an operational or flight-planning source.

Machine-readable failures

Errors

Errors return JSON such as {"error":"invalid_api_key"}. A failed call is refunded automatically.

Scroll the table horizontally to see all fields.

Code / Status / Meaning
CodeStatusMeaning
query_required400None of code, q, country or from/to was supplied.
conflicting_query400More than one query form was supplied at once.
from_required400to was sent without from.
to_required400from was sent without to.
invalid_q400q is shorter than the minimum search length.
q_too_long400q is longer than the accepted length.
invalid_country400country is not a two-letter code the dataset knows.
invalid_type400type is not one of the airport sizes the dataset publishes.

On every service

Scroll the table horizontally to see all fields.

Code / Status / Meaning
CodeStatusMeaning
invalid_api_key401The authorization header is missing or the key is unknown.
insufficient_credits402The balance is below this call's cost. The response carries credits_required and credits_remaining.
rate_limit_exceeded429Free keys share 10 calls a minute across every service. The response carries limit and window_seconds.
services_unavailable503The credit store could not be reached. Retry once after 30 seconds.

Where the answer comes from

Source and scope

OurAirports (public domain) - https://ourairports.com/data/. The snapshot date is in data_snapshot on every response.

Attest reports what it read, with the source it read it from. It is general information, not advice, and not a legal record.

All Attest tools · Service list as JSON · OpenAPI

Same key as every Attest tool

One key. One balance. 1 credit a call.

Issue a free key, then use it here, on Attest Capture and on every other tool in the box.

Get a free key