apilayer aviationstack API

Transportation / OAuth Advanced HTTPS
Varies by plan (check documentation)

Overview

Aviationstack by apilayer provides real-time flight status, schedules, and global aviation data including airports and airlines. It uses an API access key passed as a query parameter and offers a free tier with HTTP access for up to 500 requests per month. It is a good starting point for building flight trackers or travel dashboards.

💡

Beginner Tip

The free plan only supports HTTP not HTTPS so upgrade to a paid plan to enable secure requests. Start with the /flights endpoint and filter by flight_iata to track a specific flight number.

Available Data

apilayer aviationstack data via REST API
JSON-formatted response data
Requires OAuth authentication

Example Response

JSON Response
{
  "route": "Line 1",
  "origin": "Station A",
  "destination": "Station B",
  "departure": "08:30",
  "arrival": "09:15",
  "status": "On Time",
  "delays_min": 0
}

Field Reference

flight_date Scheduled date of the flight in YYYY-MM-DD format.
flight_status Current status of the flight such as scheduled, active, landed, or cancelled.
departure.iata IATA code of the departure airport.
arrival.iata IATA code of the arrival airport.
flight.iata IATA flight number combining airline code and flight digits.
airline.name Full name of the operating airline.

Implementation Example

const url = "https://aviationstack.com/";
// Replace headers or query params with the values required by this API.
const response = await fetch(url, {
  headers: {
  "Authorization": "Bearer YOUR_API_KEY"
  }
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

Common Errors & Troubleshooting

101 Invalid API key The access_key parameter is missing or incorrect.
Append access_key=YOUR_API_KEY to every request URL using the key from your aviationstack dashboard.
HTTPS access restricted HTTPS is not available on the free plan.
Use HTTP for the free tier or upgrade to a paid subscription to unlock HTTPS endpoints.
Empty data array The flight_iata code does not match any currently active or recent flight.
Verify the IATA flight number and use a current date; historical data requires higher-tier plans.

Matrix Score Breakdown

🌐 Reachability 30/30
⚡ Speed 2/20
🔒 Security 15/15
🛠 Developer XP 3/20
✓ Reliability 10/15

Partially tested on Apr 5, 2026

Technical Specifications

Auth OAuth
HTTPS REQUIRED
CORS UNKNOWN
Category Transportation
Difficulty Advanced
Verified: 2026-04-04

Similar APIs

View All →