/locationsDictionariesLocations, regions, districts and populated places
Regions, districts and populated places, filterable by country and parent.
feature_class=A&feature_code=ADM1gives regions,ADM2districts, andfeature_class=Ptowns and villages.- An unknown country or filter combination returns an empty list, not 404.
- Pages with
after_id, like /countries.
Query parameters
10querystring≤ 200 charsOptional literal name-prefix search. Countries also search native names, ISO codes and stored translations. Blank text disables this filter.
ids[]integer[]≥ 1 · ≤ 100 itemsBatch lookup. Repeat ids[]=2001&ids[]=3001; not a comma-separated string. Unknown IDs are omitted. Intersects other filters.
per_pageinteger1–1,000 · default 100Maximum returned records. Empty, noninteger or out-of-range values return 422.
after_idinteger≥ 1Exclusive ID cursor. Omit initially; then use meta.next_after_id with unchanged filters. Not a page number. Empty or nonpositive values return 422.
country_idinteger≥ 1Internal country ID from /countries. Optional; omit to enumerate all countries.
admin1integer≥ 1First-level administrative location ID, not a country ID or source code.
admin2integer≥ 1Second-level administrative location ID.
feature_classstringCase-insensitive source class: A for administrative areas, P for populated places (not only cities). Unknown well-formed values return an empty list.
feature_codestringCase-insensitive source code: ADM1 for regions, ADM2 for districts. Unknown well-formed values return an empty list.
langstringResponse locale. Option translations are also limited by the account languages. The page selects its current language automatically.
/locationscurl -g "https://api.lotarius.com/locations?api_key=$CARS_API_KEY" \
-H "Accept: application/json"