CPF Batch Lookup (Real-Time)
Send a list of up to 10,000 CPFs with date of birth and confirm each one at Receita Federal (Brazil's federal tax authority), in the background. It costs 1.5 credits per confirmed CPF by default.
Using Cursor, Lovable, v0 or another AI? Copy the real-time batch prompt and paste it into your assistant.
Without code, the dashboard accepts CSV, TXT or pasted lines. For the CPFHub.io database, use the Batch Lookup.
Two-step flow:
POST /cpf/bulk/realtimesends the list and responds with ajobId.GET /cpf/bulk/{jobId}returns progress and results. Repeat untilstatusis"done"or"failed".
Endpoint
https:/ / api.cpfhub.io/ cpf/ bulk/ realtimeParameters
| Where | Name | Required | Description |
|---|---|---|---|
| Header | x-api-key | Yes | Your API key. See Authentication. |
| Header | Content-Type | Yes | application/json |
| Body | items | Yes | Array of 1 to 10,000 objects. |
| Body | items[].cpf | Yes | CPF, with or without formatting. |
| Body | items[].birthDate | Yes | Date of birth: DD/MM/YYYY or YYYY-MM-DD. It must be the date on record at Receita Federal. |
| Body | fileName | No | Free label. Returned as file_name. |
| Body | format | No | Free label. Returned as format. |
What happens on submission
- Items without a valid CPF or valid date of birth are counted in
invalidand not charged. - A repeated CPF is looked up once, with the date from its first line.
- The balance must cover the whole list (
totalRecords× lookup cost), minus batches still processing. Otherwise the batch is not created. Plan overage applies to this batch only for verified accounts. - There is a limit of pending batches per customer. Above it,
429. - Batch lookups do not count toward the 5 per minute limit of the Real-Time Lookup.
Example
curl -X POST "https://api.cpfhub.io/cpf/bulk/realtime" \
-H "x-api-key: $CPFHUB_API_KEY" \
-H "content-type: application/json" \
-d '{"items": [{"cpf": "12345678909", "birthDate": "15/06/1990"}]}'Response
HTTP 202 Accepted
{
"success": true,
"data": {
"jobId": "4a1ef25e-052c-4464-9657-4148f53bb0fc",
"status": "processing",
"lookupKind": "realtime",
"totalRecords": 1,
"invalid": 0
}
}Status and results
https:/ / api.cpfhub.io/ cpf/ bulk/ {jobId}Use the same API key as the submission. It does not use credits. Large lists may take hours: poll every 30 s or more and keep the jobId.
curl "https://api.cpfhub.io/cpf/bulk/4a1ef25e-052c-4464-9657-4148f53bb0fc" \
-H "x-api-key: $CPFHUB_API_KEY"HTTP 200 OK
{
"success": true,
"data": {
"id": "4a1ef25e-052c-4464-9657-4148f53bb0fc",
"status": "done",
"file_name": null,
"format": null,
"total_records": 1,
"processed": 1,
"found": 1,
"not_found": 0,
"skipped": 0,
"error": null,
"lookup_kind": "realtime",
"created_at": "2026-11-23T14:15:16.000Z",
"updated_at": "2026-11-23T14:15:18.000Z",
"cpfs": [
{
"cpf": "12345678909",
"found": true,
"name": "FULANO DE TAL",
"nameUpper": "FULANO DE TAL",
"gender": null,
"birthDate": "15/06/1990",
"day": 15,
"month": 6,
"year": 1990,
"status": "found",
"error": null,
"situation": "REGULAR",
"registrationDate": null,
"deathYear": null,
"controlCode": "ABCD.1234.EFGH.5678",
"emissionDate": "23/11/2026",
"emissionTime": "14:15:16",
"validationUrl": "https://servicos.receita.fazenda.gov.br/...",
"validationHtmlUrl": "https://api.cpfhub.io/cpf/proof/..."
}
]
}
}data.cpfs has one object per CPF, in submission order, including pending and skipped ones. data.lookup_kind is "realtime".
| Field | Description |
|---|---|
status | found, not_found, skipped or pending |
found | true only when Receita confirmed the CPF and date |
error | Reason for not_found or skipped |
name, nameUpper, birthDate, day, month, year | Holder data. null when not confirmed |
gender | Always null: Receita Federal does not provide gender |
situation | Registration status, in uppercase. Handle any value |
deathYear | Year of death or null |
registrationDate | Registration date, when available |
controlCode, emissionDate, emissionTime | Proof issuance data, when available |
validationUrl, validationHtmlUrl | Verification and proof links, when available. They are personal data: do not expose them |
Credits
- Only
foundis charged, including irregular, suspended, canceled or deceased-holder status. not_found(nonexistent CPF or mismatched date),skippedand invalid items are not charged.- To retry
skippeditems, send only those CPFs in a new batch.
Errors
| Status | When it happens | What to do |
|---|---|---|
400 | items missing, empty or above 10,000 items | Fix the body. |
401 | API key missing, invalid or inactive | Check the x-api-key header. |
403 | Insufficient balance (insufficient_credits), overage without a verified account (overage_requires_verified_account), or blocked account | Add credits, shorten the list or contact support. |
404 | On GET: jobId does not exist or belongs to another API key | Check the jobId and key. |
422 | No valid line | Fix the list. |
429 | Another batch of the account is being created (admission_in_progress) or pending batch limit | Wait the seconds in Retry-After. |
500 | Failed to create the batch | Check the dashboard before resending. |
503 | On POST: credits could not be checked (admission_unavailable), no batch created. On GET: results unavailable now (bulk_results_unavailable) | Wait and retry. On GET, do not resend the batch. |
The POST is not idempotent. If the connection drops without a jobId, check the dashboard before resending.
The CPFs and data above are fictional.
Updated on November 23, 2026