Skip to content
Aggre Docs

Loading…

Console

API reference

Legal data

Statutes, sanctions and exclusion lists, the Taiwan FSC news feed and Taiwan standard-form contracts.

Statutes (statutes guide), government name lists, the FSC news feed and standard-form contracts (regulatory guide). The Taiwan judgments routes are described in the statutes guide.

On this page:

Statutes across the ten statute datasets#

GET /v1/legal/statutes/instruments

Ordered by instrument_id; the list has no provisions and no foreword. meta.restricted / attribution / licenses carry the terms the data comes with. the statutes guide.

Parameters

NameInRequiredTypeDescription
datasetquerynolegal.statutes.tw_moj | legal.statutes.jp_egov | legal.statutes.uk_legislation | legal.statutes.ca_laws | legal.statutes.eu_eurlex | legal.statutes.us_ecfr | legal.statutes.de_gii | legal.statutes.au_federal | legal.statutes.cn_flk | legal.statutes.sg_ssoOne of the ten statute dataset ids.
jurisdictionquerynostring, pattern ^[A-Z]{2}$Two uppercase letters, e.g. TW, EU.
languagequerynostringExact, e.g. zh-Hant, en, ja.
kindquerynoact | regulation | order | treaty | other
statusquerynoin_force | repealed | abandoned | withdrawn
qquerynostringTitle contains this text (case-insensitive, 1-200 characters). A catalogue filter, not full-text search.
updated_sincequerynostringYYYY-MM-DD (00:00 UTC) or RFC 3339; updated_at >= this.
include_removedquerynoboolean, default falsetrue also returns instruments the source stopped listing.
cursorquerynostringThe previous page's next_cursor, unchanged. Opaque; a cursor from another route is 400.
limitquerynointeger, 1–200, default 50

Example

bash
curl -s "https://api.aggre.org/v1/legal/statutes/instruments?limit=3" \
  -H "Authorization: Bearer $AGGRE_API_KEY"

Response 200: StatuteInstrumentsResponse.

FieldTypeRequiredDescription
dataarray of StatuteInstrumentyes
metaMetayesWhere the data came from and how fresh it is. Routes add a few keys of their own (listed); clients must ignore keys they do not know.
next_cursorstring or nullyes

Errors: 400, 401, 403, 429, 503, in the shared envelope (Errors).

One statute with its provisions#

GET /v1/legal/statutes/instruments/{instrument_id}

At most 5000 provisions; longer ones set provisions_truncated and next_from_seq, continue with the provisions route. A removed instrument still answers 200 with removed_on. Takes no query parameters. the statutes guide.

Parameters

NameInRequiredTypeDescription
instrument_idpathyesstringA statute instrument_id such as UK:LEG:ukpga/2020/1 or TW:MOJ:A0000001:en. It can contain / and :; the server accepts them literally or percent-encoded and sees the same id. A path ending /provisions is always the provisions route.

Example

bash
curl -s "https://api.aggre.org/v1/legal/statutes/instruments/<instrument_id>" \
  -H "Authorization: Bearer $AGGRE_API_KEY"

Response 200: StatuteDetailResponse.

FieldTypeRequiredDescription
dataStatuteDetailyesAn instrument with its foreword, provisions (at most 5000 per answer) and attachments.
metaMetayesWhere the data came from and how fresh it is. Routes add a few keys of their own (listed); clients must ignore keys they do not know.
next_cursornullyes

Errors: 400, 401, 403, 404, 429, 503, in the shared envelope (Errors).

The provisions of one statute, paged#

GET /v1/legal/statutes/instruments/{instrument_id}/provisions

the statutes guide. A from_seq past the last provision answers 200 with an empty list.

Parameters

NameInRequiredTypeDescription
instrument_idpathyesstringA statute instrument_id such as UK:LEG:ukpga/2020/1 or TW:MOJ:A0000001:en. It can contain / and :; the server accepts them literally or percent-encoded and sees the same id. A path ending /provisions is always the provisions route.
versionquerynointeger, 1–Read this version of the text (see versions on the instrument). Repeat it on the next page. Not with as_of. 404 when there is no such version.
as_ofquerynostringRead the text Aggre held at this date or RFC 3339 time (encode + as %2B). Not with version. 404 before the history begins.
from_seqquerynointeger, 0–Start at this seq (default 0). Give this or cursor, not both.
cursorquerynostringThe previous page's next_cursor, unchanged. Opaque; a cursor from another route is 400.
numberquerynostringAn article number: the raw text as stored (第 184 條, Article 15-1, matched exactly) or its article key (184, 184-1, 184之1, 第184條之1, Article 184; leading zeros ignored), which matches every provision whose number has the same key. 184 does not match 184-1. The returned number is the raw text. the statutes guide.
limitquerynointeger, 1–1000, default 500

Example

bash
curl -s "https://api.aggre.org/v1/legal/statutes/instruments/<instrument_id>/provisions?limit=3" \
  -H "Authorization: Bearer $AGGRE_API_KEY"

Response 200: StatuteProvisionsResponse.

FieldTypeRequiredDescription
dataarray of StatuteProvisionyes
metaMetayesWhere the data came from and how fresh it is. Routes add a few keys of their own (listed); clients must ignore keys they do not know.
next_cursorstring or nullyes
next_from_seqinteger or nullnoseq of the next page's first provision; set together with next_cursor.

Errors: 400, 401, 403, 404, 429, 503, in the shared envelope (Errors).

Entries of a sanctions or exclusion list#

GET /v1/legal/regulatory/entries

Served as published. the regulatory guide; meta.message carries the terms status.

Parameters

NameInRequiredTypeDescription
datasetqueryyeslegal.regulatory.ofac_sdn | legal.regulatory.un_sanctions | legal.regulatory.us_exclusionsThe name list.
qquerynostringName search on the normalized name key (letters and digits).
matchquerynoprefix | exact (default prefix)Only with q.
kindquerynoperson | entity | vessel | aircraft | other
listed_fromquerynostring, dateYYYY-MM-DD on listed_on.
removedquerynoexclude | include | only (default exclude)Entries the publisher removed: left out (default), included, or only those.
cursorquerynostringThe previous page's next_cursor, unchanged. Opaque; a cursor from another route is 400.
limitquerynointeger, 1–1000, default 100

Example

bash
curl -s "https://api.aggre.org/v1/legal/regulatory/entries?dataset=legal.regulatory.ofac_sdn&limit=3" \
  -H "Authorization: Bearer $AGGRE_API_KEY"

Response 200: the envelope { "data": [...], "meta": {...}, "next_cursor": ... } (see Response format); each row of data follows the schema legal_regulatory_entry.

Errors: 400, 401, 403, 429, 503, in the shared envelope (Errors).

One entry of a sanctions or exclusion list#

GET /v1/legal/regulatory/entry

An entry the publisher removed is still found: it carries removed_on.

Parameters

NameInRequiredTypeDescription
datasetqueryyeslegal.regulatory.ofac_sdn | legal.regulatory.un_sanctions | legal.regulatory.us_exclusionsThe name list.
entry_idqueryyesstringThe entry id as published (1-256 bytes, no control characters).

Example

bash
curl -s "https://api.aggre.org/v1/legal/regulatory/entry?dataset=legal.regulatory.ofac_sdn&entry_id=<entry_id>" \
  -H "Authorization: Bearer $AGGRE_API_KEY"

Response 200: the envelope { "data": [...], "meta": {...}, "next_cursor": ... } (see Response format); each row of data follows the schema legal_regulatory_entry.

Errors: 400, 401, 403, 404, 429, 503, in the shared envelope (Errors).

Taiwan FSC news (five RSS feeds)#

GET /v1/legal/regulatory/fsc_news

Items of the Financial Supervisory Commission's five official RSS feeds (press releases, penalty cases, announcements, draft-regulation notices, law interpretations), newest first (undated last), then category, then guid. Titles, links and publication days as published; the plain-text description only with include=text (then limit is at most 100). Not the articles behind the links; items that left a feed are kept; no search in V0. meta.dataset carries the item count and the per-category counts, meta.dataDate the newest publication day, meta.lastReadAt our newest successful run; meta.message says "Terms not read" while nobody has read the FSC's terms. the regulatory guide.

Parameters

NameInRequiredTypeDescription
categoryquerynonews | penalty | announcement | draft_law | law_interp
published_fromquerynostring, dateYYYY-MM-DD on published_on, inclusive; an undated item matches neither bound.
published_toquerynostring, dateYYYY-MM-DD on published_on, inclusive.
includequerynotexttext adds the plain-text description.
cursorquerynostringThe previous page's next_cursor, unchanged. Opaque; a cursor from another route is 400.
limitquerynointeger, 1–200, default 50At most 100 with include=text.

Example

bash
curl -s "https://api.aggre.org/v1/legal/regulatory/fsc_news?limit=3" \
  -H "Authorization: Bearer $AGGRE_API_KEY"

Response 200: the envelope { "data": [...], "meta": {...}, "next_cursor": ... } (see Response format); each row of data follows the schema legal_fsc_news_item.

Errors: 400, 401, 403, 429, 503, in the shared envelope (Errors).

Taiwan standard-form contracts (定型化契約), without text#

GET /v1/legal/contracts/tw_standard_forms

Model contracts (範本) and the terms a contract must and must not contain (應記載及不得記載事項), as the worker read them from the Executive Yuan's lists, ordered by form_id. No text and no attachments here: the single-form route has them. q is a literal, case-insensitive title substring. issuer is null on a form whose page named no ministry and matches exactly as stored. A form the publisher stopped listing is left out unless include_removed=true (it carries removed_on). 503 terms_unread until a person has read the publisher's terms. the regulatory guide.

Parameters

NameInRequiredTypeDescription
kindquerynotemplate | required_termstemplate = 範本, required_terms = 應記載及不得記載事項.
qquerynostringTitle contains this text (1-200 characters).
issuerquerynostringExactly the stored issuer (1-200 characters).
published_fromquerynostring, dateYYYY-MM-DD, inclusive, on published_on.
published_toquerynostring, dateYYYY-MM-DD, inclusive. Not before published_from.
updated_sincequerynostringRows changed at or after this moment (YYYY-MM-DD or an RFC 3339 timestamp), by our updated_at. With cursor this is a change feed.
include_removedquerynoboolean, default falseAlso forms the publisher stopped listing.
cursorquerynostringThe previous page's next_cursor, unchanged. Opaque; a cursor from another route is 400.
limitquerynointeger, 1–200, default 50Rows per page.

Example

bash
curl -s "https://api.aggre.org/v1/legal/contracts/tw_standard_forms?limit=3" \
  -H "Authorization: Bearer $AGGRE_API_KEY"

Response 200: the envelope { "data": [...], "meta": {...}, "next_cursor": ... } (see Response format); each row of data follows the schema legal_contract_form.

Errors: 400, 401, 403, 429, 503, in the shared envelope (Errors).

One standard form with its versions and the text of its files#

GET /v1/legal/contracts/tw_standard_forms/{form_id}

The form, every version (oldest first) and the files of one version with the text extracted from each. version picks an older version (default the current one); text=false leaves the text out. The text is machine-extracted and may contain errors, and a scanned file has none (text_status): file_url is the authoritative document. A removed form is still found (removed_on). 404 for an unknown form or version, 400 for an id that is not a GUID, 503 terms_unread until a person has read the publisher's terms.

Parameters

NameInRequiredTypeDescription
form_idpathyesstring, pattern ^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}$The GUID of a standard form as listed by the collection route (36 characters; upper or lower case).
versionquerynointeger, 1–A version number from versions (default the current one).
textquerynoboolean, default truefalse leaves the attachments' text out (default true).

Example

bash
curl -s "https://api.aggre.org/v1/legal/contracts/tw_standard_forms/<form_id>" \
  -H "Authorization: Bearer $AGGRE_API_KEY"

Response 200: the envelope { "data": [...], "meta": {...}, "next_cursor": ... } (see Response format); each row of data follows the schema legal_contract_form.

Errors: 400, 401, 403, 404, 429, 503, in the shared envelope (Errors).

Generated from contracts/data.openapi.yaml when the site is built, so it matches the API contract.