Public aircraft & flightroute api Built in Rust for Docker, using PostgreSQL & Redis

Last update: Jun 19, 2022

api.adsbdb.com

public aircraft & flightroute api

Built in Rust for Docker, using PostgreSQL & Redis
See typescript branch for original typescript version


check adsbdb twitter for any status updates

Please report any incorrect data to the issues page, with the Data tag.

With thanks to;

  • PlaneBase for the aircraft data.
  • The flight route data is the work of David Taylor, Edinburgh and Jim Mason, Glasgow, and may not be copied, published, or incorporated into other databases without the explicit permission of David J Taylor, Edinburgh.
  • Guillaume Michel, for the icao to n-number conversion
  • airport-data for aircraft photographs

  • Routes

    https://api.adsbdb.com/v[semver.major]/aircraft/[MODE_S]

    {
    	"response":{
    		"aircraft":{
    			"type": string,
    			"icao_type": string,
    			"manufacturer": string,
    			"mode_s": string,
    			"n_number": string,
    			"registered_owner_country_iso_name": string,
    			"registered_owner_country_name": string,
    			"registered_owner_operator_flag_code": string,
    			"registered_owner": string,
    			"url_photo":string || null,
    			"url_photo_thumbnail":string || null
    		}
    	}
    }
    

    Unknown aircraft return status 404 with

    { "response": "unknown aircraft"}

    Convert from MODE-S string to N-Number string https://api.adsbdb.com/v[semver.major]/mode-s/[MODE_S]

    {
    	"response": string
    }
    

    Convert from N-Number string to Mode_S string https://api.adsbdb.com/v[semver.major]/n-number/[N-NUMBER]

    {
    	"response": string
    }
    

    https://api.adsbdb.com/v[semver.major]/callsign/[CALLSIGN]

    {
    	"response": {
    		"flightroute":{
    			"callsign": string,
    
    			"origin": {
    				"country_iso_name": string,
    				"country_name": string,
    				"elevation": number,
    				"iata_code": string,
    				"icao_code": string,
    				"latitude": number,
    				"longitude": number,
    				"municipality": string,
    				"name": string,
    			},
    
    			"destination": {
    				"country_iso_name": string,
    				"country_name": string,
    				"elevation": number,
    				"iata_code": string,
    				"icao_code": string,
    				"latitude": number,
    				"longitude": number,
    				"municipality": string,
    				"name": string,
    			}
    		}
    	}
    }

    For a small number of flightroutes, midpoints are also included

    	{
    		"midpoint": {
    				"country_iso_name": string,
    				"country_name": string,
    				"elevation": number,
    				"iata_code": string,
    				"icao_code": string,
    				"latitude": number,
    				"longitude": number,
    				"municipality": string,
    				"name": string,
    			}
    	}

    Unknown callsign return status 404 with

    { "response": "unknown callsign"}

    https://api.adsbdb.com/v[semver.major]/aircraft/[MODE_S]?callsign=[CALLSIGN]

    {
    	"response": {
    		
    		"aircraft":{
    			"type": string,
    			"icao_type": string,
    			"manufacturer": string,
    			"mode_s": string,
    			"n_number": string,
    			"registered_owner_country_iso_name": string,
    			"registered_owner_country_name": string,
    			"registered_owner_operator_flag_code": string,
    			"registered_owner": string,
    			"url_photo":string || null,
    			"url_photo_thumbnail":string || null
    		},
    
    		"flightroute":{
    			"callsign": string,
    
    			"origin": {
    				"country_iso_name": string,
    				"country_name": string,
    				"elevation": number,
    				"iata_code": string,
    				"icao_code": string,
    				"latitude": number,
    				"longitude": number,
    				"municipality": string,
    				"name": string,
    			},
    
    			"destination": {
    				"country_iso_name": string,
    				"country_name": string,
    				"elevation": number,
    				"iata_code": string,
    				"icao_code": string,
    				"latitude": number,
    				"longitude": number,
    				"municipality": string,
    				"name": string,
    			}
    		}
    	}
    }

    If an unknown callsign is provided as a query param, but the aircraft is known, response will be status 200 with just aircraft


    Download

    See releases

    download (x86_64_musl one liner)

    wget https://www.github.com/mrjackwills/adsbdb/releases/latest/download/adsbdb_linux_x86_64_musl.tar.gz &&
    tar xzvf adsbdb_linux_x86_64_musl.tar.gz adsbdb

    Run

    Operate docker compose containers via

    ./run.sh

    Tests

    Requires postgres & redis to both be operational and seeded with valid data

    # Watch
    cargo watch -q -c -w src/ -x 'test  -- --test-threads=1 --nocapture'
    
    # Run all 
    cargo test -- --test-threads=1 --nocapture

    GitHub

    https://github.com/mrjackwills/adsbdb
    You might also like...

    A fast uuid generator in Python using Rust

    ruuid A fast UUID generator for Python built using Rust. Its a simple wrapper on top of Rust's UUID crate. How to use? Installation: pip3 install ruui

    Aug 27, 2021

    A mixer for jack-audio using rust and druid UI

    A mixer for jack-audio using rust and druid UI

    A simple mixer to allow me to use my midi controller (Novation LaunchControl XL) on linux and also to explore the new druid ui. Features volume faders

    Sep 24, 2021

    (Ab)using technology for fun & profit.

    (Ab)using technology for fun & profit. Code accompanying my blog

    Jun 14, 2022

    Serialize & deserialize device tree binary using serde

    serde_device_tree Use serde framework to deserialize Device Tree Blob binary files; no_std compatible. Use this library Run example: cargo run --examp

    May 30, 2022

    A turing-complete programming language using only zero-width unicode characters, inspired by brainfuck and whitespace.

    Zero-Width A turing-complete programming language using only zero-width unicode characters, inspired by brainfuck and whitespace. Currently a (possibl

    Jan 14, 2022

    Quantogram - Approximate Quantile calculation using Histograms

    Quantogram - Approximate Quantile calculation using Histograms

    Quantogram - Approximate Quantile calculation using Histograms A library for Estimating Online Quantiles of Streams Quantogram accepts a stream of flo

    Feb 15, 2022

    Parse and encoding of data using the SCTE-35 standard.

    SCTE-35 lib and parser for Rust Work in progress! This library provide access to parse and encoding of data using the SCTE-35 standard. This standard

    May 6, 2022

    Leetcode Solutions in Rust, Advent of Code Solutions in Rust and more

    RUST GYM Rust Solutions Leetcode Solutions in Rust AdventOfCode Solutions in Rust This project demostrates how to create Data Structures and to implem

    Jun 25, 2022

    Simple autoclicker written in Rust, to learn the Rust language.

    RClicker is an autoclicker written in Rust, written to learn more about the Rust programming language. RClicker was was written by me to learn more ab

    Mar 1, 2022
    Comments
    • 1. [NEW FEATURE] n-number & icao routes

      Describe the solution you'd like add two new routes /icao, and /n-number, to convert from one to the other

      /icao/A897E4 => N653AE /n-number/N653AE => A897E4

      Reviewed by mrjackwills at 2022-06-01 20:13
    • 2. [NEW FEATURE] Public rust response serde API

      Is your feature request related to a problem? Please describe. When calling this library from Rust code, I would like the responses to use the same data structure as this library.

      Describe the solution you'd like Release a library exporting https://github.com/mrjackwills/adsbdb/blob/main/src/api/response.rs as a public API.

      Reviewed by wcampbell0x2a at 2022-06-13 11:22
    • 3. [NEW FEATURE] FAA search

      Is your feature request related to a problem? Please describe. Use the n-number to search FAA db for unknown aircraft

      eventually search foreign db's as well

      Reviewed by mrjackwills at 2022-06-01 20:14
    A tool to use docker / podman / oci containers with rust

    contain-rs A tool to use docker / podman / oci containers with rust TODO improve error types improve error reporting handle std error for child proces

    Apr 17, 2022
    An API for getting questions from http://either.io implemented fully in Rust, using reqwest and some regex magic. Provides asynchronous and blocking clients respectively.

    eithers_rust An API for getting questions from http://either.io implemented fully in Rust, using reqwest and some regex magic. Provides asynchronous a

    Oct 24, 2021
    Simple daemon built with Rust to track metrics.

    Marvin - Metrics Tracker What I cannot create, I do not understand. — Richard Feynman Simple daemon built with Rust to track metrics. The goal is run

    Aug 30, 2021
    Gecko is a high-level, general-purpose programming language built on top of the LLVM project.
     Gecko is a high-level, general-purpose programming language built on top of the LLVM project.

    Gecko is a high-level, general-purpose programming language built on top of the LLVM project. Gecko Technology & principles Gecko is a general-purpose

    Jun 13, 2022
    Nyah is a programming language runtime built for high performance and comes with a scripting language.

    ?? Nyah ( Unfinished ) Nyah is a programming language runtime built for high performance and comes with a scripting language. ??️ Status Nyah is not c

    Mar 6, 2022
    Rust library for hardware accelerated drawing of 2D shapes, images, and text, with an easy to use API.
    Rust library for hardware accelerated drawing of 2D shapes, images, and text, with an easy to use API.

    Speedy2D Hardware-accelerated drawing of shapes, images, and text, with an easy to use API. Speedy2D aims to be: The simplest Rust API for creating a

    Jun 14, 2022
    Code to follow along the "Zero To Production" book on API development in Rust.

    Zero To Production / Code (Chapter 10 - Part 1) Zero To Production In Rust is an opinionated introduction to backend development using Rust. This repo

    Jun 22, 2022
    Conversion Tools API Rust client

    ConversionTools Rust This Conversion Tools API Rust client allows you to use the site API and convert files faster and more conveniently. Site Convers

    Jan 23, 2022
    Interact with the crate's API

    cargo-crate-api Interact with the crate's API Documentation Installation Getting Started Reference FAQ Contribute CHANGELOG Install Download a pre-bui

    Apr 13, 2022
    Rust explained using easy English
    Rust explained using easy English

    Update 22 December 2020: mdBook can be found here. 28 November 2020: Now also available in simplified Chinese thanks to kumakichi! 1 February 2021: No

    Jun 25, 2022