Callsign → Route
Map a live callsign (flight callsign broadcast on ADS-B, e.g. BAW178) to departure and arrival airports. When SkyLink has an exact callsign match, the response includes departure_icao and arrival_icao with confidence: "high". If the exact callsign is absent, the API falls back to an airline-level route list in the routes array (same shape as airport routes).
Requirements
x-api-key on every request (direct subscription). Learn more →Request
https://data.skylinkapi.com/v3.1/routes/callsign/{callsign}| Parameter | Type | Required | Description |
|---|---|---|---|
callsign | string | Yes | Flight callsign path parameter — airline designator plus numeric suffix, e.g. BAW178 |
Response
Exact match example:
{
"callsign": "BAW178",
"callsign_prefix": "BAW",
"airline_code": "BAW",
"departure_icao": "KJFK",
"arrival_icao": "EGLL",
"airports": ["KJFK", "EGLL"],
"confidence": "high",
"source": "vrs"
}Fallback example (no exact callsign row — airline-level routes returned):
{
"callsign": "BAW999",
"callsign_prefix": "BAW",
"airline_code": "BAW",
"departure_icao": null,
"arrival_icao": null,
"airports": null,
"confidence": "low",
"source": "vrs",
"routes": [
{
"departure": "LHR",
"arrival": "JFK",
"airlines": ["British Airways"],
"km": 5555,
"duration_min": 430
}
]
}| Field | Type | Required | Null? | Description |
|---|---|---|---|---|
callsign | string | Yes | Never | Echo of the requested callsign |
callsign_prefix | string | Yes | Never | ICAO airline prefix extracted from the callsign |
airline_code | string | Yes | Never | Resolved airline ICAO code |
departure_icao | string | Exact match | Yes (fallback) | Departure airport ICAO when known |
arrival_icao | string | Exact match | Yes (fallback) | Arrival airport ICAO when known |
airports | array | Exact match | Yes (fallback) | Ordered [departure, arrival] ICAO codes |
confidence | string | Yes | Never | Match quality — high for exact callsign hits |
source | string | Yes | Never | Opaque route data source identifier from the API |
routes | array | Fallback | Yes (exact match) | Airline-level route list when no exact callsign row exists — same item shape as Airport Routes |
Important: Treat confidence: "high" as a reliable city pair with departure_icao/arrival_icao. When only routes[] is present, show the top route as a suggestion and let the user confirm — do not assume the first row is the active flight.
Client types
"""Route detection response models for /routes/* endpoints."""from __future__ import annotationsfrom dataclasses import dataclass@dataclassclass RoutePair: departure: str arrival: str airlines: list[str] km: int duration_min: int@dataclassclass CallsignRouteResponse: """Exact callsign match from GET /routes/callsign/{callsign}.""" callsign: str callsign_prefix: str airline_code: str departure_icao: str arrival_icao: str airports: list[str] confidence: str source: str routes: list[RoutePair] | None = None@dataclassclass AirportRoutesResponse: code: str direction: str count: int routes: list[RoutePair]@dataclassclass RoutePairsResponse: count: int routes: list[RoutePair]@dataclassclass RouteGuess: """Shape returned by route_guess() helper.""" callsign: str departure: str | None arrival: str | None confidence: str source: strIntegration
Resolve a live ADS-B callsign to a departure/arrival guess for map overlays and flight cards.
The example below caches callsign lookups for 24 hours because assigned routes change infrequently. Each request uses explicit timeouts (10 s connect / 15 s read). The helper normalizes both exact-match and fallback responses into a single RouteGuess object for UI code.
import osimport timefrom dataclasses import dataclassimport requestsHEADERS = { "x-api-key": os.getenv("SKYLINK_API_KEY", "YOUR_API_KEY")}BASE = "https://data.skylinkapi.com/v3.1"CACHE: dict[str, tuple[dict, float]] = {}ROUTE_TTL = 86_400 # 24 h@dataclassclass RouteGuess: callsign: str departure: str | None arrival: str | None confidence: str source: strdef fetch_route_by_callsign(callsign: str) -> dict: callsign = callsign.upper().strip() key = f"route:callsign:{callsign}" cached = CACHE.get(key) if cached and time.time() < cached[1]: return cached[0] try: r = requests.get( f"{BASE}/routes/callsign/{callsign}", headers=HEADERS, timeout=(10, 15), ) except requests.Timeout as exc: raise RuntimeError(f"SkyLink timeout resolving route for {callsign}") from exc r.raise_for_status() data = r.json() CACHE[key] = (data, time.time() + ROUTE_TTL) return datadef route_guess(callsign: str) -> RouteGuess | None: data = fetch_route_by_callsign(callsign) dep = data.get("departure_icao") arr = data.get("arrival_icao") if not dep and not arr: routes = data.get("routes") or [] if not routes: return None top = routes[0] dep, arr = top.get("departure"), top.get("arrival") return RouteGuess( callsign=data.get("callsign", callsign), departure=dep, arrival=arr, confidence=data.get("confidence", "unknown"), source=data.get("source", "vrs"), )if __name__ == "__main__": import json from dataclasses import asdict guess = route_guess("BAW178") print(json.dumps(asdict(guess), indent=2) if guess else "Route not found")Implementation notes
Code normalization. Uppercase callsigns before lookup (baw178 → BAW178). Strip whitespace from ADS-B feeds.
Airport code mixing. Route rows may use IATA or ICAO depending on the source row — normalize through Airports before joining with other datasets.
Error responses
Validation 422: Routes hub.
Your SkyLink licence key, for keys bought direct from skylinkapi.com.
In: header
Path Parameters
Response Body
application/json
application/json
curl -X GET "https://data.skylinkapi.com/v3.1/routes/callsign/UAL100"null{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}