Screen a government-issued ID with fuzzy matching
Updated
The GET /screen/id/{government_id} endpoint screens passports, tax IDs, national IDs, registration numbers, and similar government-issued identifiers against every enabled sanctions list. Because identifiers on sanctions lists are sometimes recorded with inconsistent formatting or partial values, the endpoint uses a combination of exact matching and substring matching, with results ranked by trigram similarity. This means a query like RC 1555604 can surface a partial match against a listed value with a similar sequence of characters — but the endpoint does not correct spelling errors or transpositions the way a phonetic matcher would.
How to screen a government ID
- Obtain your API token from the Tokens page.
- Send a GET request with the identifier in the path:
GET https://api.compliapi.com/api/v1/screen/id/{government_id}
- Include your token as a bearer header:
Authorization: Bearer capi_...
- Check
sanctionedandflaggedin the response. - Inspect
matches— each hit includes amatchfield that is eitherexact(the query matched the listed value directly) orpartial(a substring or trigram-similarity match).
Understanding exact vs. partial matches
exact— the submitted ID and the listed value are identical (case-insensitive).partial— the submitted ID is a substring of the listed value, or the trigram similarity score was high enough to surface it as a near-match.
Partial matches are useful for catching truncated or reformatted identifiers, but they warrant additional review before taking action. Factor in the similarity score and the listed party's other details when deciding how to respond.
Filtering by list and monitoring notes
Use ?lists= with comma-separated slugs from GET /screen/lists to limit which lists are checked:
GET /api/v1/screen/id/AB1234567?lists=ofac,eu_fsf
Note that if you add a government ID as a monitored entity on the Webhooks page, monitoring uses exact matching only — it does not apply the partial/trigram matching that the screening endpoint uses. Each metered screening request costs one credit regardless of the number of matches returned.