REST API Documentation
Access historical Indian flight data — schedules, delays, routes, airports and airlines — via a simple, key-authenticated JSON API.
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.
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
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:
| Header | Description |
|---|---|
| X-RateLimit-Limit | Max requests allowed per 10-second window for your key |
| X-RateLimit-Remaining | Requests remaining in the current window |
| X-RateLimit-Reset | Seconds until the window resets |
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
Pagination
List endpoints support pagination via the page and limit query parameters.
| Param | Default | Max | Description |
|---|---|---|---|
| page | 1 | — | Page number (1-indexed) |
| limit | 20 | 100 | Records per page |
Every paginated response includes a meta object:
"meta": { "total": 482, "page": 1, "per_page": 20, "total_pages": 25, "cached": true }
All list endpoints also accept from and to (YYYY-MM-DD) to restrict the date range. The range is clamped to your key's max_days_history allowance (7 days by default).
Endpoints
Returns the API operational status. Does not consume a rate-limit slot. Use this to confirm connectivity before making authenticated calls.
{
"success": true,
"version": "1.0",
"status": "operational",
"timestamp": "2026-04-05T09:15:00.000Z"
}
Returns paginated historical flight records. Supports filtering by date range, domestic/international, airline, origin, and destination.
Query Parameters
| Param | Type | Required | Description |
|---|---|---|---|
| from | date | optional | Start date YYYY-MM-DD (clamped to key's history window) |
| to | date | optional | End date YYYY-MM-DD |
| is_domestic | integer | optional | 1 for domestic, 0 for international |
| airline | string | optional | Partial airline name match (case-insensitive) |
| origin | string | optional | IATA origin code (e.g. DEL) |
| destination | string | optional | IATA destination code |
| page | integer | optional | Page number (default 1) |
| limit | integer | optional | Records per page (default 20, max 100) |
{
"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"
}
]
}
| Param | Type | In | Description |
|---|---|---|---|
| id | integer | path | required Database record ID |
{ "success": true, "cached": false, "data": { /* single FlightRecord object */ } }
Returns all historical records for a specific flight number (e.g. AI101, 6E2341). Supports date range and pagination.
| Param | Type | In | Description |
|---|---|---|---|
| number | string | path | required IATA flight number (2–10 chars, e.g. AI101) |
| from / to | date | query | optional Date range |
| page / limit | integer | query | optional Pagination |
| Param | Type | Description |
|---|---|---|
| origin | string | required 3-letter IATA origin code |
| destination | string | required 3-letter IATA destination code |
| from / to | date | optional Date range YYYY-MM-DD |
| page / limit | integer | optional Pagination |
GET /api/v1/route?origin=DEL&destination=BOM&from=2026-04-01&to=2026-04-05| Param | Type | In | Description |
|---|---|---|---|
| code | string | path | required 3-letter IATA airport code |
| direction | string | query | optional arrivals | departures | both (default: both) |
| from / to | date | query | optional Date range |
| page / limit | integer | query | optional Pagination |
Each record in the response includes an additional direction field ("arrival" or "departure").
| Param | Type | In | Description |
|---|---|---|---|
| name | string | path | required Airline name or partial name (e.g. IndiGo, Air India) |
| from / to | date | query | optional Date range |
| page / limit | integer | query | optional Pagination |
| Param | Type | Description |
|---|---|---|
| from / to | date | optional Date range (default: key's full history window) |
{
"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:
| Field | Type | Description |
|---|---|---|
| id | integer | Database primary key |
| flight_number | string | IATA flight number (e.g. AI101) |
| airline | string | Operating airline name |
| date | date | Flight date (YYYY-MM-DD) |
| origin | string | Departure IATA code |
| destination | string | Arrival IATA code |
| scheduled_departure | string | Scheduled departure (Unix epoch string) |
| actual_departure | string|null | Actual departure (Unix epoch string or null) |
| scheduled_arrival | string | Scheduled arrival (Unix epoch string) |
| actual_arrival | string|null | Actual arrival (Unix epoch string or null) |
| is_domestic | integer | 1 domestic, 0 international |
| belt_number | string|null | Baggage belt number at arrival airport |
| direction | string | Airport endpoint only — "arrival" or "departure" |
new Date(val * 1000) (JS) or datetime.fromtimestamp(val) (Python).