Skip to the content
Global Data RulesData governance rules, country by country

The JSON API

Everything on this site is available as read-only JSON — JavaScript Object Notation, the format most software speaks. No key, no sign-up.

Endpoints

Available API endpoints
RequestWhat you get
GET /api/vocabularyEvery code, with its plain-English label and definition.
GET /api/countriesAll countries with their three headline ratings.
GET /api/countries/INOne country in full: answers, rules, gaps, provenance.
GET /api/countries/IN/rulesJust the rules for one country.
GET /api/rules?residency=dg:res:closedEvery rule, anywhere, where the data may not leave.
GET /api/rules?sector=dg:sector:healthEvery health and social care rule.
GET /api/rules?obligation=dg:ob:localiseEvery rule that forces in-country storage.
GET /api/compare?jur=IN,DETwo or three countries, one row per question.
POST /api/countries/IN/refreshRe-check one country against its sources and return a diff.

Copy and paste

curl https://{your-host}/api/countries
curl -H 'Accept: application/vnd.dgn.v1+json' \
  https://{your-host}/api/countries/IN
curl 'https://{your-host}/api/rules?sector=dg:sector:finance'
curl -X POST https://{your-host}/api/countries/IN/refresh

Three conventions

  1. Industry filters match children. Asking for ?sector=dg:sector:finance returns payments, banking, insurance and securities rules too.
  2. Every response carries a date and a confidence value. Look for last_verified and confidence. The confidence on a list is the weakest confidence inside it, never the strongest.
  3. Versioning is by Accept header. Send Accept: application/vnd.dgn.v1+json. Send nothing and you get version 1. Ask for a version we do not serve and you get a 406 response, not a wrong answer.

Codes and labels

Codes such as dg:res:closed are stable identifiers for machines. Resolve them into human labels through /api/vocabulary, which also carries a one-sentence definition for each. Never show a raw code to a person.

Every response repeats this line: This is a map, not legal advice. It tells you which questions to ask. It cannot tell you whether your specific setup is lawful — for that you need a qualified adviser looking at your actual data flows.