Location by zipcode (ES)
What this tool does
This tool helps you find the name of the city, province, or community in Spain associated with a specific postal code. It is designed for people who need to verify or fill in geographic details for addresses within Spain. It solves the problem of missing or incomplete location information by providing a standardized name based on the code you provide.
When to use it
- Verifying that a Spanish postal code belongs to the city entered on a form.
- Auto-filling the province field when a user types a Spanish postcode.
- Checking if a postal code exists in our system before processing an order.
- Standardizing address data for records that only contain a postcode.
What to expect
You will receive a text response containing the official names for the community, province, and city. If the postal code is valid, the response will include these names. If the code is not found, the response will indicate that no match was found.
Limitations
- This tool only works for postal codes in Spain.
- It may not return a specific city name for very large postal codes that cover multiple districts.
- The accuracy depends on the data currently held in the platform.
When it fails
- The postal code is empty.
- The postal code contains letters or special characters.
- The postal code does not exist in Spain.
- The code is 00000.
Good to know
- Enter only the five digits of the Spanish postcode.
- Do not include spaces or dashes in the code.
Input data
| Parameter | Required | Example | Description |
|---|---|---|---|
zipcode | Yes | 08012 | Enter the 5-digit Spanish postal code as text. For example, '08012'. Required. |
Output data
| Field | Description |
|---|---|
city | The name of the city or town associated with the postal code. For example, 'Barcelona'. |
community | The autonomous community name. For example, 'Catalonia'. |
province | The province name. For example, 'Barcelona'. |