Skip to main content

Indonesian Law API — Free REST API for Legal Data

Free REST API for Indonesian law search, regulation metadata, and full law detail. Requires a free personal access token. Contact us for higher-volume access.

Base URL

https://pasal.id/api/v1

Authentication

All `/api/v1/*` requests require a personal access token. Create a free account, generate a token, and include it in your requests as shown below.

Example: include your token in the request

curl -H "Authorization: Bearer pasal_mcp_abc123_your_secret_here" \
  "https://pasal.id/api/v1/search?q=ketenagakerjaan"

Get your free token on the Account page.

Requests without a valid token will be rejected with a 401 error.

Endpoints

GET/api/v1/laws

List regulations with type, year, and status filters. Supports pagination.

Parameters

typeFilter by regulation type (see codes below)
yearFilter by year (e.g., 2023)
statusFilter by status: berlaku, dicabut, or diubah
limitNumber of results (default: 20, max: 50)
offsetOffset for pagination (default: 0)

Example request

curl -H "Authorization: Bearer YOUR_TOKEN" \
  "https://pasal.id/api/v1/laws?type=UU&year=2003&limit=2"

Example response

{
  "total": 5,
  "limit": 2,
  "offset": 0,
  "laws": [
    {
      "id": 1,
      "frbr_uri": "/akn/id/act/uu/2003/13",
      "title": "Ketenagakerjaan",
      "number": "13",
      "year": 2003,
      "status": "berlaku",
      "content_verified": true,
      "type": "UU"
    },
    {
      "id": 7,
      "frbr_uri": "/akn/id/act/uu/2003/17",
      "title": "Keuangan Negara",
      "number": "17",
      "year": 2003,
      "status": "berlaku",
      "content_verified": true,
      "type": "UU"
    }
  ]
}

GET/api/v1/laws/{frbr_uri}

Full metadata, relationship graph, and parsed articles for a regulation. Requires authentication.

Requires a personal access token and returns the complete article tree, metadata, and cross-references for the specified regulation.

Parameters

frbr_urirequiredFRBR URI path, e.g., akn/id/act/uu/2003/13

Example request

curl -H "Authorization: Bearer YOUR_TOKEN" \
  "https://pasal.id/api/v1/laws/akn/id/act/uu/2003/13"

Example response

{
  "work": {
    "id": 1,
    "frbr_uri": "/akn/id/act/uu/2003/13",
    "title": "Ketenagakerjaan",
    "number": "13",
    "year": 2003,
    "status": "berlaku",
    "content_verified": true,
    "type": "UU",
    "type_name": "Undang-Undang"
  },
  "articles": [
    {
      "id": 10,
      "type": "bab",
      "number": "I",
      "heading": "KETENTUAN UMUM",
      "content": null,
      "parent_id": null,
      "sort_order": 1
    }
  ],
  "detail_access": {
    "level": "full",
    "articles_included": true,
    "access_via": "api_key",
    "full_detail_available_via": ["api_key"]
  },
  "relationships": [
    {
      "type": "Mengubah",
      "type_en": "Amends",
      "related_work": {
        "frbr_uri": "/akn/id/act/uu/1969/14",
        "title": "Ketentuan-Ketentuan Pokok Mengenai Tenaga Kerja",
        "number": "14",
        "year": 1969,
        "status": "dicabut"
      }
    }
  ]
}

Regulation Type Codes

Use the following codes for the type parameter in /search and /laws endpoints. Not case-sensitive.

CodeName
UUDConstitution
TAP_MPRPeople's Assembly Decree
UULaw
PERPPUGovernment Regulation in Lieu of Law
KUHPERDATACivil Code (Burgerlijk Wetboek)
PPGovernment Regulation
PERPRESPresidential Regulation
KEPPRESPresidential Decree
INPRESPresidential Instruction
PENPRESPresidential Determination
PERMENMinisterial Regulation
PERMENKUMHAMMinister of Law and Human Rights Regulation
PERMENKUMMinister of Law Regulation
PERBANAgency/Institution Regulation
PERDARegional Regulation
PERDA_PROVProvincial Regulation
PERDA_KABDistrict/City Regulation
KEPMENMinisterial Decree
SECircular Letter
PERMASupreme Court Regulation
PBIBank Indonesia Regulation
UUDRTEmergency Law
UUDSProvisional Constitution
PMKConstitutional Court Regulation
PUTUSAN_MKConstitutional Court Decision
PERKETUA_MKChief Justice of Constitutional Court Regulation
PERSEKJEN_MKMK Secretary General Regulation
POJKFinancial Services Authority Regulation
PERGUBGovernor Regulation
PERBUPRegent Regulation
PERWALIMayor Regulation
QANUNQanun (Aceh Regulation)
PERDASUSPapua Special Regional Regulation
PERDAISSpecial Region Regulation

Status Values

Use with the status parameter in the /laws endpoint.

ValueDescription
berlakuRegulation is currently in force
dicabutRegulation has been revoked
diubahRegulation has been amended

Quick Start

Search regulations about employment

curl -H "Authorization: Bearer YOUR_TOKEN" \
  "https://pasal.id/api/v1/search?q=ketenagakerjaan"

List all Government Regulations from 2020

curl -H "Authorization: Bearer YOUR_TOKEN" \
  "https://pasal.id/api/v1/laws?type=PP&year=2020"

Public metadata for Law 13/2003 (Employment)

curl -H "Authorization: Bearer YOUR_TOKEN" \
  "https://pasal.id/api/v1/laws/akn/id/act/uu/2003/13"

Use in JavaScript / TypeScript

const TOKEN = "pasal_mcp_…"; // Your token from pasal.id/akun

const res = await fetch("https://pasal.id/api/v1/search?q=upah+minimum", {
  headers: { "Authorization": `Bearer ${TOKEN}` },
});
const data = await res.json();

for (const result of data.results) {
  console.log(result.work.title, "-", result.metadata.node_type, result.metadata.node_number);
  console.log(result.snippet);
}

Use in Python

import requests

TOKEN = "pasal_mcp_…"  # Your token from pasal.id/akun

res = requests.get(
    "https://pasal.id/api/v1/laws",
    params={"type": "UU", "limit": 5},
    headers={"Authorization": f"Bearer {TOKEN}"},
)
data = res.json()

for law in data["laws"]:
    print(f"{law['type']} {law['number']}/{law['year']} - {law['title']}")

Error Responses

CodeDescription
400Invalid or missing parameters
401Invalid or missing authentication token
404Regulation not found
429Too many requests

Rate Limiting

All documented `/api/v1/*` endpoints require a personal access token, and each route has its own throttles to discourage bulk extraction.

Token-authenticated

GET /api/v1/search60/60s · 360/1h
GET /api/v1/laws180/60s · 900/1h
GET /api/v1/laws/{frbr_uri}60/60s · 360/1h
GET /api/v1/laws/{frbr_uri} articlesRequired — full articles included
CORSpasal.id + configured allowlist

Requests exceeding the limit will receive a 429 Too Many Requests response.

Need higher limits?

If you're building an application that needs more access, we're happy to help. Contact us to discuss your needs, including custom API keys and higher limits.

Contact us

For AI integration, use our MCP Server, direct access from Codex, Claude, and other clients without writing code.

Indonesian Law API — Free REST API for Legal Data | Pasal.id