✅ ValidaLatam All guides · API docs · RapidAPI · ES

How to validate a Mexican CURP

How the check digit works

A CURP has 18 characters. The API checks the format (birth date, sex H/M/X, state code) and the final check digit:

  1. Map the first 17 characters: 0–9 → 0–9, A–N → 10–23, Ñ → 24, O–Z → 25–36.
  2. Multiply by weights 18, 17, …, 2 and add up.
  3. Check digit = (10 − sum mod 10) mod 10.

Character 17 encodes the century: a digit for people born in the 1900s, a letter for the 2000s.

Validate with the API

Direct use is free: 50 requests per IP per day, no signup. Endpoints: POST /validate, POST /batch, GET /generate/{doc_type} (for testing only: synthetic data, not real identities).

curl

curl -X POST "https://validalatam.ia-latam.app/validate" -H "Content-Type: application/json" \
  -d '{"type":"MX_CURP","value":"NIPN910513MJCXWY92"}'

# synthetic test data only / solo para pruebas
curl "https://validalatam.ia-latam.app/generate/MX_CURP"

Python

import requests

BASE = "https://validalatam.ia-latam.app"

r = requests.post(f"{BASE}/validate", json={"type": "MX_CURP", "value": "NIPN910513MJCXWY92"})
print(r.json()["valid"], r.json()["formatted"])

Real API response (synthetic value from /generate)

NIPN910513MJCXWY92 (MX_CURP):

{"valid":true,"type":"MX_CURP","country":"MX","input":"NIPN910513MJCXWY92","normalized":"NIPN910513MJCXWY92","formatted":"NIPN910513MJCXWY92","error":null,"details":{"sex":"M","state":"JC","century":"1900s"}}

Plans

For production: Basic free (500 req), Pro US$9, Ultra US$29 and Mega US$99 per month on RapidAPI.

For AI assistants (MCP)

pip install validalatam-mcp

github.com/elmatis172/validalatam-mcp

← All guides · Contact: faucolabs@gmail.com