- Sources: The Spanish dataset is compiled from official government sources.
- Update frequency: Monthly.
- Postcodes: five digits. The first two,
01to52, identify the province, with51and52for the autonomous cities of Ceuta and Melilla. Treat postcodes as text: in the provinces01to09they start with a zero, such as08002in 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 theiraddressIdvalues; repeat the request with the one you want.
House numbers
streetNumberis text, returned as the source writes it:03and3are different addresses, andS-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 as1 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 asComunidad de Madrid.provinceandmunicipality: the provincia and municipio.- Administrative names that are official in two languages carry both forms, separated by a slash, such as
País Vasco/EuskadiandValència/Valencia.