FlightRadar 2.0.0
dotnet add package FlightRadar --version 2.0.0
NuGet\Install-Package FlightRadar -Version 2.0.0
<PackageReference Include="FlightRadar" Version="2.0.0" />
<PackageVersion Include="FlightRadar" Version="2.0.0" />
<PackageReference Include="FlightRadar" />
paket add FlightRadar --version 2.0.0
#r "nuget: FlightRadar, 2.0.0"
#:package FlightRadar@2.0.0
#addin nuget:?package=FlightRadar&version=2.0.0
#tool nuget:?package=FlightRadar&version=2.0.0
FlightRadar
This is an unofficial FlightRadar24 API wrapper designed to provide easy and efficient access to the FlightRadar24 data. It supports all current v1 endpoints, enabling you to retrieve a wide range of real-time flight information directly into your applications.
Official API Documentation
For more details on the available endpoints and how to use the official FlightRadar24 API, visit the official documentation here https://fr24api.flightradar24.com/docs/getting-started.
Installation
You can install the FlightRadar library from NuGet by running the following command in your project:
dotnet add package FlightRadar
Alternatively, you can add it via the NuGet Package Manager in Visual Studio or by editing your .csproj file directly.
FlightRadar Client Examples
Setup
// Initialize the client with your API key
var flightRadarClient = new FlightRadarClient("YOUR_API_KEY");
Airport Information
// Get detailed airport information
var fullAirport = await flightRadarClient.V1.Airports.GetFullByCodeAsync("KJFK");
if (fullAirport is not null)
Console.WriteLine($"Airport: {fullAirport.Name}, Location: {fullAirport.City}, {fullAirport.Country}");
// Get basic airport information
var airport = await flightRadarClient.V1.Airports.GetByCodeAsync("EGLL");
if (airport is not null)
Console.WriteLine($"Airport: {airport.Name} (IATA: {airport.Code.Iata})");
Airlines
// Get airline information by ICAO code
var airline = await flightRadarClient.V1.Airlines.GetByIcaoCodeAsync("UAL");
if (airline is not null)
Console.WriteLine($"Airline: {airline.Name} ({airline.Code.Icao})");
Flight Positions
// Get current flight positions with filtering
var currentFlights = await flightRadarClient.V1.FlightPositions.GetFullAsync(new FlightPositionsFilter
{
Callsigns = ["UAL123", "DLH456"],
// You can also filter by:
// - Bounds (geographical rectangle)
// - Airports
});
if (currentFlights.Any())
{
foreach (var flight in currentFlights)
{
Console.WriteLine($"Flight: {flight.Callsign}, Altitude: {flight.Altitude}ft, Speed: {flight.GroundSpeed}kts");
}
}
// Get count of flights matching criteria
var count = await flightRadarClient.V1.FlightPositions.GetCountAsync(new FlightPositionsFilter
{
OperatingAs = ["SAS", "BAW"]
});
Console.WriteLine($"Found {count} flights operating for SAS and British Airways");
Historical Data
// Get historical flight positions
var historicPositions = await flightRadarClient.V1.HistoricFlightPositions.GetFullAsync(new HistoricFlightPositionFilter
{
Timestamp = DateTime.Now.AddDays(-1),
Callsigns = ["AFR1234"]
});
foreach (var position in historicPositions)
{
Console.WriteLine($"Historic position: {position.Callsign} at {position.Timestamp}, Alt: {position.Altitude}ft");
}
Flight Summaries
// Get detailed flight summary
var flightSummary = await flightRadarClient.V1.FlightSummaries.GetFullAsync(new FlightSummaryFilter
{
FlightIds = ["12345abc"]
});
if (flightSummary.Any())
{
var flight = flightSummary.First();
Console.WriteLine($"Flight: {flight.Callsign}, From: {flight.DepartureAirport.Icao} To: {flight.DestinationAirport.Icao}");
}
Flight Tracks
// Get flight track history by flight ID
var tracks = await flightRadarClient.V1.FlightTracks.GetByFlightIdAsync("34242a02");
if (tracks.Any())
{
var firstTrack = tracks.First();
Console.WriteLine($"Track path points: {firstTrack.Tracks.Count()}, Source: {firstTrack.Tracks.First().Source}");
// Process individual track points
foreach (var point in firstTrack.Tracks.Take(5))
{
Console.WriteLine($"Time: {point.Timestamp}, Lat: {point.Latitude}, Lon: {point.Longitude}, Alt: {point.Altitude}");
}
}
API Usage Stats
// Check your API usage
var usageStats = await flightRadarClient.V1.Usage.GetAsync(TimePeriod.Last24Hours);
foreach (var stat in usageStats)
{
Console.WriteLine($"Endpoint: {stat.Endpoint}, Requests: {stat.RequestCount}, Credits used: {stat.Credits}");
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- FlightRadar.Core (>= 2.0.0)
- FlightRadar.Entities (>= 2.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.