---
title: "Look up a flight by number"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.nicer.travel/llms.txt
> Use this file to discover all available pages before exploring further.

# Look up a flight by number

Path: Nicer API › Search

`GET /search/flights/{flightNumber}`

URL: `https://api.nicer.travel/search/flights/{flightNumber}`

Resolves a flight number and a date to its scheduled legs, with airports from the travel reference, so a flight can be added to an itinerary without running a full search. Anonymous calls share one budget across the search routes, 600 per hour per IP; a valid bearer token lifts it.

## Authentication

Requires one of the following:

- 
- `bearerAuth`, http bearer, header `Authorization`, format `JWT`

## Path parameters

- `flightNumber` (`search.flights.get.path.flightNumber`; string, required)

## Query parameters

- `date` (`search.flights.get.query.date`; string, required) — Departure date, YYYY-MM-DD.
  - format: `date` · pattern: `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$`

## Code samples

### JavaScript SDK

```javascript
import { createClient } from "@nicertravel/sdk";

const nicer = createClient({
  baseUrl: "https://api.nicer.travel",
  token: process.env.NICER_TOKEN,
});

await nicer.search.flights.get({
  "flightNumber": "string",
  "date": "2019-08-24"
});
```

### Nicer CLI

```bash
nicer search flights get --flight-number 'string' --date '2019-08-24'
```

### cURL

```bash
curl --request GET \
  --url 'https://api.nicer.travel/search/flights/<flightNumber>?date=2019-08-24'
```

### TypeScript

```typescript
const url = 'https://api.nicer.travel/search/flights/<flightNumber>?date=2019-08-24';
const options = {method: 'GET'};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.nicer.travel/search/flights/<flightNumber>?date=2019-08-24"

response = requests.get(url)

print(response.text)
```

## Responses

### 200

OK

#### Example

```json
[
  {
    "aircraft": "string",
    "departingAt": "string",
    "arrivingAt": "string",
    "origin": {
      "iataCode": "string",
      "name": "string",
      "city": "string",
      "country": "string",
      "countryCode": "string",
      "latitude": 0,
      "longitude": 0,
      "timeZone": "string",
      "terminal": "string",
      "gate": "string"
    },
    "destination": {
      "iataCode": "string",
      "name": "string",
      "city": "string",
      "country": "string",
      "countryCode": "string",
      "latitude": 0,
      "longitude": 0,
      "timeZone": "string",
      "terminal": "string",
      "gate": "string"
    },
    "operatingCarrier": {
      "iataCode": "string",
      "name": "string"
    },
    "operatingCarrierFlightNumber": "string"
  }
]
```

- `departingAt` (`search.flights.get.response.200.departingAt`; string, required)
- `arrivingAt` (`search.flights.get.response.200.arrivingAt`; any of, required)
  - any of the following: `string`, `null`
- `origin` (`search.flights.get.response.200.origin`; object, required)
  - `iataCode` (`search.flights.get.response.200.origin.iataCode`; string, required)
  - `name` (`search.flights.get.response.200.origin.name`; string, optional)
  - `city` (`search.flights.get.response.200.origin.city`; string, optional)
  - `country` (`search.flights.get.response.200.origin.country`; string, optional)
  - `countryCode` (`search.flights.get.response.200.origin.countryCode`; string, optional)
  - `latitude` (`search.flights.get.response.200.origin.latitude`; number, optional)
  - `longitude` (`search.flights.get.response.200.origin.longitude`; number, optional)
  - `timeZone` (`search.flights.get.response.200.origin.timeZone`; string, optional)
  - `terminal` (`search.flights.get.response.200.origin.terminal`; string, optional)
  - `gate` (`search.flights.get.response.200.origin.gate`; string, optional)
- `destination` (`search.flights.get.response.200.destination`; object, required)
  - `iataCode` (`search.flights.get.response.200.destination.iataCode`; string, required)
  - `name` (`search.flights.get.response.200.destination.name`; string, optional)
  - `city` (`search.flights.get.response.200.destination.city`; string, optional)
  - `country` (`search.flights.get.response.200.destination.country`; string, optional)
  - `countryCode` (`search.flights.get.response.200.destination.countryCode`; string, optional)
  - `latitude` (`search.flights.get.response.200.destination.latitude`; number, optional)
  - `longitude` (`search.flights.get.response.200.destination.longitude`; number, optional)
  - `timeZone` (`search.flights.get.response.200.destination.timeZone`; string, optional)
  - `terminal` (`search.flights.get.response.200.destination.terminal`; string, optional)
  - `gate` (`search.flights.get.response.200.destination.gate`; string, optional)
- `operatingCarrier` (`search.flights.get.response.200.operatingCarrier`; object, required)
  - `iataCode` (`search.flights.get.response.200.operatingCarrier.iataCode`; string, required)
  - `name` (`search.flights.get.response.200.operatingCarrier.name`; any of, required)
    - any of the following: `string`, `null`
- `operatingCarrierFlightNumber` (`search.flights.get.response.200.operatingCarrierFlightNumber`; string, required)
- `aircraft` (`search.flights.get.response.200.aircraft`; string, optional)

### 400

Request failed. `errorCode` is stable; `errorMessage` is for humans.

#### Example

```json
{
  "errorCode": "string",
  "errorMessage": "string"
}
```

- `errorCode` (`search.flights.get.response.400.errorCode`; string, required)
- `errorMessage` (`search.flights.get.response.400.errorMessage`; string, required)

### 401

Request failed. `errorCode` is stable; `errorMessage` is for humans.

#### Example

```json
{
  "errorCode": "string",
  "errorMessage": "string"
}
```

- `errorCode` (`search.flights.get.response.401.errorCode`; string, required)
- `errorMessage` (`search.flights.get.response.401.errorMessage`; string, required)

### 403

Request failed. `errorCode` is stable; `errorMessage` is for humans.

#### Example

```json
{
  "errorCode": "string",
  "errorMessage": "string"
}
```

- `errorCode` (`search.flights.get.response.403.errorCode`; string, required)
- `errorMessage` (`search.flights.get.response.403.errorMessage`; string, required)

### 429

Request failed. `errorCode` is stable; `errorMessage` is for humans.

#### Example

```json
{
  "errorCode": "string",
  "errorMessage": "string"
}
```

- `errorCode` (`search.flights.get.response.429.errorCode`; string, required)
- `errorMessage` (`search.flights.get.response.429.errorMessage`; string, required)


Source: https://docs.nicer.travel/api/Search/search.flights.get/index.md
