Quickstart
Get an API key, run your first sanctions search, read the response, then run your first match call in curl, JavaScript or Python.
This page takes you from no key to a scored match. It needs about five minutes.
Get a key
- Open the developer console at
/developerin the LinkinLegal app. - Buy the Sanctions API on the Billing page. The price is shown before you pay.
- Go to Keys and create a key.
The full key is shown once, at creation. Copy it now. We store a hash only, so we cannot show it again. If you lose it, revoke the key and create a new one.
A key looks like this:
lil_sk_0123456789abcdefghijklmnopqrstuvwxyzABCDEFGRead Authentication for the key rules and Plans and billing for who can buy.
Put the key in your environment
Every sample below reads the key from the environment variable LINKINLEGAL_API_KEY. Never put the key in your source code.
export LINKINLEGAL_API_KEY="lil_sk_..."Make your first call
This call searches for the text Gulina and asks for two results.
curl -s -G "https://api.linkinlegal.com/v1/sanctions/search" \
-H "Authorization: Bearer $LINKINLEGAL_API_KEY" \
--data-urlencode "query=Gulina" \
--data-urlencode "per_page=2"Read the response
{
"results": [
{
"id": "es-mc-85d50463dadae4256272c2014ee57ba9ce55b92e",
"caption": "LOURDES GULINA CANEDA",
"schema": "Person",
"datasets": ["es_mayors_councillors", "ann_pep_positions"],
"last_change": "2025-11-05T14:35:45",
"properties": {
"country": ["es"],
"name": ["LOURDES GULINA CANEDA"]
}
}
],
"total": 4,
"page": 1,
"per_page": 2,
"total_pages": 2
}resultsholds one object per record.idis stable: store it.captionis the display name of the record.propertiesis a map. Every value is an array of strings, also when there is one value.totalcounts every record that fits the query, not only this page.
Ask for the next page with page=2. Read Search for every parameter.
Screen a subject with match
search needs the text to be inside the caption. match does not. It compares your subject against every name and alias, it takes the birth date, the country and the identifiers into account, and it gives back a score.
The subject below has a typo in the surname on purpose.
curl -s -X POST "https://api.linkinlegal.com/v1/sanctions/match" \
-H "Authorization: Bearer $LINKINLEGAL_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"schema": "Person",
"properties": {
"name": ["Vladimir Puttin"],
"birthDate": ["1952-10-07"],
"citizenship": ["ru"]
},
"limit": 2
}'The answer:
{
"results": [
{
"id": "Q7747",
"caption": "Vladimir Putin",
"schema": "Person",
"score": 1,
"match": true,
"features": {
"name": 0.9806,
"birthDate": 0.1,
"country": 0.05,
"identifier": null,
"gender": null
},
"datasets": ["eu_fsf", "us_ofac_sdn", "gb_fcdo_sanctions"],
"target": true,
"properties": {
"name": ["Vladimir Vladimirovich Putin"],
"birthDate": ["1952-10-07"],
"country": ["ru"]
}
}
]
}match is true because score is at or above the threshold, and the threshold is 0.8 by default. features shows how the score was built: the name alone scored 0.9806, the same birth date added 0.10 and the same country added 0.05.
Next
Last updated on