Verify Spanish DNI or NIE against Dirección General de la Policía. Pay-per-call $0.20, no monthly minimums, REST API.
Spain Database Validation verifies a Spanish DNI (Documento Nacional de Identidad) or NIE (Número de Identidad de Extranjero) against the Dirección General de la Policía, the national authority that issues both document types. Each lookup returns the holder’s name, date of birth, nationality and registry status.Documentation Index
Fetch the complete documentation index at: https://docs.didit.me/llms.txt
Use this file to discover all available pages before exploring further.
| Field | Required | Notes |
|---|---|---|
personal_number | Yes | DNI / NIE |
first_name | Optional | Cross-checked against the registry name. |
last_name | Optional | Cross-checked against the registry name. |
date_of_birth | Optional | ISO YYYY-MM-DD. Cross-checked against the registry record. |
12345678Z). NIE is X|Y|Z + 7 digits + 1 letter (e.g. X1234567Z). Letters are case-insensitive.
Regulatory context: Spanish KYC programs combine Dirección General de la Policía DNI / NIE verification with Banco de España (BdE) supervision, SEPBLAC AML obligations, and CNMV oversight for securities firms. Didit holds an attestation from the Spanish Tesoro / BdE / SEPBLAC confirming our Database Validation flow is at least as safe as in-person verification under Spanish AML law.
esp_dni — verification against Dirección General de la Policía. $0.20 per call. Selected automatically when services is omitted in the request.namelastnamedate_of_birthnationalityissue_dateexpiration_dateregistry_statussource_data depend on what the registry returns — fields that are absent from the registry record (e.g. an unset expiration_date) are simply omitted.
The ISO 3166-1 alpha-3 country code of the issuing state. Determines which validation sources are used.
ARG, BOL, BRA, CHL, COL, CRI, DOM, ECU, ESP, GTM, HND, MEX, PAN, PER, PRY, SLV, URY, VEN Universal identification number field. Automatically maps to the correct country-specific field: ARG→document_number (DNI), BOL→document_number (CI), BRA→tax_number (CPF, 11 digits), CHL→personal_number (RUT), COL→personal_number (Cédula), CRI→personal_number (Cédula), DOM→personal_number (Cédula, 11 digits), ECU→personal_number (Cédula, 10 digits), ESP→personal_number (DNI/NIE), GTM→document_number (DPI), HND→document_number (DNI), MEX→personal_number (CURP, 18 chars), PAN→personal_number (Cédula), PER→personal_number (DNI, 8 digits), PRY→document_number (CI), SLV→document_number (DUI), URY→personal_number (CI), VEN→document_number (Cédula).
Optional list of service_ids to run for this country (e.g. ['bra_cpf']). If omitted, every service configured for the issuing_state is queried in waterfall order. Each id must be a service that exists for the given country — see the catalog endpoint /v1/organization/database-validation-countries/. When provided, the response contains the extended services_used, providers_used, and match_score fields.
The individual's first name. Might be required for some countries and matching types.
The individual's last name. Might be required for some countries and matching types.
The individual's date of birth in YYYY-m-d format. Might be required for some countries and matching types. Example: 1990-01-01.
The type of document being validated. P = Passport, DL = Driver License, ID = National ID, RP = Residence Permit. Optional field that may help with validation in some countries.
P, DL, ID, RP The document's expiration date in YYYY-MM-DD format. Required for ESP (Spain) database validation. Example: 2030-01-15.
The individual's nationality, expressed as an ISO 3166-1 alpha-3 country code. Might be required for some countries and matching types.
The individual's residential address. Used in specific jurisdictions where address validation is supported. Might be required for some countries and matching types.
A selfie image of the individual (JPEG, PNG, or WebP). Required for ARG (Argentina) where biometric face-match is performed via RENAPER, and for PAN (Panama) where biometric validation is performed via SIB (Servicio de Identificación Biométrica). For ARG, the gender field (M/F/X) is also required.
The individual's gender. Required for ARG (Argentina) biometric validation via RENAPER. M = Male, F = Female, X = Non-binary. When used within a verification session flow, gender is automatically extracted from the ID document or inferred from face analysis / given name.
M, F, X Whether to save this API request. If true, then it will appear on the Manual Checks section in the Business Console.
A unique identifier for the vendor or user, such as a UUID or email. This field enables proper session tracking and user data aggregation across multiple verification sessions.