Flight search API powered by AeroDataBox via RapidAPI.
GET /api/flights/:flightNumber?flightDate=YYYY-MM-DD
Example:
GET /api/flights/KL856?flightDate=2025-11-11Response:
{
"results": [
{
"airline": "KLM",
"flightNumber": "KL 856",
"departure": {
"airport": "Seoul Incheon",
"code": "ICN",
"timezone": "Asia/Seoul",
"gmtOffset": 9,
"scheduledUtc": "2025-11-11 14:05Z"
},
"arrival": {
"airport": "Amsterdam Schiphol",
"code": "AMS",
"timezone": "Europe/Amsterdam",
"gmtOffset": 1,
"scheduledUtc": "2025-11-12 04:20Z"
}
}
]
}-
Install dependencies:
npm install
-
Configure environment variables (
.env):PORT=3000 RAPIDAPI_KEY=your_rapidapi_key_here RAPIDAPI_HOST=aerodatabox.p.rapidapi.com
Get your RapidAPI key: AeroDataBox on RapidAPI
-
Run the server:
npm run start:dev
| Code | Description |
|---|---|
| 400 | Invalid flightDate format or rate limit exceeded |
| 401 | Missing or invalid RapidAPI key |
| 403 | AeroDataBox plan restriction |
| 404 | No flights found (returns {"results": []}) |
| 502 | Upstream API error |
| 503 | Service unavailable |
https://jetlag-be.vercel.app/api/flights/:flightNumber?flightDate=YYYY-MM-DD
Example:
https://jetlag-be.vercel.app/api/flights/KL856?flightDate=2025-11-11
- NestJS - Backend framework
- AeroDataBox - Flight data provider
- airport-timezone - Timezone & GMT offset lookup
MIT