India Flight Tracker

REST API Documentation

Access historical Indian flight data — schedules, delays, routes, airports and airlines — via a simple, key-authenticated JSON API.

Base URL: http://api.akashpath.in/api/v1 JSON responses Redis-cached Key auth

Overview

The India Flight Tracker API provides programmatic access to our flight history database. All data is sourced from live ADS-B and schedule feeds, stored in PostgreSQL, and made available through endpoints on port 3001.

All responses are application/json. Times are ISO 8601 strings. IATA codes are 3-letter uppercase strings.

ℹ️
The API is served on a dedicated process (api_server.js) independent of the main app. It can be scaled separately. The base path for all authenticated endpoints is /api/v1.

Authentication

Send your API key with every request using the X-API-Key header (preferred) or the api_key query parameter.

Header (recommended)

X-API-Key: ift_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxx

Query parameter

GET /api/v1/flights?api_key=ift_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxx
⚠️
Never expose your API key in client-side code or public repositories. Use environment variables or secret managers to store it.

To obtain an API key, contact the platform admin or purchase a plan from the user dashboard. API keys have configurable expiration dates and history windows.

Rate Limits

Rate limiting is applied per API key using a sliding window of 10 seconds. The default plan allows 10 requests per 10 seconds; premium plans have higher limits configured on your key.

Rate limit headers are returned with every response:

HeaderDescription
X-RateLimit-LimitMax requests allowed per 10-second window for your key
X-RateLimit-RemainingRequests remaining in the current window
X-RateLimit-ResetSeconds until the window resets
⚠️
When you exceed the rate limit, the API returns 429 Too Many Requests. Implement exponential back-off in your client.

Error Handling

All errors follow a consistent envelope:

{
  "success": false,
  "error": {
    "code":    "RATE_LIMIT_EXCEEDED",
    "message": "Rate limit of 10 requests per 10s exceeded. Retry in 7s."
  }
}

HTTP Status Codes

200
OK
Successful response.
400
MISSING_PARAMS / INVALID_*
Bad request — missing or invalid parameter.
401
MISSING_API_KEY / INVALID_API_KEY
No key supplied, or key not recognised.
403
KEY_INACTIVE / KEY_EXPIRED
Key exists but is deactivated or past its expiry date.
404
NOT_FOUND
Requested resource or route not found.
429
RATE_LIMIT_EXCEEDED
Too many requests. Back off and retry.
500
INTERNAL_ERROR
Server-side error. Try again shortly.

Endpoints

GET /api/v1/status API health — no auth required

Returns the API operational status. Does not consume a rate-limit slot. Use this to confirm connectivity before making authenticated calls.

200 Response
{
  "success":   true,
  "version":   "1.0",
  "status":    "operational",
  "timestamp": "2026-04-05T09:15:00.000Z"
}
GET /api/v1/flights Paginated flight history

Returns paginated historical flight records. Supports filtering by date range, domestic/international, airline, origin, and destination.

Query Parameters

ParamTypeRequiredDescription
fromdateoptionalStart date YYYY-MM-DD (clamped to key's history window)
todateoptionalEnd date YYYY-MM-DD
is_domesticintegeroptional1 for domestic, 0 for international
airlinestringoptionalPartial airline name match (case-insensitive)
originstringoptionalIATA origin code (e.g. DEL)
destinationstringoptionalIATA destination code
pageintegeroptionalPage number (default 1)
limitintegeroptionalRecords per page (default 20, max 100)
200 Response
{
  "success": true,
  "meta": { "total": 482, "page": 1, "per_page": 20, "total_pages": 25, "cached": true },
  "data": [
    {
      "id":                    1024,
      "flight_number":        "AI101",
      "airline":              "Air India",
      "date":                 "2026-04-04",
      "origin":               "DEL",
      "destination":          "BOM",
      "scheduled_departure":  "1743744600",
      "actual_departure":     "1743744780",
      "scheduled_arrival":   "1743751800",
      "actual_arrival":      "1743752100",
      "is_domestic":          1,
      "belt_number":          "B3"
    }
  ]
}
GET /api/v1/flights/:id Single flight record by database ID
ParamTypeInDescription
idintegerpathrequired Database record ID
200 Response
{ "success": true, "cached": false, "data": { /* single FlightRecord object */ } }
GET /api/v1/flight/:number All occurrences of a flight number

Returns all historical records for a specific flight number (e.g. AI101, 6E2341). Supports date range and pagination.

ParamTypeInDescription
numberstringpathrequired IATA flight number (2–10 chars, e.g. AI101)
from / todatequeryoptional Date range
page / limitintegerqueryoptional Pagination
GET /api/v1/route Flights between two airports
ParamTypeDescription
originstringrequired 3-letter IATA origin code
destinationstringrequired 3-letter IATA destination code
from / todateoptional Date range YYYY-MM-DD
page / limitintegeroptional Pagination
ℹ️
Example: GET /api/v1/route?origin=DEL&destination=BOM&from=2026-04-01&to=2026-04-05
GET /api/v1/airport/:code Arrivals and departures for an airport
ParamTypeInDescription
codestringpathrequired 3-letter IATA airport code
directionstringqueryoptional arrivals | departures | both (default: both)
from / todatequeryoptional Date range
page / limitintegerqueryoptional Pagination

Each record in the response includes an additional direction field ("arrival" or "departure").

GET /api/v1/airline/:name Flights operated by an airline
ParamTypeInDescription
namestringpathrequired Airline name or partial name (e.g. IndiGo, Air India)
from / todatequeryoptional Date range
page / limitintegerqueryoptional Pagination
GET /api/v1/stats Aggregate statistics for a date range
ParamTypeDescription
from / todateoptional Date range (default: key's full history window)
200 Response
{
  "success": true,
  "cached": true,
  "data": {
    "period": { "from": "2026-03-29", "to": "2026-04-05" },
    "summary": {
      "total_flights":              "12480",
      "domestic_flights":            "9102",
      "international_flights":       "3378",
      "unique_airlines":             "24",
      "unique_origins":              "82",
      "unique_destinations":         "88",
      "on_time_performance_pct":     74.3
    },
    "top_routes": [ { "origin": "DEL", "destination": "BOM", "flight_count": "412" } ],
    "top_airlines": [ { "airline": "IndiGo", "flight_count": "4210" } ],
    "daily_volume": [ { "date": "2026-04-05", "flights": "1821" } ]
  }
}

Code Examples

All examples use the /api/v1/route endpoint. Replace YOUR_API_KEY with your actual key.

cURL

curl -X GET \
  "https://api.akashpath.in/api/v1/route?origin=DEL&destination=BOM&from=2026-04-01&to=2026-04-05" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Accept: application/json"

Python (requests)

import requests

API_KEY  = "YOUR_API_KEY"
BASE_URL = "https://api.akashpath.in/api/v1"

headers  = {"X-API-Key": API_KEY}

# Get route data
resp = requests.get(
    f"{BASE_URL}/route",
    headers=headers,
    params={
        "origin":      "DEL",
        "destination": "BOM",
        "from":        "2026-04-01",
        "to":          "2026-04-05",
        "limit":       50,
    }
)
resp.raise_for_status()
data = resp.json()
print(f"Found {data['meta']['total']} flights")
for flight in data["data"]:
    print(flight["flight_number"], flight["date"])

Node.js (Fetch API)

const API_KEY  = 'YOUR_API_KEY';
const BASE_URL = 'https://api.akashpath.in/api/v1';

async function getRouteFlights(origin, destination) {
  const params = new URLSearchParams({ origin, destination,
    from: '2026-04-01', to: '2026-04-05', limit: 50 });

  const res = await fetch(`${BASE_URL}/route?${params}`, {
    headers: { 'X-API-Key': API_KEY }
  });

  if (!res.ok) {
    const err = await res.json();
    throw new Error(err.error.message);
  }

  const data = await res.json();
  console.log(`Total flights: ${data.meta.total}`);
  return data.data;
}

getRouteFlights('DEL', 'BOM').then(console.log).catch(console.error);

PHP (cURL)

$apiKey  = 'YOUR_API_KEY';
$baseUrl = 'https://api.akashpath.in/api/v1';

$params = http_build_query([
    'origin'      => 'DEL',
    'destination' => 'BOM',
    'from'        => '2026-04-01',
    'to'          => '2026-04-05',
    'limit'       => 50,
]);

$ch = curl_init("$baseUrl/route?$params");
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER     => ["X-API-Key: $apiKey", 'Accept: application/json'],
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);

echo "Total: " . $response['meta']['total'] . " flights\n";

Go

package main

import (
    "encoding/json"
    "fmt"
    "net/http"
)

func main() {
    url := "https://api.akashpath.in/api/v1/route?origin=DEL&destination=BOM&from=2026-04-01&to=2026-04-05"
    req, _ := http.NewRequest("GET", url, nil)
    req.Header.Set("X-API-Key", "YOUR_API_KEY")

    resp, _ := http.DefaultClient.Do(req)
    defer resp.Body.Close()

    var result map[string]interface{}
    json.NewDecoder(resp.Body).Decode(&result)
    meta := result["meta"].(map[string]interface{})
    fmt.Printf("Total flights: %v\n", meta["total"])
}

Data Model — FlightRecord

Every result object follows this schema:

FieldTypeDescription
idintegerDatabase primary key
flight_numberstringIATA flight number (e.g. AI101)
airlinestringOperating airline name
datedateFlight date (YYYY-MM-DD)
originstringDeparture IATA code
destinationstringArrival IATA code
scheduled_departurestringScheduled departure (Unix epoch string)
actual_departurestring|nullActual departure (Unix epoch string or null)
scheduled_arrivalstringScheduled arrival (Unix epoch string)
actual_arrivalstring|nullActual arrival (Unix epoch string or null)
is_domesticinteger1 domestic, 0 international
belt_numberstring|nullBaggage belt number at arrival airport
directionstringAirport endpoint only"arrival" or "departure"
ℹ️
All epoch times are Unix seconds. Convert to local time with new Date(val * 1000) (JS) or datetime.fromtimestamp(val) (Python).

Changelog

v1.0.0
2026-04-05 — Initial release. Endpoints: flights, flight/:number, route, airport/:code, airline/:name, stats, status. Redis caching, per-key rate limiting.