CPF validation

Validate CPF via API (registration data)

A local checksum does not prove identity. CPFHub.io receives the CPF and returns name, gender and date of birth for you to compare in your flow.

  • Checksum vs lookup

    Modulo-11 only checks digits. The lookup returns name, gender and date of birth for your backend to compare.

  • Matching in your backend

    The matching rule (name, date of birth) stays in your system. The API only delivers the data.

  • Registration status is another route

    This route returns name, gender and date of birth. For registration status, use the Real-Time Lookup at /en/cpf-lookup-federal-revenue, which requires the holder's date of birth.

  • Free: 50 to test

    50 credits/month on Free, no card. Pro from R$19/month with 100 credits.

Example

One GET and the full JSON comes back

x-api-key header. Base https://api.cpfhub.io. No version in the URL.

cURLGET /cpf/{cpf}
1
2
3
curl -X GET \
  'https://api.cpfhub.io/cpf/12345678909' \
  -H 'x-api-key: YOUR_API_KEY'
JSON response200 OK
1
2
3
4
5
6
7
8
9
10
11
12
13
{
  "success": true,
  "data": {
    "cpf": "12345678909",
    "name": "Fulano de Tal",
    "nameUpper": "FULANO DE TAL",
    "gender": "M",
    "birthDate": "15/06/1990",
    "day": 15,
    "month": 6,
    "year": 1990
  }
}

FAQ

Frequently asked questions

Is validating a CPF the same as querying Receita Federal?

On this route, no. GET /cpf/{cpf} returns name, gender and date of birth from our database, in a typical time of ~150 ms (not an SLA), for you to compare in your flow. When you have the holder's date of birth and need the registration status or the year of death, there is the Real-Time Lookup, which queries Receita Federal (Brazil's federal tax authority) in real time and returns registration status, deathYear and proof (1.5 credits per successful lookup). See /en/cpf-lookup-federal-revenue.

Do you do KYC?

No. No selfie, document OCR, face match or biometrics. A CPF lookup returns registration data. The verification rule (matching) stays in your backend.

What is in the JSON?

For a found CPF: cpf (11 digits, unformatted), name, nameUpper, gender (M/F), birthDate and day, month, year. Auth: x-api-key header. Base: https://api.cpfhub.io.

Still have questions?

Get in touch

Validate with data,
not just digits.

GET /cpf/{cpf} returns name, gender and date of birth. 50 free credits to integrate.

Instant access to your API key and documentation.

WhatsAppChat with us on WhatsApp