Airports, Airlines & Flight Routes Scraper avatar

Airports, Airlines & Flight Routes Scraper

Pricing

from $0.50 / 1,000 results

Go to Apify Store
Airports, Airlines & Flight Routes Scraper

Airports, Airlines & Flight Routes Scraper

Export airport reference data, airline records and historical flight routes from OurAirports and OpenFlights. Filter by IATA code and supported country/type fields; get JSON, CSV or Excel. No API key. Routes are historical, not current flight schedules.

Pricing

from $0.50 / 1,000 results

Rating

0.0

(0)

Developer

ninhothedev

ninhothedev

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

0

Monthly active users

6 days ago

Last modified

Share

Export open aviation reference records for lookup tables, research and CSV/JSON workflows. Three modes preserve their existing fields: OurAirports airports enriched by IATA from OpenFlights, OpenFlights airlines, and historical OpenFlights routes. No API key or proxy is required.

First run

Use {} for the first five airport records, or this small airport lookup:

{"mode":"airports","iataFilter":["FRA","JFK"],"maxItems":2}

The UI prefill selects FRA/JFK. API inputs have no implicit IATA filter. The default limit is now 5, previously 1,000; provide maxItems:1000 explicitly to keep the old quantity. maxItems must be an integer from 1 to 50,000. Runs never export the entire airport or route source when it exceeds that cap.

Inputs

  • mode: airports (default), airlines, or routes.
  • countryFilter: optional ISO2 code for airports; country name or ISO2 for airlines. Ignored for routes, which have no country field.
  • airportTypeFilter: optional large_airport, medium_airport, small_airport, heliport, seaplane_base, balloonport, or closed. Used only for airports.
  • iataFilter: optional array, at most 1,000 codes. Three-letter airport codes for airports; two-character airline codes for airlines. Routes match either endpoint or operating airline (two or three characters). Case and surrounding whitespace are normalized; duplicates are removed. Multiple supplied filters combine with AND; codes within the list combine with OR.
  • activeOnly: boolean, default false, used only for airlines. Filters the historical source flag; it does not verify present-day operation.
  • maxItems: global dataset limit including rows already delivered to the same dataset on restart.

Invalid modes, types and quantities fail before fetching sources. A valid filter with no matches succeeds with no rows.

Outputs and freshness

Select Airports, Airlines or Routes in the dataset views, or export JSON/CSV. Existing fields retain their meanings. Additive record_id identifies an airport by ident, an airline by source ID, or a route by its carrier/endpoints/codeshare/stops/equipment tuple. source_url links the primary source; scraped_at is the retrieval time, not a claim that the underlying record was recently updated.

Airport coordinates are degrees; elevation is feet. Missing, malformed or nonfinite numbers become null; out-of-range coordinates become null. Other unavailable source fields are null and lists are empty. Missing airport enrichment means no matching usable OpenFlights IATA record. Boolean flags retain the source interpretation, with missing flags false. timezone_offset and dst come from historical OpenFlights data, not a current DST calculation. timezone_name is an IANA identifier when present.

Routes are historical (the OpenFlights route database has not been updated since 2014), not schedules, fares or proof that a flight currently operates. The airline active flag can include defunct airlines. Source quality and coverage vary; records without IATA codes remain useful airport records but cannot receive IATA enrichment. This Actor does not independently verify operational status.

Limits, failures and billing

The existing result event and Actor-start pricing are unchanged; the current price is displayed in Apify's Pricing tab. No extra charge event is introduced. Only delivered dataset rows trigger the existing automatic dataset-item event. The SDK checks the remaining result budget before loading sources and before every row; a budget or item limit ends the run with a summary. Platform infrastructure costs remain subject to Apify account billing.

On restart using the same dataset, existing rows count toward the global cap and their stable identities are skipped, including legacy rows without record_id. Separate new runs/datasets are separate exports. Do not manually alter the run's dataset during execution. There is one sequential writer; no separate manually charged result event.

Transport uses a 15-second timeout per attempt and at most one fallback before any source bytes are delivered. A source error, malformed CSV/header or failure after partial delivery fails the run; already delivered rows remain available and no fake error rows are added. RUN_SUMMARY distinguishes complete/no matches, limits, and partial/source failure. A build or successful run alone does not guarantee completeness.

Local development

Python 3.11 or newer. Install the exact dependency lock with python -m pip install -r requirements.txt. Run with apify run (discovers src/__main__.py) or apify run --entrypoint src. Offline checks: python tests/test_parsing.py and python -m unittest discover -s tests -p 'test_contract.py'. Local SDK storage is not uploaded to Apify.

Sources