<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Coder Legion - Recent posts tagged notamapi</title>
<link>https://coderlegion.com/tag/notamapi</link>
<description>Powered by Question2Answer</description>
<item>
<title>Replay a Flight After It Lands: Historical Flight Tracker API</title>
<link>https://coderlegion.com/25985/replay-a-flight-after-it-lands-historical-flight-tracker-api</link>
<description>&lt;p&gt;For developers, historical flight data opens up a more useful layer of analysis. Instead of working with only a final flight status, you can work with timestamped aircraft positions, altitude changes, speed values, route movement, ground status, and aircraft identifiers after the flight is completed.&lt;/p&gt;
&lt;p&gt;The &lt;a rel=&quot;nofollow&quot; href=&quot;https://aviation-edge.com/historical-flight-radar-and-flight-tracker-api/&quot;&gt;Aviation Edge Historical Flight Tracker API&lt;/a&gt; provides past flight movement data through a REST API. It returns recorded aircraft positions, altitude, direction, speed, timestamps, airline details, aircraft identifiers, route information, and final flight status.&lt;/p&gt;
&lt;p&gt;In this article, we will look at what the API returns, how developers can work with the data, and what you can build with past flight tracker data.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dev-to-uploads.s3.us-east-2.amazonaws.com/uploads/articles/4tqxj795wrw907faadvu.jpg&quot; alt=&quot;Historical Flight Tracker API&quot;&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;what-the-api-returns&quot;&gt;What The API Returns&lt;/h3&gt;
&lt;p&gt;The Historical Flight Tracking API is built for retrieving detailed position data for past flights.&lt;/p&gt;
&lt;p&gt;A response includes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Departure and arrival airport codes&lt;/li&gt;
&lt;li&gt;Scheduled departure and arrival times&lt;/li&gt;
&lt;li&gt;Airline IATA and ICAO codes&lt;/li&gt;
&lt;li&gt;Flight IATA and ICAO numbers&lt;/li&gt;
&lt;li&gt;Aircraft ICAO24, aircraft type code, and registration number&lt;/li&gt;
&lt;li&gt;Final flight status&lt;/li&gt;
&lt;li&gt;Squawk information when available&lt;/li&gt;
&lt;li&gt;A flightPositions array with recorded movement points&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Each item in the flightPositions array represents a point in the aircraft’s journey.&lt;/p&gt;
&lt;p&gt;Those position points include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;latitude&lt;/li&gt;
&lt;li&gt;longitude&lt;/li&gt;
&lt;li&gt;altitude&lt;/li&gt;
&lt;li&gt;direction&lt;/li&gt;
&lt;li&gt;horizontal speed&lt;/li&gt;
&lt;li&gt;vertical speed&lt;/li&gt;
&lt;li&gt;ground/airborne status&lt;/li&gt;
&lt;li&gt;timestamp&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;That makes the API useful for rebuilding a past flight path, plotting aircraft movement on a map, or analyzing how a flight progressed from gate to gate.&lt;/p&gt;
&lt;hr&gt;
&lt;h5 id=&quot;example-request&quot;&gt;Example Request&lt;/h5&gt;
&lt;p&gt;Here is an example request for historical tracking data for a flight from London Heathrow.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-http&quot;&gt;GET https://aviation-edge.com/v2/public/flight_track_history?key=YOUR_API_KEY&amp;amp;depIata=LHR&amp;amp;flightIata=BA203&amp;amp;depDate=2025-10-20
&lt;/code&gt;&lt;/pre&gt;
&lt;blockquote&gt;&lt;p&gt;You can review the full parameter list and API specs in the &lt;a rel=&quot;nofollow&quot; href=&quot;https://aviation-edge.com/developers/#historical_tracker&quot;&gt;Historical Flight Tracker API documentation&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h5 id=&quot;example-output&quot;&gt;Example Output&lt;/h5&gt;
&lt;pre&gt;&lt;code class=&quot;language-json&quot;&gt;[
  {
    &quot;aircraft&quot;: {
      &quot;icao24&quot;: &quot;40749B&quot;,
      &quot;icaoCode&quot;: &quot;B789&quot;,
      &quot;regNumber&quot;: &quot;G-ZBKR&quot;
    },
    &quot;airline&quot;: {
      &quot;iataCode&quot;: &quot;BA&quot;,
      &quot;icaoCode&quot;: &quot;BAW&quot;
    },
    &quot;arrival&quot;: {
      &quot;iataNumber&quot;: &quot;BOS&quot;,
      &quot;icaoNumber&quot;: &quot;KBOS&quot;,
      &quot;scheduledTime&quot;: &quot;2025-10-20T20:10:00.000&quot;
    },
    &quot;departure&quot;: {
      &quot;iataNumber&quot;: &quot;LHR&quot;,
      &quot;icaoNumber&quot;: &quot;EGLL&quot;,
      &quot;scheduledTime&quot;: &quot;2025-10-20T17:35:00.000&quot;
    },
    &quot;flight&quot;: {
      &quot;iataNumber&quot;: &quot;BA203&quot;,
      &quot;icaoNumber&quot;: &quot;BAW50G&quot;
    },
    &quot;flightPositions&quot;: [
      {
        &quot;altitude&quot;: &quot;0.00&quot;,
        &quot;direction&quot;: &quot;90.00&quot;,
        &quot;horizontal_speed&quot;: &quot;1.85&quot;,
        &quot;isGround&quot;: 1,
        &quot;latitude&quot;: &quot;51.469400&quot;,
        &quot;longitude&quot;: &quot;-0.471700&quot;,
        &quot;updated&quot;: 1760978610,
        &quot;vspeed&quot;: &quot;0.00&quot;
      },
      {
        &quot;altitude&quot;: &quot;0.00&quot;,
        &quot;direction&quot;: &quot;90.00&quot;,
        &quot;horizontal_speed&quot;: &quot;0.00&quot;,
        &quot;isGround&quot;: 1,
        &quot;latitude&quot;: &quot;51.469400&quot;,
        &quot;longitude&quot;: &quot;-0.471700&quot;,
        &quot;updated&quot;: 1760978792,
        &quot;vspeed&quot;: &quot;0.00&quot;
      },
...
...
      {
        &quot;altitude&quot;: &quot;0.00&quot;,
        &quot;direction&quot;: &quot;33.00&quot;,
        &quot;horizontal_speed&quot;: &quot;33.34&quot;,
        &quot;isGround&quot;: 1,
        &quot;latitude&quot;: &quot;42.365300&quot;,
        &quot;longitude&quot;: &quot;-71.012400&quot;,
        &quot;updated&quot;: 1761004300,
        &quot;vspeed&quot;: &quot;0.00&quot;
      },
      {
        &quot;altitude&quot;: &quot;0.00&quot;,
        &quot;direction&quot;: &quot;303.00&quot;,
        &quot;horizontal_speed&quot;: &quot;11.11&quot;,
        &quot;isGround&quot;: 1,
        &quot;latitude&quot;: &quot;42.373000&quot;,
        &quot;longitude&quot;: &quot;-71.018500&quot;,
        &quot;updated&quot;: 1761004451,
        &quot;vspeed&quot;: &quot;0.00&quot;
      }
    ],
    &quot;status&quot;: &quot;landed&quot;,
    &quot;system&quot;: {
      &quot;squawk&quot;: null,
      &quot;updated&quot;: 1761004451
    }
  }
]
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The &lt;code&gt;flightPositions&lt;/code&gt; array is updated with recorded position points throughout the flight, typically at around 10-minute intervals, and added to the output as part of the historical flight track.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;&lt;th&gt;Field &lt;/th&gt;&lt;th&gt;Description&lt;/th&gt;&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;latitude&lt;/code&gt; / &lt;code&gt;longitude&lt;/code&gt; &lt;/td&gt;&lt;td&gt;Aircraft position&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;altitude&lt;/code&gt; &lt;/td&gt;&lt;td&gt;Aircraft altitude&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;direction&lt;/code&gt; &lt;/td&gt;&lt;td&gt;Direction of travel&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;horizontal_speed&lt;/code&gt; &lt;/td&gt;&lt;td&gt;Horizontal speed&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;vspeed&lt;/code&gt; &lt;/td&gt;&lt;td&gt;Vertical speed&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;isGround&lt;/code&gt; &lt;/td&gt;&lt;td&gt;Whether the aircraft is on the ground&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;updated&lt;/code&gt; &lt;/td&gt;&lt;td&gt;Unix timestamp for that position point&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;hr&gt;
&lt;h4 id=&quot;fetching-historical-flight-data-in-javascript&quot;&gt;Fetching Historical Flight Data in JavaScript&lt;/h4&gt;
&lt;p&gt;Here is a basic Axios example.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-javascript&quot;&gt;const axios = require(&quot;axios&quot;);

const API_KEY = &quot;YOUR_API_KEY&quot;;

const endpoint = `https://aviation-edge.com/v2/public/flight_track_history?key=${API_KEY}&amp;amp;depIata=LHR&amp;amp;flightIata=BA203&amp;amp;depDate=2025-10-20`;

async function fetchHistoricalFlight() {
  try {
    const response = await axios.get(endpoint);
    return response.data;
  } catch (error) {
    console.error(&quot;Error fetching historical flight data:&quot;, error.message);
    return null;
  }
}

fetchHistoricalFlight().then((data) =&amp;gt; {
  if (!data || data.length === 0) {
    console.log(&quot;No historical flight data found.&quot;);
    return;
  }

  console.log(data[0]);
});
&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id=&quot;extracting-the-flight-path&quot;&gt;Extracting the Flight Path&lt;/h4&gt;
&lt;p&gt;To plot the aircraft path on a map, you usually only need latitude and longitude from each position point. The output can be passed into a mapping library such as Leaflet, Mapbox, or Google Maps to draw the route.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-javascript&quot;&gt;function getFlightPath(flight) {
  return flight.flightPositions.map((point) =&amp;gt; ({
    lat: Number(point.latitude),
    lng: Number(point.longitude),
    timestamp: point.updated
  }));
}

fetchHistoricalFlight().then((data) =&amp;gt; {
  const flight = data[0];
  const path = getFlightPath(flight);

  console.log(path);
});
&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id=&quot;finding-the-max-altitude&quot;&gt;Finding the Max Altitude&lt;/h4&gt;
&lt;p&gt;A simple way to find the highest recorded altitude in the position array.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-javascript&quot;&gt;function getMaxAltitude(flight) {
  return Math.max(
    ...flight.flightPositions.map((point) =&amp;gt; Number(point.altitude))
  );
}

fetchHistoricalFlight().then((data) =&amp;gt; {
  const flight = data[0];

  console.log(&quot;Max altitude:&quot;, getMaxAltitude(flight));
});
&lt;/code&gt;&lt;/pre&gt;
&lt;hr&gt;
&lt;h4 id=&quot;example-use-cases-for-past-flight-track-data&quot;&gt;Example Use Cases for Past Flight Track Data&lt;/h4&gt;
&lt;p&gt;Historical flight tracking data can be used in many aviation and data products.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Flight Replay&lt;/strong&gt;: Use the latitude, longitude, altitude, speed, and timestamp fields to replay a flight on a map after it has landed and visualize a past flight.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Flight Analytics&lt;/strong&gt;: Analyze altitude changes, speed changes, route shape, ground movement and airborne movement.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Airline or Airport Dashboards&lt;/strong&gt;: Build dashboards showing past flight movement data for specific flights, airlines, airports, or aircraft.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Aircraft History Tools&lt;/strong&gt;: Use aircraft registration number or ICAO24 filters to review past aircraft movement data for a specific aircraft.&lt;/p&gt;
&lt;hr&gt;
&lt;h4 id=&quot;bringing-past-flights-back-to-life---all-with-data-&quot;&gt;Bringing Past Flights Back to Life - All With Data!&lt;/h4&gt;
&lt;p&gt;The Aviation Edge Historical Flight Tracking API is designed for developers who need more than a static flight record.&lt;/p&gt;
&lt;p&gt;It gives you timestamped aircraft movement data that can be mapped, replayed, filtered, stored, and analyzed.&lt;/p&gt;
&lt;p&gt;Whether you are building a flight replay tool, an aviation dashboard, an aircraft history feature, or a route analysis product, past flight tracking data gives you the raw movement layer behind a completed flight.&lt;/p&gt;
&lt;p&gt;You can explore the Historical Flight Tracker API firsthand by getting your personal &lt;a rel=&quot;nofollow&quot; href=&quot;https://aviation-edge.com/premium-api/&quot;&gt;API key here&lt;/a&gt;.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;img src=&quot;https://dev-to-uploads.s3.us-east-2.amazonaws.com/uploads/articles/raqlonygr49k6w0f7ran.png&quot; alt=&quot;Aviation Edge&quot;&gt;&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/25985/replay-a-flight-after-it-lands-historical-flight-tracker-api</guid>
<pubDate>Tue, 01 Sep 2026 10:26:12 +0000</pubDate>
</item>
</channel>
</rss>