Check live service health and documented failure responses before you integrate.
Identity & Verification
Spanish DNI, NIE and NIF validation API
Validate Spanish identity and tax numbers in forms, onboarding and invoicing. The API recognises DNIs, NIEs, K, L and M numbers and company NIFs, checks the control character and returns the one expected when it does not match.
Used by people at these companies
Trust signals before you integrate
Transparent docs, authenticated requests, and visible reliability details make it easier to evaluate DomScan before you ship.
OpenAPI, Swagger, Postman, CLI, SDK, and MCP links are one click away.
Authenticated endpoints use API keys with clear credit costs before you call them.
Start with 10,000 monthly credits and upgrade only when usage grows.
What this API helps you ship
Use this page as a production brief: endpoints, examples, response shape, and the workflow pieces needed to plug DomScan into your own product.
Embed domain checks, DNS intelligence, risk signals, or enrichment into onboarding, search, and internal tools.
Replace repeated manual lookups with scheduled jobs, alerting, and reproducible investigation steps.
Use predictable fields, documented status codes, and credit costs instead of scraping provider pages.
Feed agents, dashboards, SOAR playbooks, and CRMs through OpenAPI, SDK, Postman, or MCP.
Integration workflow
A simple path from first request to repeatable production usage.
Send your API key with the documented header and keep requests consistent across services.
Start from the curl and HTTP samples, then map the parameters into your application code.
Use status codes, credit costs, and response fields to build retries, logs, and alerts.
Developer kit
Jump from this page into machine-readable docs, request collections, SDKs, or agent tooling.
Generate clients or inspect every request and response shape.
Postman collectionImport ready-made requests for manual testing and team handoff.
SDKs and CLIUse maintained packages and command-line workflows instead of writing boilerplate.
MCP integrationExpose domain intelligence to AI agents and internal assistant workflows.
Parameters and response map
Scan the inputs, output fields, and status codes before wiring the endpoint into your client.
Parameter
Example response
HTTP status codes
Endpoints
/v1/national-id/validate
Trust signals before you integrate
Transparent docs, authenticated requests, and visible reliability details make it easier to evaluate DomScan before you ship.
Check live service health and documented failure responses before you integrate.
OpenAPI, Swagger, Postman, CLI, SDK, and MCP links are one click away.
Authenticated endpoints use API keys with clear credit costs before you call them.
Start with 10,000 monthly credits and upgrade only when usage grows.
Key Features
DNI, NIE, K, L and M NIFs and company NIFs (formerly CIF), each recognised with its own format and control rules.
A wrong last character comes back with the correct one, so you can suggest the fix to your user.
Company NIFs return the type of entity and enforce whether that type must end in a letter or a digit.
Spaces, dots, hyphens, lowercase letters, the ES prefix and 7-digit DNIs without the leading zero are all accepted.
Example request
curl -H "X-API-Key: $DOMSCAN_API_KEY" "https://domscan.net/v1/national-id/validate?id=B58378431"
Example response
{
"country": "ES",
"normalized": "B58378431",
"valid": true,
"type": "cif",
"entity_type": "sociedad_responsabilidad_limitada",
"checks": { "format": true, "control": true },
"expected_control": null,
"errors": []
}
Frequently asked questions
No. The check proves the number is well formed with a correct control character. It does not prove the number was issued or who holds it.
Yes. Send the NIF with the ES prefix to the VAT validation API, which checks it live with the EU VAT register.
No. The check runs offline and the number is never sent to a third party.
One credit per number.
Related tools and resources
HTTP status codes
These are the HTTP status codes to handle, so you can tell apart successful responses, auth issues, credits, rate limits, missing data, and upstream failures.
Request successful
Invalid parameters
Missing or invalid API key/session.
Not enough credits to run this request.
Rate limit exceeded
Validate a DNI

