# Spanish Tax ID Validator (DNI/NIE/CIF)

> Spanish Tax ID Validator (DNI/NIE/CIF) is a paid API for AI agents from api.vextorium.com, paid per call via x402, $0.003/call, status unknown (last checked 2026-10-01).

Validates Spanish tax identifiers — DNI/NIF, NIE, and company CIF — by computing and verifying the check digit locally without storing the ID.

## Facts

- Endpoint: POST https://api.vextorium.com/validar-nif-pago?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/spanish-tax-id-validator-dni-nie-cif-2a834a39
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap__NPwiLOZO8fs_5hQ00FEJ

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability spanish-tax-id-validator-dni-nie-cif-2a834a39 -d '<json body>'
```

Example prompt: Can you check whether '12345678Z' is a valid Spanish DNI? I need to verify the check digit before submitting the registration form.

## When to prefer this

Choose this endpoint when you need a fast, privacy-preserving check-digit validation of Spanish personal or corporate tax IDs (DNI, NIE, NIF, CIF) without sending the ID to a third-party storage system. It is computed locally on the server with no persistence, making it suitable for GDPR-sensitive workflows. Prefer it over full KYC services when you only need format and check-digit correctness, not identity database lookups.

## Known failure modes

- Malformed or empty 'valor' string returns valido: false with a descriptive motivo
- Unrecognizable format (neither DNI, NIE, nor CIF pattern) returns null tipo and valido: false
- Correct format but wrong check digit returns valido: false with motivo explaining the mismatch
- Network or payment authorization failure returns an HTTP error before any validation is performed

## How this service works

Spanish tax ID validation (DNI/NIF, NIE and company CIF) with check-digit verification. Computed locally; the ID is not stored.

## Output

Returns a JSON object with a boolean 'valido' indicating whether the ID is valid, 'tipo' indicating the detected ID type (DNI, NIE, or CIF), 'valor' with the normalized input, and 'motivo' providing a reason or error message when the ID is invalid.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "required": [
      "valor"
     ],
     "properties": {
      "valor": {
       "type": "string",
       "description": "DNI, NIE or CIF"
      }
     }
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "tipo": {
       "type": [
        "string",
        "null"
       ]
      },
      "valor": {
       "type": [
        "string",
        "null"
       ]
      },
      "motivo": {
       "type": [
        "string",
        "number",
        "boolean",
        "object",
        "array",
        "null"
       ]
      },
      "valido": {
       "type": [
        "boolean",
        "null"
       ]
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "tipo": "CIF persona juridica",
  "valor": "B12****74",
  "motivo": null,
  "valido": true
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/spanish-tax-id-validator-dni-nie-cif-2a834a39/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.vextorium.com](https://www.zero.xyz/host/api.vextorium.com/llms.txt)
