Data API
Read-only JSON for researchers and developers. No key is required.
| Endpoint | Returns |
|---|---|
GET /api/entries | All published entries as summaries. Filters: type, status, effect, level, jurisdiction, topic, importance, from, to, q, sort. Paging: add limit (1 to 200) and offset; the response then includes limit, offset and next (the URL of the following page, or null). Without limit the full list is returned (about 130 KB for 78 entries, growing roughly 1.7 KB per entry). |
GET /api/entries/{slug} | One entry in full: sections, key points, timeline, sources, legal effect. |
GET /api/search?q= | Ranked full-text search, up to 50 results. Each result has snippet (HTML) and snippetText (plain text). In snippet, all entry text is HTML-escaped and the only markup is <mark> around matched words, so it is safe to insert as HTML; if your client cannot render HTML, use snippetText. |
GET /api/stats | Counts by type, status, topic and jurisdiction. |
GET /feed.xml | RSS feed of recently updated entries. |
Example
GET https://aiobservatory.pacta.in/api/entries?type=case&effect=binding
{ "count": 12,
"entries": [ { "slug": "…", "title": "…", "type": "case", "status": "Decided",
"statusGroup": "resolved", "legalEffect": "binding", "jurisdiction": "IN-DL",
"authority": "High Court of Delhi", "date": "2023-09-20", "topics": ["…"],
"updatedAt": "2026-10-15T…" } ] }
Fields and behaviour
- Dates are
YYYY,YYYY-MMorYYYY-MM-DD.updatedAtis an ISO 8601 timestamp. type: act, bill, regulation, case, decision, guidance, report, initiative, overview.legalEffect: binding, non-binding, interim, none.- Errors return a JSON body such as
{"error":"not_found"}with HTTP 404, or{"error":"server_error"}with 500. - Responses are cached for up to a minute, so edits appear shortly after they are made. This is version 1; any breaking change will be published at a new path.