Get Sanction structured detail, using the API, through programId

We are planning to review our vendors for sanctions.

I am in charge of making a program going through the list of vendors and returning (possible) sanctions against them in a succinct human friendly report.

As I create my summary, I list the entity description page and sanction pages (such as: https://www.opensanctions.org/programs/NZ-RSA2022/). For the benefit of the reviewer my project manager would like me to list the country issuing the sanction in the report.
While I can read it by following the link (it’s New Zealand for that sanction) I would like to make an API call to get the country (in a structured JSON response).

But here is the problem, I can’t get any sanction detail!
I tried the following URL (without success, and yes I passed my API key while testing)

`https://api.opensanctions.org/entities//NZ-RSA2022/`
`https://api.opensanctions.org/programs/NZ-RSA2022/`

I think I can answer my own question!
I (finally) found the list of sanctions (I think)
It should be there:
data.opensanctions.org/meta/programs.json

I could lookup my sanction by key, and it has a property issuer:territory, or issuer:organisation that has a human friendly name

1 Like

Hi Lloyd!

Yes! That’s exactly the right endpoint to get program information:
https://data.opensanctions.org/meta/programs.json

You can find more details about sanctions programs here: https://www.opensanctions.org/faq/168/programs/

The /entities/{entity_id} endpoint you initially tried is specifically for retrieving information about individual entities (people, companies, vessels, etc.), datasets or programs.

Additionally, if you ever need to query or filter datasets by their metadata (since not all lists are necessarily part of a program). You can find more details here: https://www.opensanctions.org/docs/metadata/

1 Like