Consultar Identidade
curl --request POST \
--url https://api.nlbs.ai/dados/consultar \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"datasets": [
"identidade"
],
"documento": "52998224725"
}
'import requests
url = "https://api.nlbs.ai/dados/consultar"
payload = {
"datasets": ["identidade"],
"documento": "52998224725"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({datasets: ['identidade'], documento: '52998224725'})
};
fetch('https://api.nlbs.ai/dados/consultar', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.nlbs.ai/dados/consultar",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'datasets' => [
'identidade'
],
'documento' => '52998224725'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.nlbs.ai/dados/consultar"
payload := strings.NewReader("{\n \"datasets\": [\n \"identidade\"\n ],\n \"documento\": \"52998224725\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.nlbs.ai/dados/consultar")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"datasets\": [\n \"identidade\"\n ],\n \"documento\": \"52998224725\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nlbs.ai/dados/consultar")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"datasets\": [\n \"identidade\"\n ],\n \"documento\": \"52998224725\"\n}"
response = http.request(request)
puts response.read_body{
"consultado_em": "2026-01-15T12:00:00Z",
"datasets": {
"identidade": {
"encontrado": true,
"itens": [
{
"cpf": "52998224725",
"data_nascimento": "1980-03-15",
"data_obito": null,
"emails": [
"fulana@exemplo.com"
],
"endereco": {
"cep": "01001000",
"completo": "Praca da Se, 1, Se, Sao Paulo, SP",
"municipio": "Sao Paulo",
"uf": "SP"
},
"escolaridade": "higher_education",
"estado_civil": "married",
"nome": "Fulana de Tal",
"nome_mae": "Mae Exemplo",
"nome_pai": "Pai Exemplo",
"situacao_cadastral": "regular",
"telefones": [
"11999990000"
]
}
]
}
},
"documento": "52998224725",
"encontrado": true,
"tipo": "cpf"
}Datasets
Identidade
Dados cadastrais da pessoa física. Só CPF.
POST
/
dados
/
consultar
Consultar Identidade
curl --request POST \
--url https://api.nlbs.ai/dados/consultar \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"datasets": [
"identidade"
],
"documento": "52998224725"
}
'import requests
url = "https://api.nlbs.ai/dados/consultar"
payload = {
"datasets": ["identidade"],
"documento": "52998224725"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({datasets: ['identidade'], documento: '52998224725'})
};
fetch('https://api.nlbs.ai/dados/consultar', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.nlbs.ai/dados/consultar",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'datasets' => [
'identidade'
],
'documento' => '52998224725'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.nlbs.ai/dados/consultar"
payload := strings.NewReader("{\n \"datasets\": [\n \"identidade\"\n ],\n \"documento\": \"52998224725\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.nlbs.ai/dados/consultar")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"datasets\": [\n \"identidade\"\n ],\n \"documento\": \"52998224725\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nlbs.ai/dados/consultar")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"datasets\": [\n \"identidade\"\n ],\n \"documento\": \"52998224725\"\n}"
response = http.request(request)
puts response.read_body{
"consultado_em": "2026-01-15T12:00:00Z",
"datasets": {
"identidade": {
"encontrado": true,
"itens": [
{
"cpf": "52998224725",
"data_nascimento": "1980-03-15",
"data_obito": null,
"emails": [
"fulana@exemplo.com"
],
"endereco": {
"cep": "01001000",
"completo": "Praca da Se, 1, Se, Sao Paulo, SP",
"municipio": "Sao Paulo",
"uf": "SP"
},
"escolaridade": "higher_education",
"estado_civil": "married",
"nome": "Fulana de Tal",
"nome_mae": "Mae Exemplo",
"nome_pai": "Pai Exemplo",
"situacao_cadastral": "regular",
"telefones": [
"11999990000"
]
}
]
}
},
"documento": "52998224725",
"encontrado": true,
"tipo": "cpf"
}Dados cadastrais da pessoa física consultada. Retorna um item com nome, filiação, contatos, endereço principal, nascimento e situação do CPF; raça e cor nunca vêm. Só existe para CPF: com CNPJ responde
422 (identidade_exige_cpf). A chave precisa do escopo dados:identidade.Headers
Body
application/json
Response
Um bloco por dataset pedido.

