ESEurope · Western Europe

Spain Address Validation API

Validate and standardise Spain addresses in real time. Get a matched address, geocoordinates, confidence score, and Código postal data via a single API call.

NNNNN
Código postal
OpenStreetMap
Data Source
Spanish / Catalan
Languages
HIGH
Max Confidence

Spain Address Validation Demo

Confidence:HIGH
POST /enrich — ResponseSample
{
  "_note": "Sample response — enter any address and click Validate for live data",
  "valid": true,
  "canonical_address": "Calle de Alcalá 9, 28014 Madrid",
  "confidence": "HIGH",
  "delivery_risk": "low",
  "matched_address": {
    "line1": "Calle de Alcalá 9",
    "city": "Calle de Alcalá",
    "postal_code": "28014 Madrid",
    "country": "Spain",
    "iso2": "ES"
  },
  "geocode": {
    "lat": 40.4168,
    "lng": -3.7038
  },
  "data_source": "OpenStreetMap",
  "issues": []
}

Spain Address Format

Spanish addresses list the street type and name, then house number, optional floor (piso) and door (puerta), then 5-digit postal code and city. Street types include Calle (C/), Avenida (Avda.), Plaza (Pza.), and Paseo (Pso.).

Postal Code Name
Código postal
Format
NNNNN
Official Languages
Spanish, Catalan, Basque, Galician
Sample address:
Calle de Alcalá 9, 28014 Madrid
Major cities:
MadridBarcelonaValenciaSevilleZaragozaMálagaBilbao

Integration Code

curl -X POST https://agent.apitier.com/v1/enrich \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{"address": "Calle de Alcalá 9, 28014 Madrid"}'

Frequently Asked Questions

What address format does Spain use?
Spanish addresses list the street type and name, then house number, optional floor (piso) and door (puerta), then 5-digit postal code and city. Street types include Calle (C/), Avenida (Avda.), Plaza (Pza.), and Paseo (Pso.).
What is a Código postal in Spain?
Spain uses a Código postal with the format NNNNN to identify delivery areas. The APITier Address Agent API validates and standardises addresses including the Código postal as part of the response.
How do I validate a Spain address via API?
Send a POST request to https://agent.apitier.com/v1/enrich with your address string in the request body and your API key in the x-api-key header. The response includes the standardised Spain address, geocoordinates (lat/lng), a confidence score (HIGH/MEDIUM/LOW), and data source information.

More Europe Countries

Ready to validate Spain addresses at scale?

The APITier Address Agent API handles address validation across 120+ countries. Free trial — 20 requests, no credit card required.