List routes
GET/v2/routes
List routes. This is a paginated endpoint.
Request
Query Parameters
Filter by airline. Example: 01gevxx0g090m0a78xmvhtfre4
Filter by departure airport. Example: KJFK
Filter by arrival airport. Example: YSSY
Filter by the flight number. This does not include the airline code. Example: 1234
Whether to include archived routes. Defaults to false.
The maximum number of results to return. Defaults to 100. Maximum is 1000.
The next_page_token value returned from a previous List request, if any. If used, all other parameters must match the call that provided the token.
Responses
- 200
- default
OK
- application/json
- Schema
- Example (from schema)
Schema
Array [
Array [
]
]
routes
object[]
The list of routes.
The unique identifier for the route.
airline
object
An Airline resource represents an airline.
Unique identifier for the airline.
The ICAO airline code. Unique. Example: UAL
The IATA airline code. This field is not unique. Example: UA
The ICAO airline display code. This is the code that is displayed to users and is usually the same as the ICAO code. However, some airlines have different display codes when they are a subsidiary of another airline, but use the same ICAO code as their parent company. As such, this field may not be unique. Example: UAL
The IATA airline display code. This is the code that is displayed to users and is usually the same as the IATA code. Currently, this will always be the same as the IATA code. Example: UA
The airline name. Example: United Airlines
This does not include the airline code. Example: 1234
departure
object
An Airport resource represents an airport.
The unique identifier of the airport.
The ICAO airport identifier. Unique.
The IATA airport identifier. This field is not unique.
arrival
object
An Airport resource represents an airport.
The unique identifier of the airport.
The ICAO airport identifier. Unique.
The IATA airport identifier. This field is not unique.
departureTime
object
Represents a time of day. The date and time zone are either not significant or are specified elsewhere.
Hours of day in 24 hour format. Should be from 0 to 23. An API may choose to allow the value "24:00:00" for scenarios like business closing time.
Minutes of hour of day. Must be from 0 to 59.
Seconds of minutes of the time. Must normally be from 0 to 59. An API may allow the value 60 if it allows leap-seconds.
Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.
arrivalTime
object
Represents a time of day. The date and time zone are either not significant or are specified elsewhere.
Hours of day in 24 hour format. Should be from 0 to 23. An API may choose to allow the value "24:00:00" for scenarios like business closing time.
Minutes of hour of day. Must be from 0 to 59.
Seconds of minutes of the time. Must normally be from 0 to 59. An API may allow the value 60 if it allows leap-seconds.
Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.
duration
object
A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # Examples Example 1: Compute Duration from two Timestamps in pseudo code. Timestamp start = ...; Timestamp end = ...; Duration duration = ...; duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; if (duration.seconds < 0 && duration.nanos > 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (duration.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. Timestamp start = ...; Duration duration = ...; Timestamp end = ...; end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; if (end.nanos < 0) { end.seconds -= 1; end.nanos += 1000000000; } else if (end.nanos >= 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } Example 3: Compute Duration from datetime.timedelta in Python. td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) # JSON Mapping In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix "s" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should be expressed in JSON format as "3.000000001s", and 3 seconds and 1 microsecond should be expressed in JSON format as "3.000001s".
Signed seconds of the span of time. Must be from -315,576,000,000 to +315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
Signed fractions of a second at nanosecond resolution of the span of time. Durations less than one second are represented with a 0 seconds
field and a positive or negative nanos
field. For durations of one second or more, a non-zero value for the nanos
field must be of the same sign as the seconds
field. Must be from -999,999,999 to +999,999,999 inclusive.
Possible values: [DAY_OF_WEEK_UNSPECIFIED
, DAY_OF_WEEK_MONDAY
, DAY_OF_WEEK_TUESDAY
, DAY_OF_WEEK_WEDNESDAY
, DAY_OF_WEEK_THURSDAY
, DAY_OF_WEEK_FRIDAY
, DAY_OF_WEEK_SATURDAY
, DAY_OF_WEEK_SUNDAY
]
The days of the week that this flight operates.
aircraftModels
object[]
The aircraft models that operate this route.
Unique identifier of the aircraft model.
aircraftType
object
An AircraftType resource represents a type of aircraft, irrespective of the airline that operates it.
Unique identifier of the aircraft type.
The ICAO aircraft type code. Unique. Example: B738
The IATA aircraft type code. Example: 738
The name of the aircraft type. Example: Boeing 737-800
airline
object
An Airline resource represents an airline.
Unique identifier for the airline.
The ICAO airline code. Unique. Example: UAL
The IATA airline code. This field is not unique. Example: UA
The ICAO airline display code. This is the code that is displayed to users and is usually the same as the ICAO code. However, some airlines have different display codes when they are a subsidiary of another airline, but use the same ICAO code as their parent company. As such, this field may not be unique. Example: UAL
The IATA airline display code. This is the code that is displayed to users and is usually the same as the IATA code. Currently, this will always be the same as the IATA code. Example: UA
The airline name. Example: United Airlines
The name of the aircraft model. Example: Boeing 737-824(WL)
Whether this route is archived. An archived route cannot be booked by pilots.
The next_page_token value to include in a subsequent List request. When paginating, all other parameters provided to List must match the call that provided the page token. When this field is empty, there are no more results. However, if the field is non-empty, there may not be any more results on the next page.
{
"routes": [
{
"id": "string",
"airline": {
"id": "string",
"icaoCode": "string",
"iataCode": "string",
"displayIcaoCode": "string",
"displayIataCode": "string",
"name": "string"
},
"icaoFlightNumber": "string",
"departure": {
"id": "string",
"icaoCode": "string",
"iataCode": "string"
},
"arrival": {
"id": "string",
"icaoCode": "string",
"iataCode": "string"
},
"departureTime": {
"hours": 0,
"minutes": 0,
"seconds": 0,
"nanos": 0
},
"arrivalTime": {
"hours": 0,
"minutes": 0,
"seconds": 0,
"nanos": 0
},
"duration": {
"seconds": 0,
"nanos": 0
},
"daysFlown": [
"DAY_OF_WEEK_UNSPECIFIED"
],
"aircraftModels": [
{
"id": "string",
"aircraftType": {
"id": "string",
"icaoCode": "string",
"iataCode": "string",
"name": "string"
},
"airline": {
"id": "string",
"icaoCode": "string",
"iataCode": "string",
"displayIcaoCode": "string",
"displayIataCode": "string",
"name": "string"
},
"name": "string"
}
],
"archived": true
}
],
"nextPageToken": "string"
}
Default error response
- application/json
- Schema
- Example (from schema)
Schema
Array [
]
The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
details
object[]
A list of messages that carry the error details. There is a common set of message types for APIs to use.
The type of the serialized message.
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}