CarbonSutra
CarbonSutra Carbon Emissions API

Search airports and calculate airport proximity, distance, and estimated flight time.


Airport to Nearest Airport

GET
$
/api/v1/nearest-airport-from-another-airport

Airport to Nearest Airport

Returns the distance in kilometers of the closest airport from a given airport code, along with name and IATA code, using Haversine function.

operationId: find_nearest_airport_from_another_airport

Airport to Nearest Airport › query Parameters

iata_airport_code
​string · minLength: 3 · maxLength: 3 · pattern: ^[A-Za-z]{3}$ · required

An IATA airport code is unique 3 digit geocode (also known as IATA location identifier, IATA station code, or location identifier)

same_country
​string · enum

A value of "Y" will result in closest airport with the same country of IATA Code, else the country borders will be ignored and the nearest airport will be found.

Enum values:
Y
N

Airport to Nearest Airport › Responses

Nearest airport and distance in kilometres.

Generic JSON response because the supplied collection does not define the exact response fields.

Postal Code to Nearest Airport

GET
$
/api/v1/nearest-airport

Postal Code to Nearest Airport

Returns the distance in kilometers bewteen a postal code and the nearlest airport to it, using Haversine function.

This is an advanced algorithm which takes a postal code and country code as input and returns the nearest airport its latitude/longitude value. The distance between the coordinates of postal code and its airport is measured using Haversine function and the returned value is in kilometers. The data has instances of multiple addresses with different values of latitude/longitude associated with the same postal code. For such cases, an array of all addresses and their distance with nearest airport for the same postal code is returned. The source of 1.5 million postal code data is taken as it is from https://public.opendatasoft.com/explore/dataset/geonames-postal-code/. For airports, the publicly available database of IATA codes and airport names is used.

operationId: find_nearest_airport_from_postal_code

Reference

Postal Code to Nearest Airport › query Parameters

country_code
​string · minLength: 2 · maxLength: 2 · required

Two digit ISO 3166-1 alpha-2 country code.

postal_code
​string · required

A valid postal code of a location

Postal Code to Nearest Airport › Responses

Nearest airport information and distance in kilometres.

Generic JSON response because the supplied collection does not define the exact response fields.

Distance between Two Airports

GET
$
/api/v1/distance-between-airports

Distance between Two Airports

Returns the distance between two IATA airport codes in kilometers, using Haversine function.

operationId: find_distance_between_two_airports

Distance between Two Airports › query Parameters

iata_airport_from
​string · minLength: 3 · maxLength: 3 · required

The first (or from) IATA airport code is unique 3 digit geocode (also known as IATA location identifier, IATA station code or location identifier)

iata_airport_to
​string · minLength: 3 · maxLength: 3 · required

The second (or to) IATA airport code is unique 3 digit geocode (also known as IATA location identifier, IATA station code or location identifier)

Distance between Two Airports › Responses

Distance in kilometres.

Generic JSON response because the supplied collection does not define the exact response fields.

GET
$
/api/v1/airports-by-keyword

Airports Keywords Search

Returns the lists of airport names and Airport IATA code which matches the keyword. The algorithm searches through airport names, IATA code, names of state and information from other sources.

operationId: search_airports_based_on_keywords

Airports Keyword Search › query Parameters

keyword
​string · required

A keyword to search for the airport records

Airports Keyword Search › Responses

Matching airport names and IATA codes.

Generic JSON response because the supplied collection does not define the exact response fields.

Estimated Flight Time between Airports

GET
$
/api/v1/estimated-flight-time

Estimated Flight Times between Airports

Returns the estimated travel time through flight between two airports.

operationId: estimate_flight_time_between_airports

Estimated Flight Time between Airports › query Parameters

iata_airport_from
​string · minLength: 3 · maxLength: 3 · required

The departing (or from) IATA airport code is unique 3 digit geocode (also known as IATA location identifier or IATA station code)

iata_airport_to
​string · minLength: 3 · maxLength: 3 · required

The landing (or to) IATA airport code is unique 3 digit geocode (also known as IATA location identifier or IATA station code)

Estimated Flight Time between Airports › Responses

Estimated flight travel time.

Generic JSON response because the supplied collection does not define the exact response fields.