Skip to content
Aggre

Legal data

Statutes with their terms attached

Aggre reads laws and regulations from official publishers and serves the current text with the metadata you need to cite it and to know what you may do with it. This page says what that does and does not cover.

What a record is

A record is one law, order or treaty in one language, identified by an instrument_id such as TW:MOJ:A0000001:en or UK:LEG:ukpga/2020/1. It carries the title, the kind and status (in_force, repealed, abandoned, withdrawn), promulgation, effective and last-modified dates where the source gives them, the official URL, the provisions in the source's order, and any attachments the source lists. The article text is the publisher's, unchanged.

  • Current version only. When a law is amended, the earlier text is replaced, not kept. If the source drops a law altogether, the record stays, marked with removed_on, and shows the last text seen.
  • Official sources only. Collection goes through publishers' APIs, bulk files and open data. It does not scrape ordinary web pages or work around anti-bot measures, which is why some jurisdictions are missing (below).
  • Lookup, not search. You can filter by jurisdiction, language, kind, status, title substring and update time. There is no full-text or semantic search yet.
  • No claim of completeness. A sync that did not finish is reported as such and never marks a law as removed. Read meta.status and the dataset page before assuming a source is fully covered.

Licensing and attribution

Terms differ by source, and Aggre does not relicense the text. Every record carries three fields so that the terms travel with the data:

FieldMeaning
licenseThe licence or terms reference we hold for the source.
attributionThe attribution text the source asks for, when it asks for one.
restrictedtrue when the source's terms limit use. Restricted data is served only with its attribution and must be treated according to those terms.

List and provision responses also summarise these in meta.licenses, meta.attribution and meta.restricted (de-duplicated across the rows returned), so you can attribute from the response envelope without walking every row.

Shape of the licensing part of a statute response
{
  "data": [ { "instrument_id": "…", "license": "<string|null>", "attribution": "<string|null>", "restricted": false, … } ],
  "meta": { "restricted": false, "attribution": ["<text>", …], "licenses": ["<text>", …], … },
  "next_cursor": "<opaque|null>"
}

Treat these fields as a pointer, not as legal advice. The licence and attribution strings are being checked against each source's published terms, one source at a time. Until a source's terms have been checked, the string may be incomplete: read the source's own terms (the record's url leads to it) before you republish, sell or build a public product on its text. Aggre makes no grant of rights beyond those terms.

Restricted and unavailable sources

  • Singapore (legal.statutes.sg_sso): Not collected live: that would mean scraping a site that blocks automated access. Waiting for an official API or authorization. Where Singapore text is ever served it is marked restricted, carries the required attribution, and must be checked against the latest version at the source.
  • China (legal.statutes.cn_flk): Not collected: the only access found is the site's internal endpoints, and its terms of use have not been reviewed. Waiting for an official API or authorization.

Court judgments and gazettes are not part of the statute datasets and are not offered. Sanctions and exclusion lists have their own datasets, which are empty so far; see the datasets page.

Reading it

List English-language Taiwan laws, then read one
curl -H "Authorization: Bearer $AGGRE_API_KEY" \
  "https://api.aggre.org/v1/legal/statutes/instruments?dataset=legal.statutes.tw_moj&language=en&kind=act&limit=5"

curl -H "Authorization: Bearer $AGGRE_API_KEY" \
  "https://api.aggre.org/v1/legal/statutes/instruments/TW:MOJ:A0000001:en"

Parameters, paging and error codes are in the statute API reference. The list of what is rolling out and what is not is on the datasets page.