Migration guide
Overview
This documentation is a guide to support you with the migration from v1.0 to v3 of the Geo API (Geo Catalog).
The API will return all the geographical entities that can be used in flights searches:
AirportsCitiesCountries(Flights Indicative Prices API only)
It will also return Continents for completion, though they cannot be used in flights searches directly.
Key changes
- The API key is now passed as a header.
- The response keys are in camelCase instead of PascalCase.
- The response data is not nested anymore. Instead, we return a flat response structure which can be nested as needed based on the parent ID.
- The places are now returned as a map so the relationships between them can be resolved more efficiently.
- We removed the coordinates of airports and cities. We didn't think they were actually being used. We can consider adding them on demand so contact us if you think you need them for your use-case.
Changes
info
What are the variables
- {base-url} : https://partners.api.skyscanner.net/apiservices
- {locale} : The locale in which the names are returned in, e.g.
en-GB,es-ES,fr-FR.
The URL changed:
| v1.0 (before) | v3 (after) |
|---|---|
{base-url}/geo/v1.0 | {base-url}/v3/geo/hierarchy/flights/{locale} |
Show request example
curl --location --request GET 'https://partners.api.skyscanner.net/apiservices/v3/geo/hierarchy/flights/en-GB' \
--header 'x-api-key: prtl6749387986743898559646983194'
The simplified the response structure a lot. The values are now normalised, so they can be used in a more flexible way.
v1.0 (Before)
response
├── Continents
│ ├── Id
│ ├── Name
│ └── Countries
│ │ ├── CurrencyId
│ │ └── Cities
│ │ │ ├── Id
│ │ │ ├── Name
│ │ │ ├── SingleAirportCity
│ │ │ ├── CountryId
│ │ │ ├── Location
│ │ │ ├── IataCode
│ │ │ └── Airports
│ │ │ │ ├── Id
│ │ │ │ ├── Name
│ │ │ │ ├── CityId
│ │ │ │ ├── CountryId
└── └── └── └── └── Location
v3 (After)
response
├── status
├── places
│ ├── entityId
│ ├── parentId
│ ├── name
│ ├── type
└── └── iata
Show the response comparison
| v1.0 (before) | v3 (after) |
|---|---|
| |
The type of the place determines now which entity type it is, instead of relying on the nesting hierarchy.
You can now determine the parents of a place following the parentId up the hierarchy.
The hierarchy is Airport -> City -> Country -> Continent. Note that there can be missing items from the
hierarchy in some cases. For example, there can be airports that are not in a city, so the parent ID in that case
would reference a country.