CPF lookup
POST/v1/cpf
Looks up a CPF together with its date of birth. The response may reflect a lookup made up to 30 days ago against the official source.
Request body
- cpfstringrequired
- CPF with 11 digits, with or without punctuation.
- birthdatestringrequired
- Holder’s date of birth, as
YYYY-MM-DD. If it does not match the official source, the answer is 404.
Only a 200 response charges 1 credit.
- Checks run in this order: CPF and date format (400), check digits (422), balance (402) and, finally, the lookup (official source).
- When the official source is unavailable the answer is 503 and nothing is charged.
cURL
1curl -X POST https://api.brazid.com/v1/cpf \2 -H "x-api-key: $BRAZID_API_KEY" \3 -H "Content-Type: application/json" \4 -d '{"cpf":"529.982.247-25","birthdate":"1982-11-26"}'
1const res = await fetch('https://api.brazid.com/v1/cpf', {2 method: 'POST',3 headers: {4 'x-api-key': process.env.BRAZID_API_KEY,5 'Content-Type': 'application/json',6 },7 body: JSON.stringify({8 "cpf": "529.982.247-25",9 "birthdate": "1982-11-26"10 }),11});12 13const data = await res.json();14console.log(res.status, data);
1import os2import requests3 4res = requests.post(5 "https://api.brazid.com/v1/cpf",6 headers={"x-api-key": os.environ["BRAZID_API_KEY"]},7 json={8 "cpf": "529.982.247-25",9 "birthdate": "1982-11-26"10 },11)12 13print(res.status_code, res.json())
1$ch = curl_init("https://api.brazid.com/v1/cpf");2curl_setopt_array($ch, [3 CURLOPT_RETURNTRANSFER => true,4 CURLOPT_CUSTOMREQUEST => "POST",5 CURLOPT_HTTPHEADER => [6 "x-api-key: " . getenv("BRAZID_API_KEY"),7 "Content-Type: application/json",8 ],9 CURLOPT_POSTFIELDS => '{"cpf":"529.982.247-25","birthdate":"1982-11-26"}',10]);11 12$data = json_decode(curl_exec($ch), true);13$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
200 OK
1{2 "success": true,3 "data": {4 "cpf": "52998224725",5 "name": "MARIA SOUZA LIMA",6 "birthdate": "26/11/1982",7 "day": 26,8 "month": 11,9 "year": 1982,10 "situation": "REGULAR",11 "social_name": null,12 "registration_date": "12/03/2004"13 },14 "credits_remaining": 1915}
404 Not Found
1{2 "error": "CPF not found"3}