API Reference

# Find a CURP by personal data

Find a CURP by personal data and get its registered identity, certification status, and CURPs associated by correction.

POST

`/v1/curp/search`

Find a person's CURP from their personal data: the same search as the "Datos personales" form on gob.mx. RENAPO matches the names, birth date, sex, and state of birth exactly as registered. Takes about 2 seconds and costs 5 credits.

Use it when someone doesn't know their CURP, to fill it in during onboarding, or to check that the CURP they gave matches their data.

This check is one step of a larger job. The MexCheck guide walks through all of them: [KYC and customer onboarding](https://mexcheck.com/solutions/kyc-onboarding).

## Request body


| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `names` | string | Yes | Given name or names, as registered. |
| `paternal_surname` | string | Yes | First surname. |
| `mothers_maiden_name` | string | No | Second surname. Omit it if the person has only one. |
| `birthdate` | string | Yes | Birth date as YYYY-MM-DD. |
| `sex` | string | Yes | `H` (hombre), `M` (mujer), or `X` (no binario). |
| `state` | string | Yes | Two-letter state code of the state of birth, the same codes a CURP uses (e.g. DF, JC, NL), or NE for people born abroad. |
| `include_pdf` | boolean | No | Set to true to include the official CURP PDF as pdf_base64. Defaults to false. |


Names are case-insensitive. Accents are removed the way gob.mx removes them (Ñ and Ü stay), and extra spaces are collapsed. Names may contain letters, spaces, dots, and hyphens.

## Example request

curl

```bash
curl -X POST https://curpcheck.com/v1/curp/search \
  -H "x-api-key: rfc_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"names": "Juan", "paternal_surname": "Pérez", "mothers_maiden_name": "Martínez",
       "birthdate": "1980-01-01", "sex": "H", "state": "DF"}'
```

## Response (200)

200 OK

```json
{
  "curp": "PEMJ800101HDFRRN07",
  "found": true,
  "message": "Identity retrieved from RENAPO",
  "person": {
    "curp": "PEMJ800101HDFRRN07",
    "renapo_valid": true,
    "names": "JUAN",
    "paternal_surname": "PEREZ",
    "mothers_maiden_name": "MARTINEZ",
    "sex": "HOMBRE",
    "birthdate": "01/01/1980",
    "nationality": "MEXICO",
    "entity_birth": "DF",
    "status_curp": "RCN",
    "certified": true,
    "certification": "CURP Certificada: verificada con el Registro Civil",
    "associated_curps": [],
    "probation_document": "ACTA DE NACIMIENTO",
    "probation_document_data": {},
    "homonimo": false
  }
}
```

found is true (curp and person hold the match), false (RENAPO did not return a single record; curp is null, and person.homonimo is true when RENAPO reports a problem with the key), or null (RENAPO could not be reached, retry later). A false answer costs 5 credits. A null answer is not charged.

person.certified is true when the PDF prints a certification statement, false when the PDF was read and no statement is present, or null when it could not be read. Certification may be through Registro Civil, SRE, or INM. This field does not determine nationality or eligibility for a passport or INE credential.

Every lookup and search reads the official PDF to include person.certification (the certification statement as printed) and person.associated_curps (CURPs associated by correction). An empty list means none are listed. If the document cannot be read, both fields are null and the registered identity is still returned. include_pdf only controls whether the base64 file is returned.

With include_pdf set to true, a successful response also includes pdf_base64, the official RENAPO PDF encoded as base64. No extra credits are charged. If the requested PDF cannot be downloaded, found is null and the request is not charged; retry later.

## Errors

- `422 invalid_fields`: one or more fields are missing or malformed. fields lists all of them, so you can fix them in one go. Not charged.

422 Unprocessable Entity

```json
{
  "error": "invalid_fields",
  "fields": ["birthdate", "state"]
}
```