SkillAgentSearch skills...

Adsbdb

public api for aircraft, airlines, & flightroutes

Install / Use

/learn @mrjackwills/Adsbdb
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

<p align="center"> <img src='./.github/logo.svg' width='125px'/> <h1 align="center"><a href='https://api.adsbdb.com' target='_blank' rel='noopener noreferrer'>api.adsbdb.com</a></h1> </p> <p align="center"> public aircraft, airline, and flightroute api<br> Built in <a href='https://www.rust-lang.org/' target='_blank' rel='noopener noreferrer'>Rust</a>, with <a href='https://github.com/tokio-rs/axum' target='_blank' rel='noopener noreferrer'>axum</a>, for <a href='https://www.docker.com/' target='_blank' rel='noopener noreferrer'>Docker</a>, using <a href='https://www.postgresql.org/' target='_blank' rel='noopener noreferrer'>PostgreSQL</a> & <a href='https://www.redis.io/' target='_blank' rel='noopener noreferrer'>Redis</a> <br> See the <a href='https://www.github.com/mrjackwills/adsbdb_site/' target='_blank' rel='noopener noreferrer'>frontend source code for here</a> <br> <sub> See typescript branch for original typescript version</sub> </p> <hr> <p> check <a href='https://twitter.com/adsbdb' target='_blank' rel='noopener noreferrer'>adsbdb twitter</a> for any status updates, and please report any incorrect data to the <a href="https://github.com/mrjackwills/adsbdb/issues/new/choose" target='_blank' rel='noopener noreferrer'>issues page</a>, with the <strong>Data</strong> tag. <br> With thanks to; <li> <a href="http://planebase.biz/" target='_blank' rel='noopener noreferrer'>PlaneBase</a> for the aircraft data. </li> <li> 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. </li> <li> <a href="https://github.com/guillaumemichel/icao-nnumber_converter" target='_blank' rel='noopener noreferrer'>Guillaume Michel</a>, for the icao to n-number conversion </li> <li> <a href='https://www.airport-data.com' target='_blank' rel='noopener noreferrer'>airport-data</a> for aircraft photographs </li> </p> <hr>

GET Routes

https://api.adsbdb.com/v[semver.major]/aircraft/[MODE_S || REGISTRATION] <br>or<br> https://api.adsbdb.com/v[semver.major]/aircraft/random

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

Unknown aircraft return status 404 with

{ "response": "unknown aircraft"}

https://api.adsbdb.com/v[semver.major]/callsign/[CALLSIGN] <br>or<br> https://api.adsbdb.com/v[semver.major]/callsign/random

{
	"response": {
		"flightroute":{
			"callsign": string,

			"callsign_icao": string || null,
			"callsign_iata": string || null,

			"airline": {
				"name": string,
				"icao": string,
				"iata": string || null,
				"country": string,
				"country_iso": string,
				"callsign": string || null
			} || null,

			"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 || REGISTRATION]?callsign=[CALLSIGN]

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

		"flightroute":{
			"callsign": string,

			"callsign_icao": string || null,
			"callsign_iata": string || null,

			"airline": {
				"name": string,
				"icao": string,
				"iata": string || null,
				"country": string,
				"country_iso": string,
				"callsign": string || null
			} || null,

			"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


https://api.adsbdb.com/v[semver.major]/airline/[AIRLINE_ICAO || AIRLINE_IATA ] <br>or<br> https://api.adsbdb.com/v[semver.major]/airline/random

{
	"response":{
		[
			{
				"name": string,
				"icao": string,
				"iata": string || null,
				"country": string,
				"country_iso": string,
				"callsign": string || null
			},
			...
		]
	}
}

Unknown airline return status 404 with

{ "response": "unknown airline"}

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

{
	"response": {
		"daily": {
			"aircraft": [
				{
					"url": string,
					"count": number
				}
			],
			"airline": [
				{
					"url": string,
					"count": number
				}
			],
			"callsign": [
				{
					"url": string,
					"count": number
				}
			],
			"mode_s": [
				{
					"url": string,
					"count": number
				}
			],
			"n_number": [
				{
					"url": string,
					"count": number
				}
			],
			"online": [
				{
					"url": string,
					"count": number
				}
			],
			"stats": [
				{
					"url": string,
					"count": number
				}
			],
			"aggregate": number
		},
		"total": {
				"aircraft": [
				{
					"url": string,
					"count": number
				}
			],
			"airline": [
				{
					"url": string,
					"count": number
				}
			],
			"callsign": [
				{
					"url": string,
					"count": number
				}
			],
			"mode_s": [
				{
					"url": string,
					"count": number
				}
			],
			"n_number": [
				{
					"url": string,
					"count": number
				}
			],
			"online": [
				{
					"url": string,
					"count": number
				}
			],
			"stats": [
				{
					"url": string,
					"count": number
				}
			],
			"aggregate": number
		}
	}
}


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 }

PATCH Routes

When env.allow_update is correctly set, and the PATCH request contains a valid Authorization header, Aircraft and Callsign can be modified.

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

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

Warning: mode_s, url_photo, and url_photo_thumbnail cannot be modified.


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

	{
		"origin": string,
		"destination": string
	}

Warning: Both origin and destination need to be valid ICAO airport codes.


Download

See <a href="https://github.com/mrjackwills/adsbdb/releases" target='_blank' rel='noopener noreferrer'>releases</a>

download one liner

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

Run

Operate docker compose containers via

./run.sh

Build

cargo build --release
<strike> Build using <a href='https://github.com/cross-rs/cross' target='_blank' rel='noopener noreferrer'>cross</a>, for x86_64 linux musl targets, in order to run in an Alpine based container
cross build --target x86_64-unknown-linux-musl --release
</strike>

Tests

Requires both postgres, seeded with data, and redis, operational

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

# Run all 
cargo test -- --test-threads=1 --nocapture

Related Skills

View on GitHub
GitHub Stars223
CategoryDevelopment
Updated1d ago
Forks13

Languages

Rust

Security Score

100/100

Audited on Apr 2, 2026

No findings