SDKs overview

ADS-B Exchange provides developers with access to its extensive database of real-time and historical flight data through a RESTful API. To facilitate integration, both official and community-contributed SDKs and libraries are available. These tools are designed to streamline the process of querying and consuming data from the ADS-B Exchange platform, abstracting the complexities of direct HTTP requests and JSON parsing. Developers can utilize these SDKs to build applications for purposes such as live flight tracking, historical analysis, and aviation research.

The core functionality of these SDKs typically includes methods for aircraft lookup by ICAO24 address, retrieving flight paths, accessing a list of nearby aircraft, and fetching historical data within specified timeframes. API access generally requires an API key, which is associated with different ADS-B Exchange data access tiers depending on usage requirements (e.g., personal, commercial, enterprise). While the official API documentation offers detailed endpoints and request/response examples, SDKs often provide a more idiomatic way to interact with the service in specific programming languages.

Official SDKs by language

As of 2026, ADS-B Exchange primarily supports direct API interaction; however, community efforts have resulted in several well-maintained libraries. The platform's API documentation provides comprehensive details for direct integration, which many SDKs build upon. The primary examples highlighted by the community for interaction with the ADS-B Exchange API are developed in Python and JavaScript, reflecting their popularity in data science and web development contexts, respectively.

While ADS-B Exchange emphasizes direct API consumption, the following table lists commonly used and actively maintained community libraries that serve as de facto SDKs for interacting with their service. These libraries often wrap the core API functionalities, providing language-specific constructs for ease of use.

Language Package/Library Name Installation Command Maturity/Status
Python adsb_exchange pip install adsb_exchange Community-maintained, active
JavaScript (Node.js) node-adsbexchange npm install node-adsbexchange Community-maintained, active

Installation

Installation procedures for ADS-B Exchange libraries follow standard package management practices for their respective ecosystems. Before installation, developers should ensure they have the correct runtime environment set up, such as Python with pip or Node.js with npm.

Python

To install the adsb_exchange Python library, use the pip package installer. This command retrieves the latest version from the Python Package Index (PyPI) and installs it into your environment:

pip install adsb_exchange

After installation, you can verify it by attempting to import the library in a Python interpreter:

import adsb_exchange
print(adsb_exchange.__version__)

JavaScript (Node.js)

For Node.js environments, the node-adsbexchange library can be installed using npm (Node Package Manager). Navigate to your project directory and execute:

npm install node-adsbexchange

To confirm the installation, you can create a simple JavaScript file and attempt to require the module:

const adsb = require('node-adsbexchange');
console.log('node-adsbexchange installed successfully');

Quickstart example

These quickstart examples demonstrate basic interaction with the ADS-B Exchange API using the aforementioned community libraries. Remember to replace YOUR_API_KEY with your actual API key obtained from ADS-B Exchange. API keys are essential for authentication and rate limiting, as detailed in the ADS-B Exchange API documentation.

Python Quickstart

This Python example uses the adsb_exchange library to fetch a list of nearby aircraft based on a specified latitude and longitude.

import adsb_exchange

# Initialize the client with your API key
# Replace 'YOUR_API_KEY' with your actual ADS-B Exchange API key
api_key = "YOUR_API_KEY"
client = adsb_exchange.Client(api_key=api_key)

# Define a central point (e.g., San Francisco Airport coordinates)
latitude = 37.6213
longitude = -122.3790
radius_miles = 50 # Search within a 50-mile radius

try:
    # Get nearby aircraft
    # The 'get_nearby_aircraft' method might take additional parameters
    # like 'icao', 'flight', etc., depending on the library's implementation.
    # Refer to the specific library's documentation for exact method signatures.
    aircraft_data = client.get_nearby_aircraft(lat=latitude, lon=longitude, radius=radius_miles)
    
    if aircraft_data and aircraft_data['ac']:
        print(f"Found {len(aircraft_data['ac'])} aircraft near ({latitude}, {longitude}):")
        for aircraft in aircraft_data['ac']:
            icao = aircraft.get('icao', 'N/A')
            flight = aircraft.get('flight', 'N/A').strip()
            alt_baro = aircraft.get('alt_baro', 'N/A')
            squawk = aircraft.get('squawk', 'N/A')
            
            print(f"  ICAO: {icao}, Flight: {flight}, Altitude: {alt_baro} ft, Squawk: {squawk}")
    else:
        print("No aircraft found in the specified area.")

except adsb_exchange.exceptions.APIError as e:
    print(f"API Error: {e}")
except Exception as e:
    print(f"An unexpected error occurred: {e}")

JavaScript (Node.js) Quickstart

This Node.js example uses node-adsbexchange to retrieve real-time flight data for a specific ICAO24 identifier.

const ADSBExchange = require('node-adsbexchange');

// Initialize the client with your API key
// Replace 'YOUR_API_KEY' with your actual ADS-B Exchange API key
const adsb = new ADSBExchange('YOUR_API_KEY');

// Example: Get data for a specific ICAO24 identifier (e.g., a common test ICAO)
const icao24Identifier = 'a84a2b'; // Example ICAO24 for a hypothetical aircraft

adsb.getAircraftData(icao24Identifier)
  .then(data => {
    if (data && data.ac && data.ac.length > 0) {
      const aircraft = data.ac[0];
      console.log(`Aircraft Data for ICAO24: ${icao24Identifier}`);
      console.log(`  Flight: ${aircraft.flight ? aircraft.flight.trim() : 'N/A'}`);
      console.log(`  Altitude (baro): ${aircraft.alt_baro} ft`);
      console.log(`  Speed (ground): ${aircraft.gs} knots`);
      console.log(`  Latitude: ${aircraft.lat}`);
      console.log(`  Longitude: ${aircraft.lon}`);
      console.log(`  Squawk: ${aircraft.squawk}`);
    } else {
      console.log(`No data found for ICAO24: ${icao24Identifier}`);
    }
  })
  .catch(error => {
    console.error(`Error fetching aircraft data: ${error.message}`);
    if (error.response) {
        console.error(`Status: ${error.response.status}, Data: ${JSON.stringify(error.response.data)}`);
    }
  });

// Example: Get nearby aircraft (similar to Python example)
const lat = 37.6213;
const lon = -122.3790;
const radius = 50; // miles

adsb.getNearbyAircraft(lat, lon, radius)
  .then(data => {
    if (data && data.ac && data.ac.length > 0) {
      console.log(`\nFound ${data.ac.length} aircraft near (${lat}, ${lon}):`);
      data.ac.forEach(aircraft => {
        const flight = aircraft.flight ? aircraft.flight.trim() : 'N/A';
        console.log(`  ICAO: ${aircraft.icao}, Flight: ${flight}, Altitude: ${aircraft.alt_baro} ft`);
      });
    } else {
      console.log(`\nNo nearby aircraft found near (${lat}, ${lon}).`);
    }
  })
  .catch(error => {
    console.error(`Error fetching nearby aircraft: ${error.message}`);
  });

Community libraries

The developer community plays a significant role in extending the accessibility of the ADS-B Exchange API through various libraries and tools. These community-driven projects often emerge to fill gaps, provide specialized functionality, or offer integrations with frameworks not officially supported. While not maintained by ADS-B Exchange directly, many community libraries are robust and widely used.

When selecting a community library, developers should consider factors such as:

  • Active Maintenance: Libraries that are regularly updated tend to be more reliable and compatible with the latest API changes. Checking the project's repository (e.g., GitHub) for recent commits and issue activity is a good practice.
  • Documentation: Comprehensive and clear documentation helps in understanding how to use the library effectively and troubleshoot issues.
  • Community Support: A vibrant community can provide assistance through forums, issue trackers, or chat channels.
  • Features: Evaluate if the library supports all the necessary API endpoints and data parsing capabilities required for your project.
  • Licensing: Ensure the library's license is compatible with your project's requirements. Many open-source libraries are distributed under permissive licenses like MIT or Apache 2.0.

Beyond Python and JavaScript, developers may find community wrappers or examples for other languages like Java, C#, or Go. These can often be discovered through public code repositories or by searching for "ADS-B Exchange API" combined with the desired programming language. For instance, the Mozilla Developer Network's guide to HTTP fundamentals provides foundational knowledge relevant to understanding how these libraries interact with web services, which can be useful when evaluating a library's underlying implementation.

It is always recommended to consult the official ADS-B Exchange API documentation in conjunction with any community library to understand the most current API specifications and best practices. This ensures that the chosen library interacts correctly with the API and that any potential rate limits or data access rules are respected.