TGIS/AI
← Technical LandscapeRapid Research

Programmatic Data Access

API endpoints, authentication, and access patterns for real-time transport data sources

Programmatic Access to Transport Data Sources

Last updated: 2026-02-09 Status: Research document -- API endpoints and access policies should be verified before integration Purpose: Document API availability, authentication, endpoints, downloads, and licensing for 5 key real-time/near-real-time transport data sources


Table of Contents

  1. UNECE Transport Statistics (PXWeb)
  2. Africa Transport Observatory (ATO)
  3. OpenSky Network (Aviation ADS-B)
  4. AISHub / MarineTraffic (Maritime AIS)
  5. GBFS Feeds (Shared Mobility)
  6. Comparison Matrix

1. UNECE Transport Statistics (PXWeb)

Overview

The UNECE Statistical Database provides annual transport statistics for 56 UNECE member states (Europe, Central Asia, North America) covering road, rail, inland waterway, and pipeline transport. The database is built on PXWeb, a standard API framework developed by Statistics Sweden and used by dozens of national statistical institutes across Europe.

API Availability

AspectDetails
API typeREST API (PXWeb API v1)
Base URLhttps://w3.unece.org/PXWeb2015/api/v1/en/STAT/
URL pattern{base}/api/v1/{lang}/{database}/{levels}/{table}.px
MethodsGET (browse/list tables), POST (query data with JSON body)
Response formatsJSON, JSON-stat, JSON-stat2, CSV, XLSX, PC-Axis (.px)
Max values per callUp to 100,000 data cells per request

API Documentation

Authentication

  • None required. The API is freely accessible without authentication.
  • Rate limits: PXWebApi 2.0 (at SCB) enforces max 30 requests per 10 seconds and 150,000 data cells per GET. The UNECE instance likely has similar limits but these are not publicly documented.

Key Endpoints / Data Available

Transport data is organized under the path STAT__40-TRTRANS:

Endpoint Path SegmentData
02-TRROAD/Road transport -- passenger-km, bus/coach statistics, road network length
05-TRRAIL/Rail transport -- freight tonne-km, passenger-km, rail network
08-TRINLAND/Inland waterway transport
10-TRPIPE/Pipeline transport
12-TRSAFETY/Road traffic accidents and fatalities
15-TRVEHICLE/Vehicle fleet statistics

Example API call (browse tables):

GET https://w3.unece.org/PXWeb2015/api/v1/en/STAT/STAT__40-TRTRANS__02-TRROAD

Example API call (query data):

POST https://w3.unece.org/PXWeb2015/api/v1/en/STAT/STAT__40-TRTRANS__02-TRROAD/04_en_TRRoadPassgKm_r.px
Content-Type: application/json

{
  "query": [
    {
      "code": "Country",
      "selection": {
        "filter": "item",
        "values": ["826"]
      }
    }
  ],
  "response": {
    "format": "json-stat2"
  }
}

Direct Download Options

  • Tables can be exported via the web interface in CSV, XLSX, and PC-Axis formats
  • The API itself supports CSV and XLSX as response formats (set "format": "csv" in POST body)
  • No single bulk download of the entire transport statistics database

GitHub Repos / Client Libraries

License

  • Free for all uses. UNECE statistical data is publicly available without restrictions. Standard UN terms of use apply (attribution expected).

2. Africa Transport Observatory (ATO)

Overview

The Africa Transport Observatory (ATO) at ato.africa is a continental transport data platform operated by the African Union Commission with technical support from the SSATP (Sub-Saharan Africa Transport Policy Program) at the World Bank. It aims to be the central repository for transport statistics across all 54 AU member states.

API Availability

AspectDetails
API typeNone available. No public API exists.
Web interfaceDashboard-style portal with maps, charts, and country profiles
Data downloadVery limited; some indicators downloadable via the web UI
Programmatic accessNot supported as of February 2026

Important clarification: The domain ato.africa hosts the African Trade Observatory (an AfCFTA trade data instrument run by the African Union and ITC), not a transport observatory. The SSATP-led transport observatory work appears to be folded into corridor-specific monitoring systems rather than a single unified platform.

The SSATP ecosystem includes several related initiatives, none of which currently offer programmatic access:

PlatformURLFocusAPI
SSATPhttps://www.ssatp.org/African transport policy programmeNo
African Road Safety Observatory (ARSO)via SSATPRoad safety data for AfricaNo (Dropbox-based)
Corridor Transport ObservatoriesVariousTrade corridor performance (Northern Corridor, Maputo, etc.)No
Africa Information Highwayhttps://dataportal.opendataforafrica.org/Pan-African data portal (includes some transport)Yes -- has API explorer
Data Transporthttps://data-transport.org/African mobility data (GTFS, mapping)Partial downloads

Best Alternative for Programmatic Access to African Transport Data

The Africa Information Highway Portal (by the African Development Bank) is the closest alternative with an actual API:

Documentation

Authentication

  • N/A (no API)

Direct Download Options

  • Country profiles and corridor reports downloadable as PDF from SSATP
  • Africa Road Safety Observatory data shared via Dropbox
  • No structured data downloads (CSV/JSON) from a transport-specific observatory

GitHub Repos

  • None identified for ATO or SSATP transport data platforms

License

  • Not clearly defined. African Union / World Bank data policies would apply.

Assessment

The ATO/SSATP transport data ecosystem has the weakest programmatic access of all sources reviewed. This represents a significant gap for any global transport intelligence system. Integration would require either:

  1. Web scraping (fragile, not recommended)
  2. Partnership agreement for direct data access
  3. Using the Africa Information Highway API as a proxy for some indicators

3. OpenSky Network (Aviation ADS-B)

Overview

The OpenSky Network is a community-based ADS-B (Automatic Dependent Surveillance-Broadcast) receiver network that collects and provides aircraft position and flight data. It is the largest open-access source of live and historical aviation tracking data, with 2,500+ volunteer receivers worldwide.

API Availability

AspectDetails
API typeREST API (v1.4.0)
Base URLhttps://opensky-network.org/api
Auth serverhttps://auth.opensky-network.org/auth/realms/opensky-network/protocol/openid-connect/token
Response formatJSON
Historical dataTrino SQL interface for bulk historical queries

API Documentation

Authentication

Access LevelMethodDetails
AnonymousNoneLimited access, reduced resolution
Registered userOAuth2 client credentialsFree registration; create API client in account settings to get client_id and client_secret
Active contributorOAuth2 + ADS-B receiverUsers with an ADS-B receiver that is >= 30% online

OAuth2 token request:

curl -X POST "https://auth.opensky-network.org/auth/realms/opensky-network/protocol/openid-connect/token" \
  -d "grant_type=client_credentials" \
  -d "client_id=YOUR_CLIENT_ID" \
  -d "client_secret=YOUR_CLIENT_SECRET"

Note: All accounts created since mid-March 2025 must use OAuth2. Legacy username/password auth is being phased out.

Rate Limits

User TypeAPI Credits/DayData HistoryTime Resolution
AnonymousVery limitedReal-time only10 seconds
RegisteredLower allocationUp to 1 hour in the past10 seconds
Active contributor8,000 credits/dayUp to 1 hour in the past5 seconds
  • Header X-Rate-Limit-Remaining shows remaining credits
  • HTTP 429 returned when limit reached; X-Rate-Limit-Retry-After-Seconds indicates wait time

Key Endpoints

EndpointMethodDescription
/states/allGETAll aircraft state vectors (position, velocity, heading, altitude)
/states/ownGETState vectors from your own sensors only
/flights/all?begin={t1}&end={t2}GETAll flights within a time interval
/flights/aircraft?icao24={addr}&begin={t1}&end={t2}GETFlights for a specific aircraft
/flights/arrival?airport={icao}&begin={t1}&end={t2}GETArrivals at a specific airport
/flights/departure?airport={icao}&begin={t1}&end={t2}GETDepartures from a specific airport
/tracks/all?icao24={addr}&time={t}GETFlight track (waypoints) for a specific aircraft

Example -- get all current aircraft states:

curl "https://opensky-network.org/api/states/all" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Example -- get all states in a bounding box (Europe):

curl "https://opensky-network.org/api/states/all?lamin=45.8389&lomin=5.9962&lamax=47.8229&lomax=10.5226"

Direct Download / Bulk Data Options

MethodAccessDescription
Trino SQL interfaceRegistered (research use)Full historical dataset via SQL-like queries (Trino + Minio)
Zenodo datasetsPublicCurated datasets (e.g., COVID-19 air traffic) -- CC BY licensed
Monday snapshotsPublicFull state vector data for every Monday, 10-second intervals
Data formats--CSV, Avro, JSON (hourly files)

GitHub Repos

RepositoryDescription
openskynetwork/opensky-apiPython and Java API bindings + documentation
URL: https://github.com/openskynetwork/opensky-api
pyopenskyAlternative Python library for OpenSky (by Xavier Olive)
URL: https://github.com/open-aviation/pyopenskyDocs: https://mode-s.org/pyopensky/
trafficPython library for air traffic analysis (uses OpenSky)
URL: https://github.com/open-aviation/traffic

License

  • API & data: Free for non-commercial / academic use. Commercial use requires agreement.
  • API client code: GNU General Public License v3.0 (GPLv3)
  • Zenodo datasets: Creative Commons Attribution (CC BY)
  • Terms of use: https://opensky-network.org/about/terms-of-use

4. AISHub / MarineTraffic (Maritime AIS)

4a. AISHub

Overview

AISHub is a community-based AIS data exchange network. Members contribute raw AIS data from their receivers and in return get access to the aggregated worldwide AIS feed from all other contributors. It is the maritime equivalent of the OpenSky model.

API Availability

AspectDetails
API typeREST API (XML/JSON/CSV webservice)
Base URLhttps://data.aishub.net/ws.php
Response formatsXML, JSON, CSV
CompressionNone, zip, gzip, bzip2

API Documentation

Authentication

AspectDetails
ModelReciprocal data sharing -- you must contribute AIS data to access the API
API keyCalled "username" -- request at aishub@astrapaging.com
RequirementsOwn an AIS receiver, contribute raw NMEA data via UDP
Quality thresholdCoverage of >= 10 vessels (7-day avg), >= 90% uptime (7-day avg)
CostFree for all qualifying contributors

Rate Limits

  • Maximum 1 API request per minute

Key Endpoints / Parameters

The API is a single endpoint with parameters:

ParameterDescription
usernameAPI key / username
format1 (XML), 2 (JSON), 3 (CSV)
outputjson, xml, csv
compress0 (none), 1 (zip), 2 (gzip), 3 (bzip2)
latmin, latmax, lonmin, lonmaxBounding box filter
mmsiFilter by specific vessel MMSI

Example:

https://data.aishub.net/ws.php?username=YOUR_KEY&format=1&output=json&compress=0&latmin=45&latmax=46&lonmin=-1&lonmax=0

Data Fields

Returns standard AIS position report data: MMSI, timestamp, latitude, longitude, course over ground (COG), speed over ground (SOG), heading, navigation status, vessel name, IMO number, call sign, vessel type, dimensions.

Direct Download

  • No bulk historical downloads
  • Real-time data only through API
  • Raw NMEA feed available to members

GitHub Repos

License

  • Free for contributors; no explicit open data license
  • Data is shared under the reciprocal contribution model

4b. MarineTraffic (by Kpler)

Overview

MarineTraffic is the world's largest commercial maritime data platform, now part of Kpler. It provides comprehensive vessel tracking, port data, and maritime intelligence via a suite of paid API services.

API Availability

AspectDetails
API typeREST API
Base URLhttps://services.marinetraffic.com/api/exportvessel/ (varies by endpoint)
Response formatsJSON, XML, CSV
ModelCommercial / paid

API Documentation

Authentication

  • API key required (obtained after purchasing a subscription plan)
  • Key passed as URL parameter: ?v=8&api_key=YOUR_KEY&...

Pricing

  • Commercial, subscription-based. Prices vary by:
    • Endpoint / service type
    • Response detail level (simple / extended / full)
    • AIS data source (terrestrial / satellite)
    • Number of tracked vessels
    • Request frequency
  • Volume discounts available (e.g., 25+ vessels)
  • No free tier for API access (the website has a free tier for manual browsing)
  • Contact sales for pricing: https://www.marinetraffic.com/en/online-services/plans/comparison-list

Key API Services (Endpoints)

Service CodeNameDescription
PS01Vessel Historical TrackHistorical position data for a vessel
PS02Fleet Vessel PositionsCurrent positions of a defined fleet
PS06Vessel Positions in AreaAll vessels in a bounding box
PS07Single Vessel PositionsCurrent position of a single vessel
VD02Vessel ParticularsStatic vessel data (name, type, dimensions, flag)
EV01Port CallsPort call events (arrivals/departures)
VI06Port CongestionVessel congestion metrics at ports

Example:

https://services.marinetraffic.com/api/exportvessel/v:8/YOUR_API_KEY/timespan:60/protocol:json

Direct Download

GitHub Repos

License

  • Proprietary / commercial. All data subject to MarineTraffic/Kpler terms of service. Not open data.

Maritime AIS Comparison

FeatureAISHubMarineTraffic
CostFree (contribute data)Paid (subscription)
CoverageDepends on contributors (~thousands of stations)Global (terrestrial + satellite AIS)
Historical dataNoYes (paid)
Satellite AISNo (terrestrial only)Yes
Rate limit1 req/minDepends on plan
Data richnessBasic AIS fieldsEnriched (port calls, voyages, ETA, risk)
ReliabilityCommunity-dependentEnterprise SLA

5. GBFS Feeds (Shared Mobility)

Overview

The General Bikeshare Feed Specification (GBFS) is the open data standard for shared mobility (bikeshare, scooter share, car share, etc.). It defines a set of JSON endpoints that operators publish to make real-time availability data publicly accessible. GBFS is maintained by MobilityData and is used by 900+ shared mobility systems worldwide.

API Availability

GBFS is not a single API but a specification that each operator implements. Access is decentralized.

AspectDetails
Spec typeREST / JSON feeds (read-only)
Current versionv3.0 (also widely deployed: v2.3, v2.2)
DiscoveryEach system publishes a gbfs.json auto-discovery file
AuthenticationTypically none -- feeds are public by design
Rate limitsVaries by operator; data should not be stale by more than 5 minutes

Documentation

Feed Discovery -- The systems.csv Catalog

The master catalog of all known GBFS feeds worldwide is maintained by MobilityData:

ResourceURL
systems.csv (raw)https://github.com/MobilityData/gbfs/blob/master/systems.csv
systems.csv (direct download)https://raw.githubusercontent.com/MobilityData/gbfs/master/systems.csv
Mobility Database websitehttps://mobilitydatabase.org/
Mobility Database APIhttps://api.mobilitydatabase.org/v1/metadata

The systems.csv file contains columns:

  • Country Code, Name (system name), Location (city), System ID, URL (operator website), Auto-Discovery URL (the gbfs.json endpoint)

Authentication

  • GBFS feeds: No authentication required for most feeds. The specification mandates public access.
  • Mobility Database API: Requires a free access token (sign up at mobilitydatabase.org)

Key GBFS Endpoints (per system)

Each GBFS system publishes a gbfs.json file that links to the following feeds:

EndpointRequired?Description
gbfs.jsonYesAuto-discovery file listing all available feeds
system_information.jsonYesSystem name, operator, timezone, license, contact
station_information.jsonIf dockedAll stations: ID, name, lat/lon, capacity
station_status.jsonIf dockedReal-time: available bikes/docks per station
vehicle_status.json (v3.0) / free_bike_status.json (v2.x)If docklessReal-time: all available dockless vehicles with location
vehicle_types.jsonIf applicableVehicle type definitions (e-bike, scooter, etc.)
system_regions.jsonOptionalGeographic regions within the system
system_pricing_plans.jsonOptionalPricing information
geofencing_zones.jsonOptionalOperating zones, no-ride zones, speed zones

Example -- discover a system's feeds (Citi Bike NYC):

curl https://gbfs.citibikenyc.com/gbfs/gbfs.json

Example -- get station status:

curl https://gbfs.citibikenyc.com/gbfs/en/station_status.json

Direct Download Options

  • systems.csv can be downloaded directly from GitHub for the full catalog
  • Individual feeds are JSON and can be polled/scraped
  • No single bulk download of all feeds (each system is independent)
  • The Mobility Database API provides a programmatic way to discover and catalog feeds

GitHub Repos

RepositoryDescription
MobilityData/gbfsGBFS specification + systems.csv catalog
https://github.com/MobilityData/gbfs
MobilityData/gbfs-validatorGBFS feed validator tool
https://github.com/MobilityData/gbfs-validator
MobilityData/mobility-feed-apiMobility Database website and API source code
https://github.com/MobilityData/mobility-feed-api

License

  • GBFS specification: Creative Commons Attribution 3.0 (CC BY 3.0)
  • GBFS validator: Apache License 2.0
  • Individual feed data: Varies by operator. If license_id and license_url are blank in system_information.json, data defaults to Creative Commons Universal Public Domain Dedication (CC0). The specification recommends open data licensing.
  • systems.csv catalog: CC BY 3.0

6. Comparison Matrix

Access Model Comparison

SourceAPI AvailableAuth RequiredFree AccessReal-TimeHistorical
UNECE PXWebYes (REST)NoYesNo (annual stats)Yes (time series)
ATO / SSATPNoN/AN/ANoNo
OpenSky NetworkYes (REST)Yes (OAuth2)Yes (with limits)YesYes (Trino)
AISHubYes (REST)Yes (contribute data)Yes (reciprocal)YesNo
MarineTrafficYes (REST)Yes (API key)No (paid only)YesYes (paid)
GBFSYes (per-system)No (mostly)YesYesNo (current state only)

Data Richness Comparison

SourceTransport ModeCoverageUpdate FrequencyData Format
UNECE PXWebRoad, rail, waterway, pipeline56 countries (Europe, C. Asia, N. America)AnnualJSON-stat, CSV, XLSX
ATO / SSATPAll modes (aspirational)54 African countriesIrregularDashboard only
OpenSky NetworkAviationGlobal (ADS-B coverage)Real-time (5-10 sec)JSON, CSV, Avro
AISHubMaritimeGlobal (terrestrial AIS)Real-time (1 min polling)JSON, XML, CSV
MarineTrafficMaritimeGlobal (terrestrial + satellite AIS)Real-timeJSON, XML, CSV
GBFSShared mobility (bike, scooter, car)900+ systems worldwideReal-time (< 5 min)JSON

Integration Effort Estimate

SourceEffortNotes
UNECE PXWebLowStandard PXWeb API; well-documented; existing R/Python tooling
ATO / SSATPHighNo API; requires partnership or alternative data sources
OpenSky NetworkLow-MediumWell-documented REST API; OAuth2 setup; rate limits to manage
AISHubMediumRequires AIS receiver contribution; simple API once access granted
MarineTrafficLow (but costly)Well-documented commercial API; budget required
GBFSMediumSimple per-feed access; challenge is aggregating 900+ systems

This document complements the platform profiles in /research/databases-platforms/ by focusing specifically on programmatic access patterns for real-time and near-real-time data sources that could feed into a Global Transport Intelligence System.