CPFHub.io

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.

Open in Cursor

Without code, the dashboard accepts CSV, TXT or pasted lines. For the CPFHub.io database, use the Batch Lookup.

Two-step flow:

  1. POST /cpf/bulk/realtime sends the list and responds with a jobId.
  2. GET /cpf/bulk/{jobId} returns progress and results. Repeat until status is "done" or "failed".

Endpoint

POSThttps://api.cpfhub.io/cpf/bulk/realtime

Parameters

WhereNameRequiredDescription
Headerx-api-keyYesYour API key. See Authentication.
HeaderContent-TypeYesapplication/json
BodyitemsYesArray of 1 to 10,000 objects.
Bodyitems[].cpfYesCPF, with or without formatting.
Bodyitems[].birthDateYesDate of birth: DD/MM/YYYY or YYYY-MM-DD. It must be the date on record at Receita Federal.
BodyfileNameNoFree label. Returned as file_name.
BodyformatNoFree label. Returned as format.

What happens on submission

  • Items without a valid CPF or valid date of birth are counted in invalid and 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

JSON
{
  "success": true,
  "data": {
    "jobId": "4a1ef25e-052c-4464-9657-4148f53bb0fc",
    "status": "processing",
    "lookupKind": "realtime",
    "totalRecords": 1,
    "invalid": 0
  }
}

Status and results

GEThttps://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.

bash
curl "https://api.cpfhub.io/cpf/bulk/4a1ef25e-052c-4464-9657-4148f53bb0fc" \
  -H "x-api-key: $CPFHUB_API_KEY"

HTTP 200 OK

JSON
{
  "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".

FieldDescription
statusfound, not_found, skipped or pending
foundtrue only when Receita confirmed the CPF and date
errorReason for not_found or skipped
name, nameUpper, birthDate, day, month, yearHolder data. null when not confirmed
genderAlways null: Receita Federal does not provide gender
situationRegistration status, in uppercase. Handle any value
deathYearYear of death or null
registrationDateRegistration date, when available
controlCode, emissionDate, emissionTimeProof issuance data, when available
validationUrl, validationHtmlUrlVerification and proof links, when available. They are personal data: do not expose them

Credits

  • Only found is charged, including irregular, suspended, canceled or deceased-holder status.
  • not_found (nonexistent CPF or mismatched date), skipped and invalid items are not charged.
  • To retry skipped items, send only those CPFs in a new batch.

Errors

StatusWhen it happensWhat to do
400items missing, empty or above 10,000 itemsFix the body.
401API key missing, invalid or inactiveCheck the x-api-key header.
403Insufficient balance (insufficient_credits), overage without a verified account (overage_requires_verified_account), or blocked accountAdd credits, shorten the list or contact support.
404On GET: jobId does not exist or belongs to another API keyCheck the jobId and key.
422No valid lineFix the list.
429Another batch of the account is being created (admission_in_progress) or pending batch limitWait the seconds in Retry-After.
500Failed to create the batchCheck the dashboard before resending.
503On 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