Skip to content

Restricted lists

This endpoint checks whether a person's name appears in one or more restricted lists.

The lookup can also be done by CPF (the Brazilian individual taxpayer number) or CNPJ (the Brazilian company taxpayer number), with the taxId parameter.

Request

GET /restricted-lists/v2?name={name}&list={list}

Parameters

ParameterDescriptionRequired
listList to search (see the options below)Yes
nameName of the person being queried, from 3 to 200 characters — both ends includedYes, if there is no taxId
taxIdCPF or CNPJ of the person being queriedNo

You must inform name or taxId. When both come in the same call, taxId is used and name is ignored.

List options (list):

ValueList
auxilioemergencialEmergency assistance beneficiaries
bacenBrazilian central bank
candidatoseleitoraisElection candidates
ceisRegistration of Disreputable and Suspended Companies (CEIS)
cepimPrevented Private Non-Profit Entities Register (CEPIM)
cnepNational Register of Punished Companies (CNEP)
cvmBrazilian Securities Commission (CVM) register
diariooficialGovernment gazette
europeiasEuropean sanctions
lenienciaLeniency agreements
ofacsdnSDN list of the US Office of Foreign Assets Control (OFAC)
onuUN sanctions
pepPolitically Exposed Persons (PEP) register
todasSearches every available list. See the warning below.
trabalhoescravoSlave labor
ukUnited Kingdom sanctions

The value of list is the same identifier that comes back in data[].list (in v2) and in data.lists (in v1), always in lowercase.

‼️ list=todas queries all sixteen lists and bills for all sixteen

If the todas ("all") option is used, the lookup is performed across every list and the amount billed corresponds to the sum of each individual query. So make sure this is the right option for your scenario.

todas also requires the nextid.bureaus.restrictedLists.allLists permission. A key that only has nextid.bureaus.restrictedLists.oneList queries any individual list normally, but gets 401 when asking for todas.

Lookup by name

The comparison is by substring contained in the name, case-insensitive. Searching for silva returns every record whose name contains silva in any position.

Lookup by taxId

taxId accepts a CPF or a CNPJ, with or without the mask. What decides between the two is the number of characters once the separators are removed: 11 is a CPF, 14 is a CNPJ. Any other length does not raise an error — the lookup simply finds nothing.

Some of the lists publish the CPF masked. That is why a lookup by CPF also searches for the corresponding masked form (***.456.789-** for the CPF 12345678909), and the records found that way come flagged in reconciliation.

Headers

http
Authorization: ApiKey <your-api-key>

Example request

GET /restricted-lists/v2?name=Joao da Silva&list=ofacsdn

bash
curl -i -G 'https://api.nxcd.app/restricted-lists/v2' \
  --header 'Authorization: ApiKey YOUR_API_KEY' \
  --data-urlencode 'name=Joao da Silva' \
  --data-urlencode 'list=ofacsdn'

Lookup by CPF:

bash
curl -i -G 'https://api.nxcd.app/restricted-lists/v2' \
  --header 'Authorization: ApiKey YOUR_API_KEY' \
  --data-urlencode 'taxId=12345678909' \
  --data-urlencode 'list=pep'

Response

The fields below describe the response of v2, the recommended version and the one used in the examples on this page. v1 returns a data in another format — see Versions.

Each item of data is a list + source file pair, with the records found in it.

FieldDescriptionType
idUnique ID of the requestString
versionAPI versionString
dataList of the lookup results, grouped by list and source fileObject[]
data[].listIdentifier of the list, the same one accepted in the list parameterString
data[].fileSource file, in the YYYYMMDD_LIST.csv formatString
data[].foundRecords found in that fileObject[]
data[].found[].nameName as it appears in the listString
data[].found[].taxIdCPF or CNPJ as it appears in the list, possibly maskedString
data[].found[].reconciliationHow the record was matched against the taxId queried. Only appears when there is information.String
data[].found[].candidatesCandidates recorded at the source for that record. Only appears when the source provides them.Object[]
metadataObject with the metadata of the requestObject
metadata.timeSpentRequest time, in millisecondsNumber

‼️ data is a list, not an object

Code written to read data.found gets undefined. And the empty response is [], not { "found": false }.

Calling /restricted-lists without stating the version hands the call over to v1, which has another format. Always inform the version in the URL.

When the lookup is done by taxId and a group contains at least one record whose reconciliation is exact, the remaining records of that group are discarded — only the exact match is left.

🚧 Do not compare reconciliation against a closed list

The confirmed values are exact, for a direct match of the document, and unavailable, for a record whose taxId at the source comes masked and could not be checked. The source may bring other values.

Treat exact as the confirmed match and any other value as a result to be checked, instead of comparing against a closed list.

JSON examples

Here is a JSON example of the response.

Status Code: 200
json
{
  "id": "13cfec7c-b238-4820-a4d1-5173e4c1418e",
  "version": "v2",
  "data": [
    {
      "list": "pep",
      "file": "20210802_PEP.csv",
      "found": [
        {
          "name": "JOAO DA SILVA",
          "taxId": "***.456.789-**",
          "reconciliation": "unavailable"
        }
      ]
    }
  ],
  "metadata": {
    "timeSpent": 10000
  }
}

When nothing is found

data comes back as an empty list.

Status Code: 200
json
{
  "id": "13cfec7c-b238-4820-a4d1-5173e4c1418e",
  "version": "v2",
  "data": [],
  "metadata": {
    "timeSpent": 10000
  }
}

Response headers

HeaderWhen it appears
Nextid-ReqIdOn every response. Carries the request identifier, the same one as the id field of the body.

Errors

CodeWhen it happens
401 UnauthorizedAPI key missing, invalid, without any of the restricted-list permissions, or asking for list=todas without the nextid.bureaus.restrictedLists.allLists permission.
404 Not FoundThe version informed in the URL does not exist. Only v1 and v2 are accepted.
422 Unprocessable Entitylist missing or outside the options, or name shorter than 3 or longer than 200 characters without taxId having been informed.
500 Internal Server ErrorUnexpected failure during processing.

Example of a response with a list outside the options:

Status Code: 422
json
{
  "id": "13cfec7c-b238-4820-a4d1-5173e4c1418e",
  "error": {
    "statusCode": 422,
    "error": "Unprocessable Entity",
    "message": "The \"list\" query param is required and should be one of the following options: auxilioemergencial - bacen - candidatoseleitorais - ceis - cepim - cnep - cvm - diariooficial - europeias - leniencia - ofacsdn - onu - pep - todas - trabalhoescravo - uk"
  }
}

The format of the error responses is described in HTTP response codes.

Versions

VersionStatusWhat changes
v2Recommendeddata is a list, grouped by list and file, with the records found. It says who was found.
v1Availabledata is an object with found, lists and files. It is what answers when the version is omitted from the URL.

v2 is the version described on this page. Always state the version in the call path: /restricted-lists without a version keeps answering as v1, in the old format.

The data of v1

Kept as a record for those already integrated with v1. It says whether there was a result, not who was found: found is just true or false, and lists/files say in which list and in which file there was a result. The names and documents found do not appear in this version.

FieldDescriptionType
dataObject with the result of the lookupObject
data.foundWas the name found in the list searched?Boolean
data.listsIdentifiers of the lists that produced a resultString[]
data.filesSource files of the results, in the YYYYMMDD_LIST.csv formatString[]

The id, version and metadata fields are the same as on v2.

Status Code: 200
json
{
  "id": "13cfec7c-b238-4820-a4d1-5173e4c1418e",
  "version": "v1",
  "data": {
    "found": true,
    "lists": [
      "ofacsdn"
    ],
    "files": [
      "20210802_OFACSDN.csv"
    ]
  },
  "metadata": {
    "timeSpent": 10000
  }
}

When nothing is found, found comes back false and both lists come back empty:

Status Code: 200
json
{
  "id": "13cfec7c-b238-4820-a4d1-5173e4c1418e",
  "version": "v1",
  "data": {
    "found": false,
    "lists": [],
    "files": []
  },
  "metadata": {
    "timeSpent": 10000
  }
}

Nextcode | Identity Verification Solutions