Database Details
Postcodes of Spain
Postcode Database Spain
Details (Data of: 2024)
The Spain postcode database includes all Spanish postcodes, as well as the corresponding city, region, and latitude/longitude.
The postcode data does change from time to time.
Buy your postcode database at ZIPCodeSoft, and we will keep your postcode data up-to-date. Just pay a one-off price! No further costs! Unlimited in time. Unprecedented!
Database content
Spain | |
Comunidades | 19 |
Provinces | 52 |
Places | 952 |
Unique Postcodes | 11,332 |
Geocoded locations | 100 % |
Number of records | 59,863 |
Available Formats:
Comma-separated values (CSV) ~400 KB ZIP compressed
Easy to import into all popular database management systems:
MySQL
MS SQL
Oracle
Postgre SQL
Microsoft Access
DB Structure
pais | varchar(2) |
cp | varchar(5) |
lugar | varchar(48) |
comunidad | varchar(48) |
provincia | varchar(48) |
provincia_iso | varchar(2) |
latitud | decimal(13, 9) |
longitud | decimal(13, 9) |
Delivery
Online Download
Programming
Having a database of localities with their latitudes and longitudes enables you to locate the closest locations to a set point (or within a radius of X miles/km).To help you implement a postcode radius/distance search, we offer free access to sample code in scripting and programming languages like ASP and PHP.
To achieve the highest accuracy, the formulas in our example scripts take the earth's curvature into consideration.
Check out a working example of how to calculate all Spanish postcodes within a given radius
Check out a working example of how to calculate road / beeline distance between 2 Spanish postcodes
All these scripts are available for our database customers for free download. (PHP / ASP)
More information about the programming...
Data Sample
pais;cp;lugar;comunidad;provincia;provincia_iso;latitud;longitud
ES;29100;Caballo Blanco;Andalucía;Málaga;MA;36.68826453;-4.42803766
ES;29100;Coín;Andalucía;Málaga;MA;36.66603184;-4.74845609
ES;29100;Combaderos;Andalucía;Málaga;MA;36.68637375;-4.42780947
ES;29100;Cortijo Benitez;Andalucía;Málaga;MA;36.68868752;-4.42808872
ES;29100;Ejido;Andalucía;Málaga;MA;36.68708936;-4.42789584
ES;29100;El Gato;Andalucía;Málaga;MA;36.67322353;-4.73760648
ES;29100;El Rodeo;Andalucía;Málaga;MA;36.67061675;-4.74188275
ES;29100;La Charca;Andalucía;Málaga;MA;36.73138504;-3.96276378
ES;29100;Las Delias;Andalucía;Málaga;MA;36.67373973;-4.79726258
ES;29100;Las Huertas;Andalucía;Málaga;MA;36.69719337;-4.79282996
ES;29100;Las Vistillas;Andalucía;Málaga;MA;36.67372817;-4.79726106
ES;29100;Los Gallos;Andalucía;Málaga;MA;37.34197045;-5.83634542
ES;29100;Lourdes;Andalucía;Málaga;MA;36.66813961;-4.74566489
ES;29100;Miralmonte;Andalucía;Málaga;MA;36.68889779;-4.42811410
ES;29100;Miralvalles;Andalucía;Málaga;MA;36.68635656;-4.42780739
ES;29100;Montecillo;Andalucía;Málaga;MA;36.68839326;-4.42805320
ES;29100;Pereila Baja;Andalucía;Málaga;MA;36.68748722;-4.42794385
ES;29108;Ardite;Andalucía;Málaga;MA;36.69321403;-4.54628317
ES;29108;Coín;Andalucía;Málaga;MA;36.67303587;-4.84169622
ES;29108;Guaro;Andalucía;Málaga;MA;36.67302722;-4.84169508
ES;29109;Las Millanas;Andalucía;Málaga;MA;36.68669524;-4.90467070
ES;29109;Tolox;Andalucía;Málaga;MA;36.70015527;-4.90002071
ES;29109;Umbría;Andalucía;Málaga;MA;36.68669238;-4.90467031
ES;29110;Monda;Andalucía;Málaga;MA;36.63372998;-4.83338562
ES;29120;Alhaurín El Grande;Andalucía;Málaga;MA;36.65810518;-4.67604120
ES;29120;Arroyo de Blas Gonzalez;Andalucía;Málaga;MA;36.65148106;-4.68710565
ES;29120;Camino Forestal;Andalucía;Málaga;MA;36.65132010;-4.68708507
ES;29120;El Cigarral;Andalucía;Málaga;MA;36.65272803;-4.72065361
ES;29120;El Zangano;Andalucía;Málaga;MA;36.65271205;-4.72065155
ES;29120;Fuente del Perro;Andalucía;Málaga;MA;36.65454025;-4.68749687
ES;29120;Huerta Campo;Andalucía;Málaga;MA;36.65114399;-4.68706254
ES;29120;La Chicharra;Andalucía;Málaga;MA;36.80901802;-4.21786091
ES;29120;La Peñita;Andalucía;Málaga;MA;36.64742568;-4.67769628
ES;29120;Las Agonias;Andalucía;Málaga;MA;36.64531846;-4.68470742
ES;29120;Montemario;Andalucía;Málaga;MA;36.65449462;-4.68749103
ES;29120;Siete Casas;Andalucía;Málaga;MA;36.65179333;-4.68714559
ES;29120;Urique;Andalucía;Málaga;MA;36.65321810;-4.68732779
ES;29120;Ventorrillo Angulo;Andalucía;Málaga;MA;36.65203922;-4.68717704
ES;29100;Caballo Blanco;Andalucía;Málaga;MA;36.68826453;-4.42803766
ES;29100;Coín;Andalucía;Málaga;MA;36.66603184;-4.74845609
ES;29100;Combaderos;Andalucía;Málaga;MA;36.68637375;-4.42780947
ES;29100;Cortijo Benitez;Andalucía;Málaga;MA;36.68868752;-4.42808872
ES;29100;Ejido;Andalucía;Málaga;MA;36.68708936;-4.42789584
ES;29100;El Gato;Andalucía;Málaga;MA;36.67322353;-4.73760648
ES;29100;El Rodeo;Andalucía;Málaga;MA;36.67061675;-4.74188275
ES;29100;La Charca;Andalucía;Málaga;MA;36.73138504;-3.96276378
ES;29100;Las Delias;Andalucía;Málaga;MA;36.67373973;-4.79726258
ES;29100;Las Huertas;Andalucía;Málaga;MA;36.69719337;-4.79282996
ES;29100;Las Vistillas;Andalucía;Málaga;MA;36.67372817;-4.79726106
ES;29100;Los Gallos;Andalucía;Málaga;MA;37.34197045;-5.83634542
ES;29100;Lourdes;Andalucía;Málaga;MA;36.66813961;-4.74566489
ES;29100;Miralmonte;Andalucía;Málaga;MA;36.68889779;-4.42811410
ES;29100;Miralvalles;Andalucía;Málaga;MA;36.68635656;-4.42780739
ES;29100;Montecillo;Andalucía;Málaga;MA;36.68839326;-4.42805320
ES;29100;Pereila Baja;Andalucía;Málaga;MA;36.68748722;-4.42794385
ES;29108;Ardite;Andalucía;Málaga;MA;36.69321403;-4.54628317
ES;29108;Coín;Andalucía;Málaga;MA;36.67303587;-4.84169622
ES;29108;Guaro;Andalucía;Málaga;MA;36.67302722;-4.84169508
ES;29109;Las Millanas;Andalucía;Málaga;MA;36.68669524;-4.90467070
ES;29109;Tolox;Andalucía;Málaga;MA;36.70015527;-4.90002071
ES;29109;Umbría;Andalucía;Málaga;MA;36.68669238;-4.90467031
ES;29110;Monda;Andalucía;Málaga;MA;36.63372998;-4.83338562
ES;29120;Alhaurín El Grande;Andalucía;Málaga;MA;36.65810518;-4.67604120
ES;29120;Arroyo de Blas Gonzalez;Andalucía;Málaga;MA;36.65148106;-4.68710565
ES;29120;Camino Forestal;Andalucía;Málaga;MA;36.65132010;-4.68708507
ES;29120;El Cigarral;Andalucía;Málaga;MA;36.65272803;-4.72065361
ES;29120;El Zangano;Andalucía;Málaga;MA;36.65271205;-4.72065155
ES;29120;Fuente del Perro;Andalucía;Málaga;MA;36.65454025;-4.68749687
ES;29120;Huerta Campo;Andalucía;Málaga;MA;36.65114399;-4.68706254
ES;29120;La Chicharra;Andalucía;Málaga;MA;36.80901802;-4.21786091
ES;29120;La Peñita;Andalucía;Málaga;MA;36.64742568;-4.67769628
ES;29120;Las Agonias;Andalucía;Málaga;MA;36.64531846;-4.68470742
ES;29120;Montemario;Andalucía;Málaga;MA;36.65449462;-4.68749103
ES;29120;Siete Casas;Andalucía;Málaga;MA;36.65179333;-4.68714559
ES;29120;Urique;Andalucía;Málaga;MA;36.65321810;-4.68732779
ES;29120;Ventorrillo Angulo;Andalucía;Málaga;MA;36.65203922;-4.68717704