Connections API

Download OpenAPI specification:Download

Introduction

The Connections API, part of the FlightStats APIs, returns connecting flights between two airports. It is very useful when flying in or out of smaller, regional airports such as Newark, NJ; Fort Lauderdale, FL; or Spokane, WA.

This API will return direct flights when available. The results are ordered based on the score, a heuristic value based on multiuple factors such as length of the trip, number of connections, and how close the flight arrives/departs relative to the desired time.

The query results are available in XML or JSON format.

Connections APIs answer questions such as:

  • What are all the connecting flights between two airports on a date?

Extended options

Connections APIs use the standard extended options with the following changes/additions:

  • excludeAppendix - Unlike other APIs, appendix information is included by default. Specify excludeAppendex if you do not want the appendix.
  • useInlinedReferences - This is not supported in these APIs

Licensing

The Connections APIs are premium APIs and only included in our Contract plan.

A breakdown of the available plans is available on Get evaluation account

Schemas

Click the download button at the top of this document to download the OpenApi spec for this API. Other schemas:

APIs

Related products

Schedules - The Schedules APIs deliver access to the schedule information for upcoming flights for direct and non-stop flights

Flight Status - Current flight information for flights about three days in advance of departure until about seven days after arrival

Flight Data (Laminar Data Hub) - Status and positional data appropriate for geospatial-aware applciations

Authentication

appIdQueryParam

ID of the application making the request

Security Scheme Type API Key
Query parameter name: appId

appKeyQueryParam

Authentication key of the application making the request

Security Scheme Type API Key
Query parameter name: appKey

appIdHeader

ID of the application making the request

Security Scheme Type API Key
Header parameter name: appId

appKeyHeader

Authentication key of the application making the request

Security Scheme Type API Key
Header parameter name: appKey

First flight in

Find connections arriving as early as possible before the given time

path Parameters
format
required
string
Enum: "json" "jsonp" "xml"
Example: json

The data format returned in the response

departureAirport
required
string
Example: PIT

The code for the departure airport

arrivalAirport
required
string
Example: PDX

The code for the arrival airport

year
required
string
Example: 2022

Four-digit year

month
required
integer <int64> [ 1 .. 12 ]
Example: 10

Month

day
required
integer <int64> [ 1 .. 31 ]
Example: 1

Day of month

hour
required
integer <int64> [ 0 .. 23 ]
Example: 14

The hour component of the desired date & time

minute
required
integer <int64> [ 0 .. 59 ]
Example: 34

The minute component of the desired date & time

query Parameters
allowNearbyDepartures
boolean
Default: false
Enum: true false

Whether to consider other departure airports with the same city code

allowNearbyArrivals
boolean
Default: false
Enum: true false

Whether to consider other arrival airports with the same city code

includeAirports
string
Example: includeAirports=PHX,ATL

Only use the included airports for connections

excludeAirports
string
Example: excludeAirports=SLC,ORD

Do not use the excluded airports for connections

includeAirlines
string
Example: includeAirlines=DL,WN

Only return connections that use the included airlines

excludeAirlines
string
Example: excludeAirlines=UA,NK

Only return connections that do not use the excluded airlines

numHours
integer <int64> [ 1 .. 24 ]
Default: 6

How many hours leading up to the dateTime to search

maxConnections
integer <int64> [ 0 .. 3 ]
Default: 2

Only return connections with connections equal to or less than maxConnections

includeSurface
boolean
Default: false
Enum: true false

Whether surface transports (for example shuttle) connections are included

payloadType
string
Default: "passenger"
Enum: "all" "passenger" "cargo"

Whether connections should be only passenger, cargo, or both

includeCodeshares
boolean
Default: true
Enum: true false

Whether non-commuter codeshares are included. Commuter codeshares are always included since they are typically wetleases.

includeMultipleCarriers
boolean
Default: true
Enum: true false

Whether a flight can have different carriers for connections

maxResults
integer <int64> [ 1 .. 1000 ]
Default: 25

The maximum number of results to return

minimumConnectTime
string

The minimum connection time (in minutes) between flights. If not specified and payloadType is passenger/all then airline published guidelines will be used.

codeType
string
Enum: "IATA" "ICAO" "FS"
Example: codeType=FS

Airport code type. If not specified, the code searches in the order: IATA, ICAO, FS.

extendedOptions
Array of strings
Items Enum: "useHttpErrors" "excludeAppendix" "languageCode:en" "languageCode:ar" "languageCode:de" "languageCode:es" "languageCode:fr" "languageCode:ja" "languageCode:ko" "languageCode:pt" "languageCode:zh"

Extended options for modifying standard API behavior to fit special use cases

Responses

Response samples

Content type
No sample

First flight out

Find connections leaving as early as possible after the given time

path Parameters
format
required
string
Enum: "json" "jsonp" "xml"
Example: json

The data format returned in the response

departureAirport
required
string
Example: PDX

The code for the departure airport

arrivalAirport
required
string
Example: PIT

The code for the arrival airport

year
required
integer <int64>
Example: 2021

Four-digit year

month
required
integer <int64> [ 1 .. 12 ]
Example: 12

The month component of the desired date & time

day
required
integer <int64> [ 1 .. 31 ]
Example: 1

The day component of the desired date & time

hour
required
integer <int64> [ 0 .. 23 ]
Example: 14

The hour component of the desired date & time

minute
required
integer <int64> [ 0 .. 59 ]
Example: 0

The minute component of the desired date & time

query Parameters
allowNearbyDepartures
boolean
Default: false
Enum: true false

Whether to consider other departure airports with the same city code

allowNearbyArrivals
boolean
Default: false
Enum: true false

Whether to consider other arrival airports with the same city code

includeAirports
string
Example: includeAirports=PHX,ATL

Only use the included airports for connections

excludeAirports
string
Example: excludeAirports=SLC,ORD

Do not use the excluded airports for connections

includeAirlines
string
Example: includeAirlines=DL,WN

Only return connections that use the included airlines

excludeAirlines
string
Example: excludeAirlines=UA,NK

Only return connections that do not use the excluded airlines

numHours
integer <int64> [ 1 .. 24 ]
Default: 6

How many hours after the dateTime to search

maxConnections
integer <int64> [ 0 .. 3 ]
Default: 2

Only return connections with connections equal to or less than maxConnections

includeSurface
boolean
Default: false
Enum: true false

Whether surface transports (for example shuttle) connections are included

payloadType
string
Default: "passenger"
Enum: "all" "passenger" "cargo"

Whether connections should be only passenger, cargo, or both

includeCodeshares
boolean
Default: true
Enum: true false

Whether non-commuter codeshares are included. Commuter codeshares are always included since they are typically wetleases.

includeMultipleCarriers
boolean
Default: true
Enum: true false

Whether a flight can have different carriers for connections

maxResults
integer <int64> [ 1 .. 1000 ]
Default: 25

The maximum number of results to return

minimumConnectTime
string

The minimum connection time (in minutes) between flights. If not specified and payloadType is passenger/all then airline published guidelines will be used.

codeType
string
Enum: "IATA" "ICAO" "FS"
Example: codeType=FS

Airport code type. If not specified, the code searches in the order: IATA, ICAO, FS.

extendedOptions
Array of strings
Items Enum: "useHttpErrors" "excludeAppendix" "languageCode:en" "languageCode:ar" "languageCode:de" "languageCode:es" "languageCode:fr" "languageCode:ja" "languageCode:ko" "languageCode:pt" "languageCode:zh"

Extended options for modifying standard API behavior to fit special use cases

Responses

Response samples

Content type
No sample

Last flight in

Find connections arriving as late as possible before the given time

path Parameters
format
required
string
Enum: "json" "jsonp" "xml"
Example: json

The data format returned in the response

departureAirport
required
string
Example: PIT

The code for the departure airport

arrivalAirport
required
string
Example: PDX

The code for the arrival airport

year
required
string
Example: 2021

Four-digit year

month
required
integer <int64> [ 1 .. 12 ]

The month component of the desired date & time

day
required
integer <int64> [ 1 .. 31 ]

The day component of the desired date & time

hour
required
integer <int64> [ 0 .. 23 ]

The hour component of the desired date & time

minute
required
integer <int64> [ 0 .. 59 ]

The minute component of the desired date & time

query Parameters
allowNearbyDepartures
boolean
Default: false
Enum: true false

Whether to consider other departure airports with the same city code

allowNearbyArrivals
boolean
Default: false
Enum: true false

Whether to consider other arrival airports with the same city code

includeAirports
string
Example: includeAirports=PHX,ATL

Only use the included airports for connections

excludeAirports
string
Example: excludeAirports=SLC,ORD

Do not use the excluded airports for connections

includeAirlines
string
Example: includeAirlines=DL,WN

Only return connections that use the included airlines

excludeAirlines
string
Example: excludeAirlines=UA,NK

Only return connections that do not use the excluded airlines

numHours
integer <int64> [ 1 .. 24 ]
Default: 6

How many hours leading up to the dateTime to search

maxConnections
integer <int64> [ 0 .. 3 ]
Default: 2

Only return connections with connections equal to or less than maxConnections

includeSurface
boolean
Default: false
Enum: true false

Whether surface transports (for example shuttle) connections are included

payloadType
string
Default: "passenger"
Enum: "all" "passenger" "cargo"

Whether connections should be only passenger, cargo, or both

includeCodeshares
boolean
Default: true
Enum: true false

Whether non-commuter codeshares are included. Commuter codeshares are always included since they are typically wetleases.

includeMultipleCarriers
boolean
Default: true
Enum: true false

Whether a flight can have different carriers for connections

maxResults
integer <int64> [ 1 .. 1000 ]
Default: 25

The maximum number of results to return

minimumConnectTime
string

The minimum connection time (in minutes) between flights. If not specified and payloadType is passenger/all then airline published guidelines will be used.

codeType
string
Enum: "IATA" "ICAO" "FS"
Example: codeType=FS

Airport code type. If not specified, the code searches in the order: IATA, ICAO, FS.

extendedOptions
Array of strings
Items Enum: "useHttpErrors" "excludeAppendix" "languageCode:en" "languageCode:ar" "languageCode:de" "languageCode:es" "languageCode:fr" "languageCode:ja" "languageCode:ko" "languageCode:pt" "languageCode:zh"

Extended options for modifying standard API behavior to fit special use cases

Responses

Response samples

Content type
No sample

Last flight out

Find connections leaving as late as possible after the given time

path Parameters
format
required
string
Enum: "json" "jsonp" "xml"
Example: json

The data format returned in the response

departureAirport
required
string
Example: PIT

The code for the departure airport

arrivalAirport
required
string
Example: PDX

The code for the arrival airport

year
required
string
Example: 2021

Four-digit year

month
required
integer <int64> [ 1 .. 12 ]
Example: 12

The month component of the desired date & time

day
required
integer <int64> [ 1 .. 31 ]
Example: 1

The day component of the desired date & time

hour
required
integer <int64> [ 0 .. 23 ]
Example: 14

The hour component of the desired date & time

minute
required
integer <int64> [ 0 .. 59 ]
Example: 0

The minute component of the desired date & time

query Parameters
allowNearbyDepartures
boolean
Default: false
Enum: true false

Whether to consider other departure airports with the same city code

allowNearbyArrivals
boolean
Default: false
Enum: true false

Whether to consider other arrival airports with the same city code

includeAirports
string
Example: includeAirports=PHX,ATL

Only use the included airports for connections

excludeAirports
string
Example: excludeAirports=SLC,ORD

Do not use the excluded airports for connections

includeAirlines
string
Example: includeAirlines=DL,WN

Only return connections that use the included airlines

excludeAirlines
string
Example: excludeAirlines=UA,NK

Only return connections that do not use the excluded airlines

numHours
integer <int64> [ 1 .. 24 ]
Default: 6

How many hours leading up to the dateTime to search

maxConnections
integer <int64> [ 0 .. 3 ]
Default: 2

Only return connections with connections equal to or less than maxConnections

includeSurface
boolean
Default: false
Enum: true false

Whether surface transports (for example shuttle) connections are included

payloadType
string
Default: "passenger"
Enum: "all" "passenger" "cargo"

Whether connections should be only passenger, cargo, or both

includeCodeshares
boolean
Default: true
Enum: true false

Whether non-commuter codeshares are included. Commuter codeshares are always included since they are typically wetleases.

includeMultipleCarriers
boolean
Default: true
Enum: true false

Whether a flight can have different carriers for connections

maxResults
integer <int64> [ 1 .. 1000 ]
Default: 25

The maximum number of results to return

minimumConnectTime
string

The minimum connection time (in minutes) between flights. If not specified and payloadType is passenger/all then airline published guidelines will be used.

codeType
string
Enum: "IATA" "ICAO" "FS"
Example: codeType=FS

Airport code type. If not specified, the code searches in the order: IATA, ICAO, FS.

extendedOptions
Array of strings
Items Enum: "useHttpErrors" "excludeAppendix" "languageCode:en" "languageCode:ar" "languageCode:de" "languageCode:es" "languageCode:fr" "languageCode:ja" "languageCode:ko" "languageCode:pt" "languageCode:zh"

Extended options for modifying standard API behavior to fit special use cases

Responses

Response samples

Content type
No sample
)