v1

latestOpenAPI 3.1.0Open Database License 1.02026-07-135311.1 KB
Search

Search postal codes, places or countries

Returns lightweight suggestions used by the public lookup UI. Use country filtering when the user's country is known. Postal-code coverage and granularity vary by country.

get/search

Query parameters

qstring required
Example:madrid

Search term. Minimum 2 characters.

countrystring
Example:ES

Optional ISO 3166-1 alpha-2 country code filter.

regionstring

Optional region text filter.

Response

A list of matching country, locality or postal-code suggestions.

typestring required
textstring required
substring required
urlstring required

Example response

[
  {
    "type": "Country",
    "text": "Madrid",
    "sub": "Spain",
    "url": "/postal-codes/spain/madrid"
  }
]