Regions

ISO 3166-2 regional subdivisions (states, provinces, territories). The primary integration path is resolving iso_region from Airports into a human-readable label — for example US-NY → New York. Two operations: list regions (filter by country or continent) and fetch one region by code.

Filter when you can. An unfiltered list returns ~3,900 rows worldwide. Pass country or continent in production UIs.

EndpointWhen to use
GET /regionsRegion selectors filtered by country or continent
GET /regions/{code}Resolve iso_region from an airport record

List regions

Returns regions optionally filtered by country and/or continent.

Request

Requirements

Auth
x-api-key on every request (direct subscription). Learn more →
GEThttps://data.skylinkapi.com/v3/regions
ParameterTypeRequiredDefaultDescription
countrystringNoall countriesISO 3166-1 alpha-2 country code, e.g. US
continentstringNoall continentsContinent code (AF, AN, AS, EU, NA, OC, SA)

Response

{
  "regions": [
    {
      "id": 306110,
      "code": "US-NY",
      "local_code": "NY",
      "name": "New York",
      "continent": null,
      "iso_country": "US",
      "wikipedia_link": "https://en.wikipedia.org/wiki/New_York",
      "keywords": "Airports in New York"
    }
  ],
  "total": 1
}
FieldTypeRequiredNull?Description
regionsarrayYesNeverMatching region records
totalintegerYesNeverNumber of returned regions

Region item (regions[])

FieldTypeRequiredNull?Description
idintegerYesNeverNumeric record identifier
codestringYesNeverISO 3166-2 region code, e.g. US-NY
local_codestring | nullNoYesCountry-local short code (e.g. NY)
namestringYesNeverRegion name
continentstring | nullNoYesContinent code when assigned
iso_countrystringYesNeverParent country alpha-2 code
wikipedia_linkstring | nullNoYesReference URL
keywordsstring | nullNoYesFree-text tags

Get region by code

Retrieve a single region by ISO 3166-2 code (e.g. US-CA, GB-ENG). Returns 404 if the code is not found.

Request

GEThttps://data.skylinkapi.com/v3/regions/{code}
ParameterTypeRequiredDescription
codestringYesISO 3166-2 region code path parameter

Response

{
  "id": 306110,
  "code": "US-NY",
  "local_code": "NY",
  "name": "New York",
  "continent": null,
  "iso_country": "US",
  "wikipedia_link": "https://en.wikipedia.org/wiki/New_York",
  "keywords": "Airports in New York"
}

Same object shape as list items. Unmatched list filters return regions: [] and total: 0 — not an error.

Client types

"""Region reference models for /regions endpoints."""from __future__ import annotationsfrom dataclasses import dataclass@dataclassclass RegionsListRequest:    country: str | None = None    continent: str | None = None@dataclassclass RegionByCodeRequest:    code: str@dataclassclass RegionRecord:    id: int    code: str    local_code: str | None    name: str    continent: str | None    iso_country: str    wikipedia_link: str | None    keywords: str | None@dataclassclass RegionsResponse:    regions: list[RegionRecord]    total: int

Integration

Fetch region reference data for a selected country and map it into form options.

The example below caches region lists for 24 hours and uses explicit timeouts to keep onboarding forms responsive.

import osimport timefrom dataclasses import dataclassimport requestsHEADERS = {    "x-api-key": os.getenv("SKYLINK_API_KEY", "YOUR_API_KEY")}BASE = "https://data.skylinkapi.com/v3"CACHE: dict[str, tuple[dict, float]] = {}REGIONS_TTL = 86_400  # 24 h@dataclassclass RegionOption:    code: str    label: strdef fetch_regions(*, country: str) -> list[dict]:    country = country.upper()    key = f"regions:{country}"    cached = CACHE.get(key)    if cached and time.time() < cached[1]:        return cached[0]["regions"]    try:        r = requests.get(            f"{BASE}/regions",            headers=HEADERS,            params={"country": country},            timeout=(10, 15),        )    except requests.Timeout as exc:        raise RuntimeError(f"SkyLink timeout fetching regions for {country}") from exc    r.raise_for_status()    data = r.json()    CACHE[key] = (data, time.time() + REGIONS_TTL)    return data.get("regions", [])def get_region_by_code(code: str) -> dict | None:    code = code.upper()    try:        r = requests.get(f"{BASE}/regions/{code}", headers=HEADERS, timeout=(10, 15))    except requests.Timeout as exc:        raise RuntimeError(f"SkyLink timeout fetching region {code}") from exc    if r.status_code == 404:        return None    r.raise_for_status()    return r.json()def region_options(country: str) -> list[RegionOption]:    return [RegionOption(code=item["code"], label=item["name"]) for item in fetch_regions(country=country)]if __name__ == "__main__":    import json    ny = get_region_by_code("US-NY")    print(json.dumps(ny, indent=2, default=str))

Implementation notes

Country-first UX. Query by country whenever possible — avoid sending the full global list to browsers.

Airport joins. Join airport.iso_region from Airports directly against regions.code.

Code format. Enforce XX-YYY style before request where practical to reduce avoidable 404s.

Error responses

Shared errors: Error Handling. Endpoint-specific:

404 - region not found

{
  "detail": "Region 'ZZ-XX' not found"
}
GET
/regions
x-api-key<token>

Your SkyLink licence key, for keys bought direct from skylinkapi.com.

In: header

Query Parameters

country?string

Filter by ISO 3166-1 alpha-2 country code (e.g. US, CA, GB)

continent?string

Filter by continent code: AF, AN, AS, EU, NA, OC, SA

Response Body

application/json

application/json

curl -X GET "https://data.skylinkapi.com/v3/regions"
{
  "regions": [
    {
      "id": 0,
      "code": "string",
      "local_code": "string",
      "name": "string",
      "continent": "string",
      "iso_country": "string",
      "wikipedia_link": "string",
      "keywords": "string"
    }
  ],
  "total": 0
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}
GET
/regions/{code}
x-api-key<token>

Your SkyLink licence key, for keys bought direct from skylinkapi.com.

In: header

Path Parameters

code*string

ISO 3166-2 region code (e.g. US-CA, GB-ENG, AU-NSW)

Response Body

application/json

application/json

curl -X GET "https://data.skylinkapi.com/v3/regions/US"
{
  "id": 0,
  "code": "string",
  "local_code": "string",
  "name": "string",
  "continent": "string",
  "iso_country": "string",
  "wikipedia_link": "string",
  "keywords": "string"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}

Related: Countries · Airports · Airport Search