Flight Stats API

Flight Stats API

Transportation

Access over 290 fields per aircraft, and view all aircraft in an Airline's or Lessor's fleet. Up-to-date information on current weather conditions at an airport using tag annotations to identify prevailing conditions and notable hazards that may impact aviation.

Visit API🔁 Alternatives

📚 Documentation & Examples

Everything you need to integrate with Flight Stats API

🚀 Quick Start Examples

Flight Stats API Javascript Examplejavascript
// Flight Stats API API Example
const response = await fetch('https://www.programmableweb.com/api/flightstats-weather', {
    method: 'GET',
    headers: {
        'Content-Type': 'application/json'
    }
});

const data = await response.json();
console.log(data);

FlightStats Weather API

The FlightStats Weather API provides weather information for airports and regions around the world. This API can be used to retrieve information such as current conditions, temperature, precipitation, wind speed and direction, and more.

Authentication

The FlightStats Weather API requires authentication using an API key. You can obtain an API key by signing up for a free account on the FlightStats website.

Endpoints

There are two endpoints available in the FlightStats Weather API:

  • /weather/forecast - Returns a weather forecast for a specific airport or region.
  • /weather/current - Returns the current weather conditions for a specific airport.

API Examples in JavaScript

Here are some example API calls using JavaScript:

1. Retrieve a weather forecast for a specific airport

const apiKey = 'YOUR_API_KEY';
const airportCode = 'SFO';

fetch(`https://api.flightstats.com/flex/weather/rest/v1/json/forecast/${airportCode}?appId=${apiKey}`)
  .then(response => response.json())
  .then(data => {
    console.log('Weather forecast:', data);
  })
  .catch(error => console.error(error));

2. Retrieve the current weather conditions for a specific airport

const apiKey = 'YOUR_API_KEY';
const airportCode = 'SFO';

fetch(`https://api.flightstats.com/flex/weather/rest/v1/json/current/${airportCode}?appId=${apiKey}`)
  .then(response => response.json())
  .then(data => {
    console.log('Current weather conditions:', data);
  })
  .catch(error => console.error(error));

Note that in these examples, YOUR_API_KEY should be replaced with your FlightStats API key, and SFO should be replaced with the airport code for the airport you are interested in.

Conclusion

The FlightStats Weather API is a useful tool for retrieving weather information for airports and regions around the world. With a little bit of JavaScript code, you can easily retrieve weather forecasts and current weather conditions.

📊 30-Day Uptime History

Daily uptime tracking showing online vs offline minutes

Sep 6Sep 8Sep 10Sep 12Sep 14Sep 16Sep 18Sep 20Sep 22Sep 24Sep 26Sep 28Sep 30Oct 2Oct 504008001440Minutes
Online
Offline

Related APIs in Transportation