API reference

A small REST API for route distance, flight time, headings, and airport/aircraft lookups. Get a key on the API plan, or use it via RapidAPI.

Authentication

Send your key in the X-API-Key header on every request:

curl -H "X-API-Key: YOUR_KEY" \
  https://www.greatcirclemapper.net/api/airports/route/EDDS-KJFK.json

Keys are issued after subscribing to the API plan and managed from your account. RapidAPI subscribers authenticate through the RapidAPI gateway instead - no key needed here.

GET /api/airports/route/:route(/:speed_kts)

Distance, heading, and flight time for a multi-leg route. Codes are ICAO or IATA, dash-separated. A place without an airport code can be given as coordinates in decimal degrees with N/S and E/W, for example YBCS-16.46986S145.34672E; it comes back in the airport shape with id null and empty codes.

GET /api/airports/route/EDDS-KJFK/450.json
{
  "totals": {
    "distance_km": 7731.42,
    "distance_nm": 4174.58,
    "flight_time_min": 1030.86,
    "speed_kmh": 833.4,
    "speed_kts": 450
  },
  "legs": [
    {
      "origin": { "icao_code": "EDDS", "iata_code": "STR", "name": "Stuttgart Airport", "...": "..." },
      "destination": { "icao_code": "KJFK", "iata_code": "JFK", "name": "John F Kennedy International Airport", "...": "..." },
      "distance_km": 7731.42,
      "distance_nm": 4174.58,
      "flight_time_min": 1031,
      "heading_deg": 299.1,
      "heading_compass": "WNW"
    }
  ]
}

Omit speed_kts to skip flight-time calculation (distance and heading only).

GET /api/airports/search/:q

Search airports by ICAO, IATA, name, municipality, or keywords.

GET /api/airports/search/frankfurt.json
[
  {
    "ident": "EDDF",
    "name": "Frankfurt am Main Airport",
    "municipality": "Frankfurt am Main",
    "icao_code": "EDDF",
    "iata_code": "FRA",
    "country": "Germany",
    "region": "Hesse"
  }
]

GET /api/airports/read/:q

A single airport by ICAO or IATA code, including coordinates in decimal and DMS.

GET /api/airports/read/EDDF.json
{
  "id": 1234,
  "ident": "EDDF",
  "name": "Frankfurt am Main Airport",
  "icao_code": "EDDF",
  "iata_code": "FRA",
  "latitude_deg": 50.0264,
  "longitude_deg": 8.54312,
  "latitude_minsec": "N 50° 1' 35\"",
  "longitude_minsec": "E 8° 32' 35\"",
  "link": "https://www.greatcirclemapper.net/en/airport/fra.html"
}

GET /api/aircraft/read/:q

A single aircraft type by ICAO or IATA code, with performance figures.

GET /api/aircraft/read/A320.json
{
  "name": "Airbus A320",
  "manufacturer": "Airbus",
  "iata_code": "320",
  "icao_code": "A320",
  "passengers": 180,
  "speed_kmh": 833,
  "speed_kts": 450,
  "range_km": 6100,
  "range_nm": 3300
}

Errors come back with an HTTP 4xx status and {"error": "..."}. Rate limits depend on your plan - see pricing for call quotas.