API Documentation
Access sanctions data through our free, public API. No API key required.
Base URL
Base URL
https://ammitto.github.io/api/v1Endpoints
GET
/stats.jsonGet overall statistics including entity counts by source.
Example Request
curl https://ammitto.github.io/api/v1/stats.jsonExample Response
{
"exported_at": "2024-01-15T00:00:00Z",
"sources": {
"eu": { "entities": 5860, "entries": 6234 },
"un": { "entities": 877, "entries": 945 },
"us": { "entities": 444, "entries": 512 },
"wb": { "entities": 1370, "entries": 1420 }
},
"totals": { "entities": 8551, "entries": 9111 }
}GET
/sources/{source}.jsonldGet all entities from a specific source in JSON-LD format.
Example Request
curl https://ammitto.github.io/api/v1/sources/eu.jsonldExample Response
{
"@context": "https://schema.org",
"@graph": [
{
"@id": "eu-entity-123",
"@type": "PersonEntity",
"entityType": "person",
"names": [
{ "@type": "Name", "fullName": "John Doe", "isPrimary": true }
],
"sourceReferences": [
{ "@type": "SourceReference", "sourceCode": "eu", "referenceNumber": "EU.123.45" }
]
}
]
}Code Examples
JavaScript
javascript
// Fetch all EU entities
const response = await fetch('https://ammitto.github.io/api/v1/sources/eu.jsonld');
const data = await response.json();
// The graph holds entity AND sanction-entry nodes; entries carry no names
for (const node of data['@graph']) {
if (!node['@id'].includes('/entity/')) continue;
console.log(node.names?.[0]?.fullName);
}Ruby
ruby
require 'net/http'
require 'json'
# Fetch stats
uri = URI('https://ammitto.github.io/api/v1/stats.json')
response = Net::HTTP.get(uri)
stats = JSON.parse(response)
puts "Total entities: #{stats['totals']['entities']}"Python
python
import requests
# Fetch EU entities
response = requests.get('https://ammitto.github.io/api/v1/sources/eu.jsonld')
data = response.json()
# The graph holds entity AND sanction-entry nodes; entries carry no names
for node in data['@graph']:
if '/entity/' not in node['@id']:
continue
for name in node.get('names', [])[:1]:
if name.get('fullName'):
print(name['fullName'])Rate Limits
There are no strict rate limits, but please be respectful of the service. For high-volume access, consider downloading the data files and hosting them locally.