Spain
Names and codes: GeoNames, CC BY 4.0 · Boundary: Natural Earth, public domain · Refresh date not recorded · Sources and licenses
Codes and identifiers
- ISO alpha-2
- ES
- ISO alpha-3
- ESP
- ISO numeric
- 724
- FIPS 10-4
- SP
- GeoNames ID
- 2510769
Key facts
- Capital
- Madrid
- Area
- 504,782 km²
- Population
- 46,723,749
- Currency
- Euro (EUR)
- Calling code
- +34
- Top-level domain
- .es
- Official languages
- es-ES,ca,gl,eu,oc
Continent
- Name
- Europe
- Code
- EU
- In this dataset
- 54 countries
Location
- Latitude
- 40
- Longitude
- -4
- Min latitude
- 27.642238674000055
- Min longitude
- -18.167225714999915
- Max latitude
- 43.79344310100004
- Max longitude
- 4.337087436000047
Boundary
The API call behind this page
Request
curl -H "X-API-Key: YOUR_KEY" \
"https://geosearch.dev/v1/countries/ES?fields=iso_code,iso3_code,name,capital,population,area_sq_km,currency_code,continent_code"
Response
{
"data": {
"area_sq_km": 504782,
"capital": "Madrid",
"continent_code": "EU",
"currency_code": "EUR",
"iso3_code": "ESP",
"iso_code": "ES",
"name": "Spain",
"population": 46723749
}
}
Formatted for reading. The API returns the same JSON on one line.
Other endpoints for this country
/v1/countries/ES/regions/v1/cities?country=ES/v1/postal-codes?country=ES/v1/timezones?country=ES
Name in other languages
- Arabic
- إسبانيا
- Chinese
- 西班牙
- English
- Spain
- French
- Espagne
- German
- Spanien
- Hindi
- स्पेन
- Italian
- Spagna
- Japanese
- スペイン
- Korean
- 스페인
- Portuguese
- Espanha
- Russian
- Испания
- Spanish
- España
- Total language variants
- 174
The API returns any of them with ?lang=.
Time zones
| IANA ID | UTC offset | DST offset |
|---|---|---|
| Africa/Ceuta | UTC+01:00 | UTC+02:00 |
| Atlantic/Canary | UTC+00:00 | UTC+01:00 |
| Europe/Madrid | UTC+01:00 | UTC+02:00 |
Postal code format
- Format
- #####
- Pattern
^(\d{5})$
First-level administrative regions
- Andalusia
- Catalunya
- Comunidad de Madrid
- Comunitat Valenciana
- Galicia
- Castilla y León
- Canary Islands
- Euskal Autonomia Erkidegoa
- Castilla-La Mancha
- Región de Murcia
- Aragon
- Comunitat Autònoma de les Illes Balears
- Extremadura
- Principality of Asturias
- Navarra
- Cantabria
- La Rioja
- Melilla
- Ceuta
19 of 19 shown, largest first
Largest cities
| City | Population |
|---|---|
| Madrid | 3,255,944 |
| Barcelona | 1,686,208 |
| Valencia | 824,340 |
| Zaragoza | 686,986 |
| Sevilla | 686,741 |
| Málaga | 592,346 |
| Murcia | 471,982 |
| Palma | 438,234 |
| Las Palmas de Gran Canaria | 383,516 |
| Alicante | 348,901 |
Coverage in this dataset
- Cities
- 30,896
- First-level regions
- 19
- Postal codes
- 37,867
- Name languages
- 174
- Boundary polygon
- Yes
What GeoSearch holds for this country in the current dataset. Counts change with each refresh.
Query this data yourself
The free tier includes every endpoint: 5,000 requests a month, no card.