Skip to main content
Base URL: https://data.flightportrait.com. No key, no account, open to any origin, so it works from a browser page too.

The three calls

Every other endpoint is in the API reference.

curl

Aircraft within 15 nautical miles of the middle of Singapore:
ac speaks readsb’s field names: t is the ICAO type, r the registration, alt_baro feet (or "ground"), gs knots, dst the distance in nautical miles. flight is absent when the aircraft does not broadcast a callsign. One flight:
Times in legs are local at the origin airport. A callsign the network never heard returns 404 with "error": "not_observed". Search:
-L because a query in any other spelling may be redirected to its canonical form (trimmed, uppercase). id is what to open next: a hex for /v1/airframes/, a callsign for /v1/flights/, a code for /v1/airports/ or /v1/airlines/.

Python

Standard library only.

JavaScript

Node 18 or newer as an .mjs file, or a browser page.

ESP32 (Arduino)

The nearest airborne aircraft, printed to the serial monitor. Needs the esp32 board package and ArduinoJson 7.
For a panel instead of a serial monitor: Build a flight display.

Attribution

Show this line wherever the data appears, with a link to https://flightportrait.com/network:
On a display too small for the whole line, put “Data: FlightPortrait network, CC BY-NC” on the screen and the full line in your project’s README or about page. Selling a project that uses the live data is commercial use: write to [email protected] first. Republishing the data itself carries the sources’ credits with it. Data and licensing.

Being a good neighbour

  • Limits are per IP over 600 seconds, per call: /v2/point 300 (one call every 2 seconds), /v1/flights 120, /v1/search 600. A 429 carries Retry-After in seconds. Wait that long.
  • The live answer changes every few seconds and the edge caches it for 5, so polling faster than that returns the same body. A display on a desk is well served by one call every 30 to 60 seconds.
  • History and reference answers change nightly. Cache them for an hour or more, and look a flight up once, when its callsign first appears, not on every poll.
  • A 503 means the live picture is more than 60 seconds old. Keep what you last showed and try again; the API never pretends the sky is empty.
  • Send a User-Agent that names your project and a way to reach you. If something you made misbehaves, we would rather write to you than block an address.
Heavy users get more from the network by feeding it: Feed the network.