Skip to content

See the example gallery to learn more.

authentication ¤

Functions:

Name Description
get_credentials

Reads credentials from the environment variables, overriding it with

login

Read credentials and returns the credentials needed to access the API.

login_with_username_password

Retrieve bearer token and subscription key from the API.

login_with_token_subscription_key

Login with subscription key and/or token.

get_credentials ¤

get_credentials(
    fp_config_file: Path = FP_CONFIG_FILE,
) -> TokenSubscriptionKey | UsernamePassword | None

Reads credentials from the environment variables, overriding it with the config file if it exists.

login async ¤

login(
    client: AsyncClient,
    creds: TokenSubscriptionKey
    | UsernamePassword
    | None
    | Literal["from_env"] = "from_env",
    fp_config_file: Path = FP_CONFIG_FILE,
) -> None | Authentication

Read credentials and returns the credentials needed to access the API.

By default, credentials are read from the environment variables or the config file if creds_override is not set. Then, if the credentials: - username and password is set: makes a POST request to the login endpoint - subscription_key and token is set: returns immediately - otherwise, None is returned

login_with_username_password async ¤

login_with_username_password(
    client: AsyncClient, username: str, password: str
) -> Authentication

Retrieve bearer token and subscription key from the API.

Bearer: json['userData']['accessToken'] token= query param: json['userData']['subscriptionKey']

login_with_token_subscription_key async ¤

login_with_token_subscription_key(
    _client: AsyncClient,
    subscription_key: str,
    token: str | None,
) -> Authentication | None

Login with subscription key and/or token. Falls back to anonymous access if token is expired or invalid.

JSON endpoints¤

json ¤

Classes:

Name Description
FlightListParams

Parameters to fetch metadata/history of flights for

AirportListParams

Request data to fetch metadata/history of flights

PlaybackParams

Request data to fetch historical track playback data for a given flight.

FindParams

Functions:

Name Description
with_auth

Adds authentication details to a request data dictionary.

flight_list

Query flight list data.

airport_list

Fetch aircraft arriving, departing or on ground at a given airport.

playback

Fetch historical track playback data for a given flight.

find

General search.

playback_metadata_dict

Flatten and rename important variables in the flight metadata to a

playback_track_dict

Flatten and rename each variable in this observation into a new dictionary.

playback_track_ems_dict

If the Enhanced Mode-S data is available in this observation,

playback_df

Parse each fr24.types.json.TrackData in the API response into a

flight_list_dict

Flatten a flight entry into dict, converting fr24 hex ids into integers.

flight_list_df

Parse each fr24.types.json.FlightListItem in the API response

FlightListParams dataclass ¤

FlightListParams(
    reg: str | None = None,
    flight: str | None = None,
    page: int = 1,
    limit: int = 10,
    timestamp: IntoTimestamp
    | Literal["now"]
    | None = "now",
    filter_by: Literal["historic"] | None = None,
)

Parameters to fetch metadata/history of flights for either a given aircraft registration or flight number.

Attributes:

Name Type Description
reg str | None

Aircraft registration (e.g. B-HUJ)

flight str | None

Flight number (e.g. CX8747)

page int

Page number

limit int

Number of results per page - use 100 if authenticated.

timestamp IntoTimestamp | Literal['now'] | None

Show flights with ATD before this Unix timestamp

filter_by Literal['historic'] | None

If historic, do not return scheduled or live flights

reg class-attribute instance-attribute ¤

reg: str | None = None

Aircraft registration (e.g. B-HUJ)

flight class-attribute instance-attribute ¤

flight: str | None = None

Flight number (e.g. CX8747)

page class-attribute instance-attribute ¤

page: int = 1

Page number

limit class-attribute instance-attribute ¤

limit: int = 10

Number of results per page - use 100 if authenticated.

timestamp class-attribute instance-attribute ¤

timestamp: IntoTimestamp | Literal['now'] | None = 'now'

Show flights with ATD before this Unix timestamp

filter_by class-attribute instance-attribute ¤

filter_by: Literal['historic'] | None = None

If historic, do not return scheduled or live flights

AirportListParams dataclass ¤

AirportListParams(
    airport: str,
    mode: Literal["arrivals", "departures", "ground"],
    page: int = 1,
    limit: int = 10,
    timestamp: IntoTimestamp
    | Literal["now"]
    | None = "now",
)

Request data to fetch metadata/history of flights

Attributes:

Name Type Description
airport str

IATA airport code (e.g. HKG)

mode Literal['arrivals', 'departures', 'ground']

arrivals, departures or on ground aircraft

page int

Page number

limit int

Number of results per page - use 100 if authenticated.

timestamp IntoTimestamp | Literal['now'] | None

Show flights with STA before this timestamp

airport instance-attribute ¤

airport: str

IATA airport code (e.g. HKG)

mode instance-attribute ¤

mode: Literal['arrivals', 'departures', 'ground']

arrivals, departures or on ground aircraft

page class-attribute instance-attribute ¤

page: int = 1

Page number

limit class-attribute instance-attribute ¤

limit: int = 10

Number of results per page - use 100 if authenticated.

timestamp class-attribute instance-attribute ¤

timestamp: IntoTimestamp | Literal['now'] | None = 'now'

Show flights with STA before this timestamp

PlaybackParams dataclass ¤

PlaybackParams(
    flight_id: IntoFlightId,
    timestamp: IntoTimestamp | None = None,
)

Request data to fetch historical track playback data for a given flight.

Attributes:

Name Type Description
flight_id IntoFlightId

fr24 flight id, represented in hex

timestamp IntoTimestamp | None

Actual time of departure (ATD) of the historic flight,

flight_id instance-attribute ¤

flight_id: IntoFlightId

fr24 flight id, represented in hex

timestamp class-attribute instance-attribute ¤

timestamp: IntoTimestamp | None = None

Actual time of departure (ATD) of the historic flight, Unix timestamp in seconds. Optional, but it is recommended to include it.

FindParams dataclass ¤

FindParams(query: str, limit: int = 50)

Attributes:

Name Type Description
query str

Airport, schedule (HKG-CDG), or aircraft.

query instance-attribute ¤

query: str

Airport, schedule (HKG-CDG), or aircraft.

with_auth ¤

with_auth(
    mut_request_data: dict[str, Any],
    auth: Authentication | None,
    headers: Headers,
) -> dict[str, Any]

Adds authentication details to a request data dictionary.

flight_list async ¤

flight_list(
    client: AsyncClient,
    params: FlightListParams,
    headers: Headers,
    auth: None | Authentication,
) -> Annotated[Response, FlightList]

Query flight list data.

To determine if there are more pages to query, check the response .result.response.page.more.

Includes basic information such as status, O/D, scheduled/estimated/real times: see fr24.types.json.FlightList for more details.

Parameters:

Name Type Description Default
client AsyncClient

HTTPX async client

required
auth None | Authentication

Authentication data

required

airport_list async ¤

airport_list(
    client: AsyncClient,
    params: AirportListParams,
    headers: Headers,
    auth: None | Authentication,
) -> Annotated[Response, AirportList]

Fetch aircraft arriving, departing or on ground at a given airport.

Returns on ground/scheduled/estimated/real times: see fr24.types.json.FlightListItem for more details.

Parameters:

Name Type Description Default
client AsyncClient

HTTPX async client

required
auth None | Authentication

Authentication data

required

Returns:

Type Description
Annotated[Response, AirportList]

the raw binary response, representing a JSON-encoded fr24.types.json.FlightList.

playback async ¤

playback(
    client: AsyncClient,
    params: PlaybackParams,
    headers: Headers,
    auth: None | Authentication,
) -> Annotated[Response, Playback]

Fetch historical track playback data for a given flight.

Parameters:

Name Type Description Default
client AsyncClient

HTTPX async client

required
auth None | Authentication

Authentication data

required

find async ¤

find(
    client: AsyncClient,
    params: FindParams,
    headers: Headers,
    auth: None | Authentication,
) -> Annotated[Response, Find]

General search.

playback_metadata_dict ¤

playback_metadata_dict(
    flight: FlightData,
) -> dict[str, Any]

Flatten and rename important variables in the flight metadata to a dictionary.

playback_track_dict ¤

playback_track_dict(
    point: TrackData,
) -> PlaybackTrackRecord

Flatten and rename each variable in this observation into a new dictionary.

Note

The JSON response claims that heading is available, but ADS-B only transmits the ground track. Heading is only available in EMS data.

We rename it to track to avoid confusion.

playback_track_ems_dict ¤

playback_track_ems_dict(
    point: TrackData,
) -> PlaybackTrackEMSRecord | None

If the Enhanced Mode-S data is available in this observation, flatten and rename each variable to a dictionary. Otherwise, return None.

playback_df ¤

playback_df(data: Playback) -> DataFrame

Parse each fr24.types.json.TrackData in the API response into a dataframe.

If the response is empty, a warning is logged and an empty table is returned

flight_list_dict ¤

flight_list_dict(entry: FlightListItem) -> FlightListRecord

Flatten a flight entry into dict, converting fr24 hex ids into integers.

flight_list_df ¤

flight_list_df(data: FlightList) -> DataFrame

Parse each fr24.types.json.FlightListItem in the API response into a polars dataframe.

If the response is empty, a warning is logged and an empty table is returned

gRPC endpoints¤

grpc ¤

Endpoint: https://data-feed.flightradar24.com

Service name: fr24.feed.api.v1.Feed

Methods:

  • LiveFeed
  • Playback
  • NearestFlights
  • LiveFlightsStatus
  • FollowFlight
  • TopFlights
  • LiveTrail
  • HistoricTrail
  • FetchSearchIndex
  • FlightDetails
  • PlaybackFlight

Classes:

Name Description
BoundingBox
LiveFeedParams
LiveFeedPlaybackParams
NearestFlightsParams
LiveFlightsStatusParams
FollowFlightParams
TopFlightsParams
FlightDetailsParams
PlaybackFlightParams

Functions:

Name Description
construct_request

Construct the gRPC request with encoded gRPC body.

to_protobuf_enum
live_feed
live_feed_position_buffer_dict
live_feed_flightdata_dict

Convert the protobuf message to a dictionary.

live_feed_df
live_feed_playback
live_feed_playback_df
nearest_flights
nearest_flights_nearbyflight_dict
nearest_flights_df
live_flights_status
live_flights_status_flightstatusdata_dict
live_flights_status_df
search_index

Unstable API: gateway timeout.

follow_flight_stream
top_flights
top_flights_dict
top_flights_df
live_trail

Unstable API: returns empty DATA frame as of Sep 2024

historic_trail

Unstable API: returns empty DATA frame

flight_details

contains empty DATA frame error if flight_id is not live

flight_details_dict
trail_point_dict
ems_dict

Transform Enhanced Mode-S data in the protobuf message into a dictionary.

flight_details_df
playback_flight

contains empty DATA frame error if flight_id is live

playback_flight_dict
playback_flight_df

Attributes:

Name Type Description
IntoLiveFeedRequest TypeAlias
IntoPlaybackRequest TypeAlias
IntoNearestFlightsRequest TypeAlias
IntoLiveFlightsStatusRequest TypeAlias
IntoFetchSearchIndexRequest TypeAlias
IntoFollowFlightRequest TypeAlias
IntoTopFlightsRequest TypeAlias
IntoLiveTrailRequest TypeAlias
IntoHistoricTrailRequest TypeAlias
IntoFlightDetailsRequest TypeAlias
IntoPlaybackFlightRequest TypeAlias

IntoLiveFeedRequest module-attribute ¤

IntoLiveFeedRequest: TypeAlias = Union[
    SupportsToProto[LiveFeedRequest], LiveFeedRequest
]

IntoPlaybackRequest module-attribute ¤

IntoPlaybackRequest: TypeAlias = Union[
    SupportsToProto[PlaybackRequest],
    PlaybackRequest,
    LiveFeedPlaybackParams,
]

IntoNearestFlightsRequest module-attribute ¤

IntoNearestFlightsRequest: TypeAlias = Union[
    SupportsToProto[NearestFlightsRequest],
    NearestFlightsRequest,
]

IntoLiveFlightsStatusRequest module-attribute ¤

IntoLiveFlightsStatusRequest: TypeAlias = Union[
    SupportsToProto[LiveFlightsStatusRequest],
    LiveFlightsStatusRequest,
]

IntoFetchSearchIndexRequest module-attribute ¤

IntoFetchSearchIndexRequest: TypeAlias = Union[
    SupportsToProto[FetchSearchIndexRequest],
    FetchSearchIndexRequest,
]

IntoFollowFlightRequest module-attribute ¤

IntoFollowFlightRequest: TypeAlias = Union[
    SupportsToProto[FollowFlightRequest],
    FollowFlightRequest,
]

IntoTopFlightsRequest module-attribute ¤

IntoTopFlightsRequest: TypeAlias = Union[
    SupportsToProto[TopFlightsRequest], TopFlightsRequest
]

IntoLiveTrailRequest module-attribute ¤

IntoLiveTrailRequest: TypeAlias = Union[
    SupportsToProto[LiveTrailRequest], LiveTrailRequest
]

IntoHistoricTrailRequest module-attribute ¤

IntoHistoricTrailRequest: TypeAlias = Union[
    SupportsToProto[HistoricTrailRequest],
    HistoricTrailRequest,
]

IntoFlightDetailsRequest module-attribute ¤

IntoFlightDetailsRequest: TypeAlias = Union[
    SupportsToProto[FlightDetailsRequest],
    FlightDetailsRequest,
]

IntoPlaybackFlightRequest module-attribute ¤

IntoPlaybackFlightRequest: TypeAlias = Union[
    SupportsToProto[PlaybackFlightRequest],
    PlaybackFlightRequest,
]

BoundingBox ¤

Bases: NamedTuple

Attributes:

Name Type Description
south LatitudeDeg[float]

Latitude, minimum, degrees

north LatitudeDeg[float]

Latitude, maximum, degrees

west LongitudeDeg[float]

Longitude, minimum, degrees

east LongitudeDeg[float]

Longitude, maximum, degrees

south instance-attribute ¤

Latitude, minimum, degrees

north instance-attribute ¤

Latitude, maximum, degrees

west instance-attribute ¤

Longitude, minimum, degrees

east instance-attribute ¤

Longitude, maximum, degrees

LiveFeedParams dataclass ¤

LiveFeedParams(
    bounding_box: BoundingBox,
    stats: bool = False,
    limit: int = 1500,
    maxage: DurationS[int] = 14400,
    fields: set[LiveFeedField] = (
        lambda: {"flight", "reg", "route", "type"}
    )(),
)

Bases: SupportsToProto[LiveFeedRequest]

Methods:

Name Description
to_proto

Attributes:

Name Type Description
bounding_box BoundingBox
stats bool

Whether to include stats in the given area.

limit int

Maximum number of flights (should be set to 1500 for unauthorized users,

maxage DurationS[int]

Maximum time since last message update, seconds.

fields set[LiveFeedField]

Fields to include. For unauthenticated users, a maximum of 4 fields can

bounding_box instance-attribute ¤

bounding_box: BoundingBox

stats class-attribute instance-attribute ¤

stats: bool = False

Whether to include stats in the given area.

limit class-attribute instance-attribute ¤

limit: int = 1500

Maximum number of flights (should be set to 1500 for unauthorized users, 2000 for authorized users).

maxage class-attribute instance-attribute ¤

maxage: DurationS[int] = 14400

Maximum time since last message update, seconds.

fields class-attribute instance-attribute ¤

fields: set[LiveFeedField] = field(
    default_factory=lambda: {
        "flight",
        "reg",
        "route",
        "type",
    }
)

Fields to include. For unauthenticated users, a maximum of 4 fields can be included. When authenticated, squawk, vspeed, airspace, logo_id and age can be included.

to_proto ¤

to_proto() -> LiveFeedRequest

LiveFeedPlaybackParams dataclass ¤

LiveFeedPlaybackParams(
    bounding_box: BoundingBox,
    stats: bool = False,
    limit: int = 1500,
    maxage: DurationS[int] = 14400,
    fields: set[LiveFeedField] = (
        lambda: {"flight", "reg", "route", "type"}
    )(),
    timestamp: IntoTimestamp | Literal["now"] = "now",
    duration: DurationS[int] = 7,
    hfreq: int | None = None,
)

Bases: SupportsToProto[PlaybackRequest]

Methods:

Name Description
to_proto

Attributes:

Name Type Description
bounding_box BoundingBox
stats bool

Whether to include stats in the given area.

limit int

Maximum number of flights (should be set to 1500 for unauthorized users,

maxage DurationS[int]

Maximum time since last message update, seconds.

fields set[LiveFeedField]

Fields to include.

timestamp IntoTimestamp | Literal['now']

Start timestamp

duration DurationS[int]

Duration of prefetch, floor(7.5*(multiplier)) seconds

hfreq int | None

High frequency mode

bounding_box instance-attribute ¤

bounding_box: BoundingBox

stats class-attribute instance-attribute ¤

stats: bool = False

Whether to include stats in the given area.

limit class-attribute instance-attribute ¤

limit: int = 1500

Maximum number of flights (should be set to 1500 for unauthorized users, 2000 for authorized users).

maxage class-attribute instance-attribute ¤

maxage: DurationS[int] = 14400

Maximum time since last message update, seconds.

fields class-attribute instance-attribute ¤

fields: set[LiveFeedField] = field(
    default_factory=lambda: {
        "flight",
        "reg",
        "route",
        "type",
    }
)

Fields to include. For unauthenticated users, a maximum of 4 fields can be included. When authenticated, squawk, vspeed, airspace, logo_id and age can be included.

timestamp class-attribute instance-attribute ¤

timestamp: IntoTimestamp | Literal['now'] = 'now'

Start timestamp

duration class-attribute instance-attribute ¤

duration: DurationS[int] = 7

Duration of prefetch, floor(7.5*(multiplier)) seconds

For 1x playback, this should be 7 seconds.

hfreq class-attribute instance-attribute ¤

hfreq: int | None = None

High frequency mode

to_proto ¤

to_proto() -> PlaybackRequest

NearestFlightsParams dataclass ¤

NearestFlightsParams(
    lat: LatitudeDeg[float],
    lon: LongitudeDeg[float],
    radius: DistanceM[int] = 10000,
    limit: int = 1500,
)

Bases: SupportsToProto[NearestFlightsRequest]

Methods:

Name Description
to_proto

Attributes:

Name Type Description
lat LatitudeDeg[float]

Latitude, degrees, -90 to 90

lon LongitudeDeg[float]

Longitude, degrees, -180 to 180

radius DistanceM[int]

Radius, metres

limit int

Maximum number of aircraft to return

lat instance-attribute ¤

Latitude, degrees, -90 to 90

lon instance-attribute ¤

Longitude, degrees, -180 to 180

radius class-attribute instance-attribute ¤

radius: DistanceM[int] = 10000

Radius, metres

limit class-attribute instance-attribute ¤

limit: int = 1500

Maximum number of aircraft to return

to_proto ¤

to_proto() -> NearestFlightsRequest

LiveFlightsStatusParams dataclass ¤

LiveFlightsStatusParams(flight_ids: Sequence[IntoFlightId])

Bases: SupportsToProto[LiveFlightsStatusRequest]

Methods:

Name Description
to_proto

Attributes:

Name Type Description
flight_ids Sequence[IntoFlightId]

List of flight IDs to get status for

flight_ids instance-attribute ¤

flight_ids: Sequence[IntoFlightId]

List of flight IDs to get status for

to_proto ¤

to_proto() -> LiveFlightsStatusRequest

FollowFlightParams dataclass ¤

FollowFlightParams(
    flight_id: IntoFlightId,
    restriction_mode: ValueType | str | bytes = NOT_VISIBLE,
)

Bases: SupportsToProto[FollowFlightRequest]

Methods:

Name Description
to_proto

Attributes:

Name Type Description
flight_id IntoFlightId

Flight ID to fetch details for.

restriction_mode ValueType | str | bytes

FAA LADD visibility mode.

flight_id instance-attribute ¤

flight_id: IntoFlightId

Flight ID to fetch details for. Must be live, or the response will contain an empty DATA frame error.

restriction_mode class-attribute instance-attribute ¤

restriction_mode: ValueType | str | bytes = NOT_VISIBLE

FAA LADD visibility mode.

to_proto ¤

to_proto() -> FollowFlightRequest

TopFlightsParams dataclass ¤

TopFlightsParams(limit: int = 10)

Bases: SupportsToProto[TopFlightsRequest]

Methods:

Name Description
to_proto

Attributes:

Name Type Description
limit int

Maximum number of top flights to return (1-10)

limit class-attribute instance-attribute ¤

limit: int = 10

Maximum number of top flights to return (1-10)

to_proto ¤

to_proto() -> TopFlightsRequest

FlightDetailsParams dataclass ¤

FlightDetailsParams(
    flight_id: IntoFlightId,
    restriction_mode: ValueType | str | bytes = NOT_VISIBLE,
    verbose: bool = True,
)

Bases: SupportsToProto[FlightDetailsRequest]

Methods:

Name Description
to_proto

Attributes:

Name Type Description
flight_id IntoFlightId

Flight ID to fetch details for.

restriction_mode ValueType | str | bytes

FAA LADD visibility mode.

verbose bool

Whether to include [fr24.proto.v1_pb2.FlightDetailsResponse.flight_plan]

flight_id instance-attribute ¤

flight_id: IntoFlightId

Flight ID to fetch details for. Must be live, or the response will contain an empty DATA frame error.

restriction_mode class-attribute instance-attribute ¤

restriction_mode: ValueType | str | bytes = NOT_VISIBLE

FAA LADD visibility mode.

verbose class-attribute instance-attribute ¤

verbose: bool = True

Whether to include [fr24.proto.v1_pb2.FlightDetailsResponse.flight_plan] and [fr24.proto.v1_pb2.FlightDetailsResponse.aircraft_details] in the response.

to_proto ¤

to_proto() -> FlightDetailsRequest

PlaybackFlightParams dataclass ¤

PlaybackFlightParams(
    flight_id: IntoFlightId, timestamp: IntoTimestamp
)

Bases: SupportsToProto[PlaybackFlightRequest]

Methods:

Name Description
to_proto

Attributes:

Name Type Description
flight_id IntoFlightId

Flight ID to fetch details for.

timestamp IntoTimestamp

Actual time of departure (ATD) of the historic flight

flight_id instance-attribute ¤

flight_id: IntoFlightId

Flight ID to fetch details for. Must not be live, or the response will contain an empty DATA frame error.

timestamp instance-attribute ¤

timestamp: IntoTimestamp

Actual time of departure (ATD) of the historic flight

to_proto ¤

to_proto() -> PlaybackFlightRequest

construct_request ¤

construct_request(
    method_name: str, message: Message, headers: Headers
) -> Request

Construct the gRPC request with encoded gRPC body.

to_protobuf_enum ¤

to_protobuf_enum(
    enum: _V | str | bytes,
    type_wrapper: _EnumTypeWrapper[_V],
) -> _V

live_feed async ¤

live_feed(
    client: AsyncClient,
    message: IntoLiveFeedRequest,
    headers: Headers,
) -> Annotated[Response, LiveFeedResponse]

live_feed_position_buffer_dict ¤

live_feed_position_buffer_dict(
    position_buffer: PositionBuffer,
) -> list[RecentPositionRecord]

live_feed_flightdata_dict ¤

live_feed_flightdata_dict(lfr: Flight) -> FlightRecord

Convert the protobuf message to a dictionary.

live_feed_df ¤

live_feed_df(data: LiveFeedResponse) -> DataFrame

live_feed_playback async ¤

live_feed_playback(
    client: AsyncClient,
    message: IntoPlaybackRequest,
    headers: Headers,
) -> Annotated[Response, LiveFeedResponse]

live_feed_playback_df ¤

live_feed_playback_df(data: PlaybackResponse) -> DataFrame

nearest_flights async ¤

nearest_flights(
    client: AsyncClient,
    message: IntoNearestFlightsRequest,
    headers: Headers,
) -> Annotated[Response, NearestFlightsResponse]

nearest_flights_nearbyflight_dict ¤

nearest_flights_nearbyflight_dict(
    nf: NearbyFlight,
) -> NearbyFlightRecord

nearest_flights_df ¤

nearest_flights_df(
    data: NearestFlightsResponse,
) -> DataFrame

live_flights_status async ¤

live_flights_status(
    client: AsyncClient,
    message: IntoLiveFlightsStatusRequest,
    headers: Headers,
) -> Annotated[Response, LiveFlightsStatusResponse]

live_flights_status_flightstatusdata_dict ¤

live_flights_status_flightstatusdata_dict(
    flight_status: LiveFlightStatus,
) -> LiveFlightStatusRecord

live_flights_status_df ¤

live_flights_status_df(
    data: LiveFlightsStatusResponse,
) -> DataFrame

search_index async ¤

search_index(
    client: AsyncClient,
    message: IntoFetchSearchIndexRequest,
    headers: Headers,
) -> Annotated[Response, FetchSearchIndexResponse]

Unstable API: gateway timeout.

follow_flight_stream async ¤

follow_flight_stream(
    client: AsyncClient,
    message: IntoFollowFlightRequest,
    headers: Headers,
) -> AsyncGenerator[Annotated[bytes, ProtoError]]

top_flights async ¤

top_flights(
    client: AsyncClient,
    message: IntoTopFlightsRequest,
    headers: Headers,
) -> Annotated[Response, TopFlightsResponse]

top_flights_dict ¤

top_flights_dict(ff: FollowedFlight) -> TopFlightRecord

top_flights_df ¤

top_flights_df(data: TopFlightsResponse) -> DataFrame

live_trail async ¤

live_trail(
    client: AsyncClient,
    message: IntoLiveTrailRequest,
    headers: Headers,
) -> Annotated[Response, LiveTrailResponse]

Unstable API: returns empty DATA frame as of Sep 2024

Contains empty DATA frame error if flight_id is not live

historic_trail async ¤

historic_trail(
    client: AsyncClient,
    message: IntoHistoricTrailRequest,
    headers: Headers,
) -> Annotated[Response, HistoricTrailResponse]

Unstable API: returns empty DATA frame

flight_details async ¤

flight_details(
    client: AsyncClient,
    message: IntoFlightDetailsRequest,
    headers: Headers,
) -> Annotated[Response, FlightDetailsResponse]

contains empty DATA frame error if flight_id is not live

flight_details_dict ¤

flight_details_dict(
    response: FlightDetailsResponse,
) -> FlightDetailsRecord

trail_point_dict ¤

trail_point_dict(tp: TrailPoint) -> TrailPointRecord

ems_dict ¤

ems_dict(ems: EMSInfo) -> EMSRecord

Transform Enhanced Mode-S data in the protobuf message into a dictionary.

This is similar to EMS data in the JSON API response, specifically fr24.json.playback_track_ems_dict, which gets converted to fr24.types.cache.PlaybackTrackEMSRecord. However, several fields are missing:

  • timestamp
  • autopilot
  • track
  • roll
  • precision
  • emergency
  • tcas_acas
  • heading

flight_details_df ¤

flight_details_df(data: FlightDetailsResponse) -> DataFrame

playback_flight async ¤

playback_flight(
    client: AsyncClient,
    message: IntoPlaybackFlightRequest,
    headers: Headers,
) -> Annotated[Response, PlaybackFlightResponse]

contains empty DATA frame error if flight_id is live

playback_flight_dict ¤

playback_flight_dict(
    response: PlaybackFlightResponse,
) -> PlaybackFlightRecord

playback_flight_df ¤

playback_flight_df(
    data: PlaybackFlightResponse,
) -> DataFrame