/v1/search
Search cities by name, country and population
Probeer het live
10 gratis calls per dag — geen registratie, geen API-key. Loopt via de oanor-gateway.
Het werkt. Haal een API-key op en gebruik hem in je project.
Verkrijg een API-sleutelCodefragmenten
curl "https://api.oanor.com/cities-api/v1/search" \ -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/cities-api/v1/search", {
headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/cities-api/v1/search");
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/cities-api/v1/search",
headers={"x-oanor-key": "oanor_test_..."}
)
Voorbeeldrespons
Een echte respons van dit endpoint, vastgelegd bij de laatste health check.
{
"data": {
"count": 1,
"limit": 20,
"total": 1,
"offset": 0,
"filters": {
"q": "berlin",
"country": "DE",
"min_population": 100000
},
"results": [
{
"id": 2950159,
"name": "Berlin",
"ascii": "Berlin",
"admin1": "16",
"country": "DE",
"latitude": 52.52437,
"timezone": "Europe/Berlin",
"longitude": 13.41053,
"population": 3426354,
"elevation_m": 74,
"country_name": "Germany"
}
]
},
"meta": {
"timestamp": "2026-05-30T23:56:40.051Z",
"request_id": "338e1c46-04ab-4127-9791-6d9630439f55"
},
"status": "ok",
"message": "Search completed",
"success": true
}