GuidesFLIGHT APIS

Free flight tracking API for JavaScript

For a free flight tracking API you can call from browser JavaScript, use AirLabs (1,000 queries a month) or AviationStack (100 requests a month): both send Access-Control-Allow-Origin: *, so fetch() works with the key in the URL. The keyless ADS-B feeds fail in the browser, because OpenSky only allows https://opensky-network.org and adsb.lol and adsb.fi send no CORS header. FlightAware AeroAPI sends none either and needs an x-apikey header, which cors.dev Pro forwards for $5 a month and 500,000 requests, with a 7-day trial of 1,000 requests and no card.

Which flight API works from the browser

Each API was called on 28 October 2026 with Origin: https://example.com, as a browser sends it, then through https://proxy.cors.dev/. Five of the 9 send CORS headers that let fetch() read the response on any site, but only AirLabs and AviationStack among them have a free plan.

Flight APIs tested from the browser, checked October 2026
APIFree tierKeyBrowser CORSThrough cors.dev
AirLabs1,000 queries a month, personal useapi_key in the URLYes, any originNot needed
AviationStack100 requests a month, non-commercialaccess_key in the URLYes, any originNot needed
OpenSky Network400 credits a day without an accountNone, or OAuth2 tokenNo, only opensky-network.org522, use a server
adsb.lolFree, dynamic rate limitsNoneNo CORS headers200, sometimes 429
adsb.fi1 request a second, non-commercialNoneNo CORS headers403 from Cloudflare
FlightAware AeroAPI$5 of queries a month, Personal tierx-apikey headerNo CORS headerscors.dev Pro forwards x-apikey
Flightradar24 APINone, Explorer is $9 a monthAuthorization Bearer tokenYes, any originNot needed
ADS-B Exchange on RapidAPINone, Basic is $10 a monthX-RapidAPI-Key headerYes, echoes the originNot needed
AeroDataBox on RapidAPI7-day trial on API.MarketX-RapidAPI-Key headerYes, echoes the originNot needed

Free plans that work with fetch()

AirLabs (airlabs.co/api/v9) gives 1,000 queries a month for personal use, with a limited set of fields on the free plan, such as lat, lng, dir, aircraft_icao and dep_iata. The key goes in the api_key query parameter, bbox limits results to an area and _fields trims each record. Responses carry Access-Control-Allow-Origin: *.

A bad key still answered HTTP 200, with {"error":{"message":"Unknown api_key","code":"unknown_api_key"}} in the body, so check data.error rather than response.ok. Results arrive in a response array.

Live flights over London from AirLabs, no proxy
// AirLabs sends Access-Control-Allow-Origin: *, so fetch() works without a proxy
const params = new URLSearchParams({
  bbox: '51.3,-0.7,51.7,0.1', // south-west lat, lng, north-east lat, lng
  _fields: 'flight_iata,dep_iata,arr_iata,alt,speed',
  api_key: 'YOUR_AIRLABS_KEY', // visible in the URL and DevTools
});

const response = await fetch(`https://airlabs.co/api/v9/flights?${params}`);
const data = await response.json();

// A bad key still answers HTTP 200, with an error object in the body
if (data.error) throw new Error(`AirLabs: ${data.error.code}, ${data.error.message}`);

for (const flight of data.response) {
  console.log(`${flight.flight_iata ?? '?'} ${flight.dep_iata ?? '?'} to ${flight.arr_iata ?? '?'}, ${flight.alt} m`);
}

AviationStack (api.aviationstack.com/v1) gives 100 requests a month for non-commercial use, and its pricing page lists HTTPS and real-time flights on the free plan. The key goes in access_key, and both https:// and http:// answered with Access-Control-Allow-Origin: *, even on a 401 invalid_access_key error. Basic costs $49.99 a month for 10,000 requests and adds commercial use and historical flights.

On both services the key sits in the URL, so any visitor can copy it from DevTools and spend your monthly quota. AirLabs' paid plans start at $49 a month for 25,000 queries.

OpenSky, adsb.lol and adsb.fi in the browser

The free ADS-B feeds need no key, but none of them worked from a browser page directly, and only adsb.lol answered through cors.dev:

  • OpenSky Network: Every response, preflight included, carried Access-Control-Allow-Origin: https://opensky-network.org whatever origin we sent, including http://localhost:5173 and null, so the browser blocks it on every other site. Through cors.dev it answered 522 (connection timed out) after about 20 seconds, and OpenSky's docs warn that it may block AWS and other hyperscalers.
  • adsb.lol: /v2/point/51.47/-0.45/25 returned 33 aircraft near Heathrow with no Access-Control-Allow-Origin header, and its preflight answered 405. Through cors.dev it returned 200 with CORS headers in our later tests, but an earlier run got 429 with x-ratelimit-remaining: 0: proxy requests share outgoing IP addresses, and the adsb.lol API README says its rate limits change with server load.
  • adsb.fi: It allows 1 request a second for personal, non-commercial use and requires a credit link to adsb.fi. It sends no CORS header, and through cors.dev it answered a Cloudflare 403.
  • airplanes.live: It answered 403 with a request to email them first, directly and through cors.dev.

Call these feeds from your own server. OpenSky gives anonymous clients 400 credits a day per IP: a bounding box of up to 25 square degrees costs 1 credit, a global /states/all costs 4, and a free account raises the allowance to 4,000. Accounts use OAuth2 client credentials with 30-minute tokens, and the client secret must stay out of browser code.

FlightAware AeroAPI through cors.dev Pro

FlightAware AeroAPI (aeroapi.flightaware.com/aeroapi) takes its key in the x-apikey header. The Personal tier has no monthly minimum and covers up to $5 of query fees a month ($10 for ADS-B feeders), at 10 result sets a minute for personal or academic use. Fees are per result set of up to 15 records: GET /flights/{ident} costs $0.005, so $5 pays for 1,000 flight lookups.

AeroAPI sent no Access-Control-Allow-Origin header on its 401 response or on preflight, so the browser blocks every call. The free cors.dev proxy answered a request carrying x-apikey with 400 and X-Cors-Error: header_not_allowed. cors.dev Pro forwards the header for $5 a month and 500,000 requests, with a 7-day trial of 1,000 requests and no card:

  1. Sign up

    Create an account at cors.dev/signup with Google.

  2. Create a Connection

    Add your exact page origin and the target host aeroapi.flightaware.com.

  3. Send both headers

    Put the Connection's publishable key in X-Cors-Key and your AeroAPI key in x-apikey.

FlightAware AeroAPI flight lookup through cors.dev Pro
const PROXY = 'https://proxy.cors.dev/';
const target = 'https://aeroapi.flightaware.com/aeroapi/flights/BAW117';

const response = await fetch(PROXY + target, {
  headers: {
    'X-Cors-Key': 'YOUR_CONNECTION_KEY', // publishable, works only from your registered origins
    'x-apikey': 'YOUR_AEROAPI_KEY', // visible in DevTools: internal tools and prototypes only
  },
});
const proxyError = response.headers.get('X-Cors-Error');
if (proxyError) throw new Error(`cors.dev: ${proxyError}`);
if (!response.ok) throw new Error(`AeroAPI answered ${response.status}`);

const { flights } = await response.json();
for (const flight of flights.slice(0, 3)) {
  const route = `${flight.origin?.code_iata} to ${flight.destination?.code_iata}`;
  console.log(`${flight.ident} ${route}: ${flight.status}, gate arrival ${flight.estimated_in ?? 'unknown'}`);
}

FlightAware's 10 result sets a minute still apply. The AeroAPI key stays visible in DevTools and FlightAware bills query fees past the free $5, so cors.dev Pro fits internal tools and prototypes; a public site should call AeroAPI from a backend.

Limits to plan for

  • AviationStack: 100 requests a month, which a widget refreshing once a minute spends in 100 minutes.
  • AirLabs: 1,000 queries a month; a spent quota returns the month_limit_exceeded error code.
  • FlightAware AeroAPI: 10 result sets a minute and $5 of free queries a month on Personal; Standard has a $100 monthly minimum.
  • cors.dev: Free needs no signup and allows GET and HEAD at about 600 requests a minute per IP, with 6 MiB responses and a 30-second upstream deadline. cors.dev Pro allows 3,000 requests a minute per account and 100 in flight, and forwards custom headers such as x-apikey.

Good questions.

Is there a free flight tracking API that needs no key?

OpenSky, adsb.lol and adsb.fi need no key, but a browser page on another site cannot read them: OpenSky only allows https://opensky-network.org, and the other two send no CORS header. Fetch them from your own server. For a free plan that works in the browser, AirLabs gives 1,000 queries a month and AviationStack 100, both with a key in the URL.

Why does the OpenSky API give a CORS error?

OpenSky answers every request with Access-Control-Allow-Origin: https://opensky-network.org, whatever origin the page sends. The browser compares that value with your page's origin, finds no match and blocks the response, even on http://localhost. A request from your own server is not subject to CORS and works within the 400 anonymous credits a day.

Can I call the FlightAware API from JavaScript?

Not directly: AeroAPI sends no Access-Control-Allow-Origin header and needs the x-apikey header, which the free cors.dev tier refuses with 400 header_not_allowed. cors.dev Pro forwards it from your registered origins. The key stays visible in DevTools and FlightAware bills queries past the free $5 a month, so keep this to internal tools and call AeroAPI from a backend on a public site.

Is the Flightradar24 API free?

No. The cheapest plan, Explorer, costs $9 a month for 30,000 credits and 10 requests a minute. A sandbox key returns fixed sample responses without spending credits, so you can build against the response format before you subscribe.

Why did adsb.lol answer 429 through cors.dev?

adsb.lol rate-limits its clients, and its API README says the limits change with server load. Requests through cors.dev leave from shared IP addresses, so one run on 28 October 2026 got 429 with x-ratelimit-remaining: 0, while later ones returned 200. From your own server, the allowance is yours alone.