/v1/by-country
All subdivisions of one country
Live testen
10 freie Calls pro Tag — keine Anmeldung, kein API-Key. Geht durchs oanor-Gateway.
Funktioniert. Hol dir einen API-Key und nutze sie in deinem Projekt.
API-Key holenCode-Snippets
curl "https://api.oanor.com/regions-api/v1/by-country" \ -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/regions-api/v1/by-country", {
headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/regions-api/v1/by-country");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-oanor-key: oanor_test_..."]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$out = curl_exec($ch);
import requests
requests.get(
"https://api.oanor.com/regions-api/v1/by-country",
headers={"x-oanor-key": "oanor_test_..."}
)
Beispiel-Response
Echte Antwort dieses Endpoints, erfasst beim letzten Health-Check.
{
"data": {
"count": 60,
"country": "US",
"country_name": "United States",
"subdivisions": [
{
"id": 1456,
"code": "AL",
"name": "Alabama",
"type": "state",
"latitude": 33.25888,
"iso3166_2": "US-AL",
"longitude": -86.82953,
"country_code": "US",
"country_name": "United States"
},
{
"id": 1400,
"code": "AK",
"name": "Alaska",
"type": "state",
"latitude": 64.44596,
"iso3166_2": "US-AK",
"longitude": -149.68091,
"country_code": "US",
"country_name": "United States"
},
{
"id": 1424,
"code": "AS",
"name": "American Samoa",
"type": "outlying area",
"latitude": -14.29712,
"iso3166_2": "US-AS",
"longitude": -170.71315,
"country_code": "US",
"country_name": "United States"
},
{
"id": 1434,
"code": "AZ",
"name": "Arizona",
"type": "state",
"latitude": 34.39534,
"iso3166_2": "US-AZ",
"longitude": -111.76327,
"country_code": "US",
"country_name": "United States"
},
{
"id": 1444,
"code": "AR",
"name": "Arkansas",
"type": "state",
"latitude": 35.20489,
"iso3166_2": "US-AR",
"longitude": -92.44791,
"country_code": "US",
"country_name": "United States"
},
{
"id": 5815,
"code": "AE",
"name": "Armed Forces Europe",
"type": "military postal region",
"latitude": null,
"iso3166_2": null,
"longitude": null,
"country_code": "US",
"country_name": "United States"
},
{
"id": 5816,
"code": "AA",
"name": "Armed Forces of the Americas",
"type": "military postal region",
"latitude": null,
"iso3166_2": null,
"longitude": null,
"country_code": "US",
"country_name": "United States"
},
{
"id": 5817,
"code": "AP",
"name": "Armed Forces Pacific",
"type": "military postal region",
"latitude": null,
"iso3166_2": null,
"longitude": null,
"country_code": "US"
…