Get Geographic $1.50 / 1,000 calls

Province by zipcode (ES)

What this tool does

This tool finds the province name in Spain based on a postcode. It helps you quickly identify the geographic area for a Spanish address. This is useful for organizing customer data or checking delivery regions.

When to use it

  • Validating a Spanish address in a form.
  • Categorizing customers by their province.
  • Checking if a postcode belongs to a specific region.

What to expect

You will receive the name of the province as text. If the postcode is valid, you get the province name. If not, you get an empty text value.

Limitations

  • It only works for Spain (country code ES).
  • It may not find a province for very short or incomplete postcodes.
  • The result is based on a fixed internal list and might not reflect very recent administrative changes.

When it fails

  • If the postcode is not from Spain.
  • If the postcode format is incorrect or too short.
  • If the system cannot process the request due to a temporary error.

Good to know

  • Spanish postcodes start with two digits indicating the province.
  • Entering the full postcode gives the best results.

Input data

Parameter Required Example Description
zipcode Yes 08 Enter a Spanish postal code, such as 08. If the code is invalid or not found, the result will be empty.

Output data

Field Description
result The name of the province as a text string, for example 'Barcelona'. If no province is found, this will be empty.