Spain

  • Sources: The Spanish dataset is compiled from official government sources.
  • Update frequency: Monthly.
  • Postcodes: five digits. The first two, 01 to 52, identify the province, with 51 and 52 for the autonomous cities of Ceuta and Melilla. Treat postcodes as text: in the provinces 01 to 09 they start with a zero, such as 08002 in Barcelona.
  • Coverage: mainland Spain, the Balearic and Canary Islands, Ceuta and Melilla.

Finding an address

  • A postcode and house number don't identify a Spanish address. Autocomplete needs the postcode, settlement and street, or an addressId.
  • One house number can have several entrances (portales), each with its own addressId. When a request matches several of them, the API returns a 400 that lists their addressId values; repeat the request with the one you want.

House numbers

  • streetNumber is text, returned as the source writes it: 03 and 3 are different addresses, and S-N (sin número) marks an address without a number.
  • A letter after the number is the premise. Calle Goya 1 in Madrid (28001) exists only as 1 A, so a request without a premise returns a 400 that lists the available premises.

Address fields

  • state: the autonomous community (comunidad autónoma), such as Comunidad de Madrid.
  • province and municipality: the provincia and municipio.
  • Administrative names that are official in two languages carry both forms, separated by a slash, such as País Vasco/Euskadi and València/Valencia.