SanctionsSearch API Documentation
We provide REST APIs, so the process of checking for sanctioned individuals, organisations and vessels can be automated.
Authentication
POST /api/token/
Obtain access and refresh tokens.
Request Body
{
"username": "your_email",
"password": "your_password"
}
Response
{
"access": "access_token",
"refresh": "refresh_token"
}
Python Example
import requests
url = "https://www.sanctionssearch-web.com/api/token/"
payload = {
"username": "your_email",
"password": "your_password"
}
response = requests.post(url, json=payload)
print(response.status_code)
print(response.json())
POST /api/token/refresh/
Refresh access token.
Request Body
{
"refresh": "your_refresh_token"
}
Python Example
import requests
url = "https://www.sanctionssearch-web.com/api/token/refresh/"
payload = {
"refresh": "your_refresh_token"
}
response = requests.post(url, json=payload)
print(response.status_code)
print(response.json())
Sanctions lists and search
GET /api/sanctions_lists/
Returns currently available sanctions lists. No parameters and no authorization are required to call this API.
Python Example
import requests
url = "https://www.sanctionssearch-web.com/api/sanctions_lists/"
response = requests.get(url)
print(response.status_code)
print(response.json())
POST /api/search/
Search in sanctions lists.
Request Body Parameters:
"algorithm" - can be
"algorithm1" or
"algorithm2".
If not specified, default value is "algorithm2". This parameter specifies the search algorithm.
Value "algorithm1" means entire phrase match,
and it will find entity only in case if there is an exact match of the entire search phrase. For example if your
search phrase is 'shipping company noble', and the company name is 'noble shipping company limited' it will not find it.
It will look for the entities with those exact words in the name ('shipping company noble'). In case if company name is
'shipping company noble limited' it will find it because 'shipping company noble' in the name.
Value "algorithm2" means all words found, and it will find
entity in case if all words in the search phrase will be found and the order of the words does not matter. For example
if your search phrase is 'shipping company noble' and the company name is 'trust noble shipping company limited' it will find it
because all search phrase words are in the name.
"list_id_commaseparated" - comma separated list of
search list id's where to search. The search list id's can be obtained from /api/sanctions_lists/ API endpoint.
"search_str" - search prase, case insensitive. It can be
entity name or person name(or part of it), id number, vessel imo or vessel call sign. Search phrase examples:
'petrochemicals';
'proton petrochemicals shipping limited';
'shipping';
'7406784';
'cl2059'
Headers
{
"X-Authorization": "Bearer your_access_token"
}
Request Body
{
"algorithm": "algorithm2",
"list_id_commaseparated": "1,2,3,4",
"search_str": "samma shipping"
}
Python Example
import requests
url = "https://www.sanctionssearch-web.com/api/search/"
headers = {
"X-Authorization": "Bearer your_access_token"
}
payload = {
"algorithm": "algorithm2",
"list_id_commaseparated": "1,2,3,4",
"search_str": "samma shipping"
}
response = requests.post(url, json=payload, headers=headers)
print(response.status_code)
print(response.json())
GET /api/entity/<entity_id>/
Retrieve detailed information about a specific entity.
Path Parameter: "entity_id" - can be obtained from /api/search/ API endpoint.
Headers
{
"X-Authorization": "Bearer your_access_token"
}
Path Parameter
entity_id: integer
Python Example
import requests
entity_id = 123
url = f"https://www.sanctionssearch-web.com/api/entity/{entity_id}/"
headers = {
"X-Authorization": "Bearer your_access_token"
}
response = requests.get(url, headers=headers)
print(response.status_code)
print(response.json())
- All endpoints expect JSON.
- Authentication is required for protected endpoints.
- Use
X-Authorizationheader for authenticated requests with Bearer before your token.