# Taiwan Laws & Regulations (全國法規) — Chinese + English (`waisuan/taiwan-laws-regulations`) Actor

Search Taiwan statutes and regulations from the Ministry of Justice open data and get one clean JSON row per article: law name, article number, Chinese text, official English translation, last amendment date and links. Built for AI agents, RAG and legal research.

- **URL**: https://apify.com/waisuan/taiwan-laws-regulations.md
- **Developed by:** [Waisuan](https://apify.com/waisuan) (community)
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Taiwan Laws & Regulations (全國法規資料庫) — Official MOJ Data, Chinese + English

Search Taiwan's statutes and regulations from the **Ministry of Justice Laws & Regulations Database** open data and get **one clean JSON row per article**: law name (Chinese and English), article number, chapter, the Chinese text, the **official English translation** of the same article, the last amendment date and direct links. Ideal as a tool for **AI agents**, RAG pipelines, compliance checks and legal research.

### Who is it for

- **AI agents and LLM apps** that must quote Taiwanese law accurately instead of guessing: call it with a law name and article number and get the exact text back.
- **RAG / vector-search builders** who need article-level chunks with stable IDs (`pcode` + `articleNumber`) and links.
- **Foreign companies, lawyers, compliance and HR teams** who want the Chinese text side by side with the English translation (e.g. Labor Standards Act, Personal Data Protection Act, Company Act).
- **Researchers** comparing laws or tracking amendments.

### Why use it

- **Official source**: the MOJ open data API at law.moj.gov.tw (the same database courts and agencies use), not a third-party copy.
- **Article-level, bilingual**: Chinese and English texts are joined by article number (including numbers such as 166-1).
- **Stale-translation warning**: `englishMayBeOutdated` is `true` when the Chinese law was amended after the English translation was last updated, so your agent knows when to rely on the Chinese text.
- **AI-friendly input**: exact law name (Chinese or English), MOJ law code (`pcodes`), article numbers and full-text keyword, all optional and combinable.
- **Covers 1,029 statutes in force (about 41,000 articles; 906 with English translations)**, plus administrative regulations (命令) with `scopes: ["order"]`.
- **Polite**: the database is downloaded as the official bulk files (one request at a time, delay before each download, 3 retries with backoff); the site is not crawled page by page.

### Input examples

Get specific articles of the Civil Code:

```json
{ "lawNameKeyword": "Civil Code", "articleNumbers": ["184", "166-1"] }
```

Find every article mentioning consent (同意) in the Personal Data Protection Act:

```json
{ "lawNameKeyword": "個人資料保護法", "articleKeyword": "同意", "maxItems": 100 }
```

Search all statutes for a phrase (exact name off, empty name):

```json
{ "lawNameKeyword": "", "exactLawName": false, "articleKeyword": "罰鍰", "maxItems": 500 }
```

| Field | Meaning |
|---|---|
| `lawNameKeyword` | Chinese or English law name. Default 個人資料保護法. |
| `exactLawName` | `true` (default): name must match exactly. `false`: name contains the keyword. |
| `pcodes` | MOJ law codes, e.g. `B0000001` (Civil Code). |
| `articleKeyword` | Article text (Chinese or English) contains, case-insensitive. |
| `articleNumbers` | e.g. `["1", "184", "166-1"]`. |
| `includeEnglish` | Join the official English translation (default `true`). |
| `onlyLawsWithEnglish` | Skip laws without an English version. |
| `scopes` | `["law"]` statutes (default), `["order"]` regulations, or both. |
| `includeAbolished` | Include abolished laws (default `false`). |
| `maxItems` | Maximum articles (default 50). |

### Output example

Real output from the default input (Personal Data Protection Act):

```json
{
  "lawName": "個人資料保護法",
  "lawNameEn": "Personal Data Protection Act",
  "pcode": "I0050021",
  "lawLevel": "法律",
  "scope": "law",
  "category": "行政＞個人資料保護委員會籌備處＞通用目",
  "articleNo": "第 1 條",
  "articleNumber": "1",
  "chapter": "第 一 章 總則",
  "textZh": "為規範個人資料之蒐集、處理及利用，以避免人格權受侵害，並促進個人資料之合理利用，特制定本法。",
  "textEn": "The Personal Data Protection Act (the \"PDPA\") is enacted to regulate the collection, processing and use of personal data so as to prevent harm to personality rights, and to facilitate the proper use of personal data.",
  "englishModifiedDate": "2025-11-11",
  "englishMayBeOutdated": false,
  "lawModifiedDate": "2025-11-11",
  "effectiveDate": null,
  "abolished": false,
  "lawUrl": "https://law.moj.gov.tw/LawClass/LawAll.aspx?pcode=I0050021",
  "articleUrl": "https://law.moj.gov.tw/LawClass/LawSingle.aspx?pcode=I0050021&flno=1",
  "englishUrl": "https://law.moj.gov.tw/Eng/LawClass/LawAll.aspx?pcode=I0050021",
  "source": "Ministry of Justice, Laws & Regulations Database of the Republic of China (Taiwan) — law.moj.gov.tw open data API",
  "license": "Open Government Data License, version 1.0 (Taiwan)"
}
```

For the Civil Code, article 184 comes back with `lawModifiedDate: "2026-08-17"`, `englishModifiedDate: "2021-01-20"` and `englishMayBeOutdated: true`. `effectiveDate` is `null` when the law has no single fixed effective date.

### Pricing

Suggested pay-per-event price: **US$0.002 per article (US$2 per 1,000 articles)**, charged through the default dataset-item event, plus the standard Actor start event.

| Use case | Articles | Cost |
|---|---|---|
| One article for an AI agent | 1 | US$0.002 |
| Default run (PDPA, 50 articles) | 50 | US$0.10 |
| Whole Civil Code | 1,439 | ~US$2.88 |
| All statutes in force | ~41,000 | ~US$82 |

Runs that match nothing push no rows and are not charged per article.

### FAQ

**Is the English text legally binding?** No. MOJ English translations are for reference; the Chinese text is the authoritative version. Check `englishMayBeOutdated`.

**How fresh is it?** MOJ refreshes the open data files regularly (the current file says it was updated 2026-10-02). Every run downloads the current files, so there is no stale cache.

**Why does `民法` not return 民法施行法?** `exactLawName` is on by default. Turn it off to match all names containing the keyword.

**Where do I find a law's pcode?** It is in every row and in law.moj.gov.tw URLs (`pcode=...`).

**Regulations (命令)?** Set `scopes` to `["order"]` or `["law", "order"]`. The regulations file is larger (about 25 MB compressed), so runs take longer.

### Data source and license (資料來源與授權)

- 全國法規資料庫 Open API: https://law.moj.gov.tw/api/swagger/docs/v1
- data.gov.tw datasets: 中文法規_法律資料檔下載 (18289), 中文法規_命令資料檔下載 (18290), 英譯法規 法律／命令資料檔下載 (e.g. 18294).

Released under the **Open Government Data License, version 1.0 (政府資料開放授權條款－第1版)**, which permits commercial use with attribution. Attribution:

> 法務部 2026 全國法規資料庫（中文法規、英譯法規資料檔）。此開放資料依政府資料開放授權條款 (Open Government Data License) 進行公眾釋出，使用者於遵守本條款各項規定之前提下，得利用之。政府資料開放授權條款：https://data.gov.tw/license

This Actor is an independent tool by Waisuan, is not affiliated with the Ministry of Justice, and is not legal advice.

### 繁體中文簡介

本 Actor 下載法務部全國法規資料庫開放資料（法律與命令，中文及英譯），依法規名稱（中英文皆可）、法規代碼、條號、條文關鍵字篩選，每條條文輸出一筆：法規名稱、條號、章節、中文條文、英譯條文、最新修正日期、英譯日期，以及「英譯可能過時」提示與連結。適合 AI 代理、RAG、法遵查詢。建議價格：每千條 US$2。資料採政府資料開放授權條款第 1 版，可商用，需標示出處；英譯僅供參考，以中文為準。

# Actor input Schema

## `lawNameKeyword` (type: `string`):

e.g. 個人資料保護法, 民法, Labor Standards Act. Leave empty to search all laws (combine with an article keyword).

## `exactLawName` (type: `boolean`):

On: only the law whose name equals the keyword (民法 will not match 民法施行法). Off: any law whose name contains the keyword.

## `pcodes` (type: `array`):

Optional exact MOJ law codes, e.g. B0000001 (Civil Code), I0050021 (Personal Data Protection Act).

## `articleKeyword` (type: `string`):

Keep only articles whose Chinese or English text contains this (case-insensitive), e.g. 個人資料, consent, 罰鍰.

## `articleNumbers` (type: `array`):

e.g. 1, 184, 166-1. Empty = all articles.

## `includeEnglish` (type: `boolean`):

Joins the MOJ English translation article by article (textEn). Translations are for reference; the Chinese text is authoritative.

## `onlyLawsWithEnglish` (type: `boolean`):

Only laws that have an English translation.

## `scopes` (type: `array`):

Statutes (法律, incl. the Constitution) and/or administrative regulations (命令). Regulations are a much larger download.

## `includeAbolished` (type: `boolean`):

Include abolished laws.

## `maxItems` (type: `integer`):

Max articles.

## `requestDelayMs` (type: `integer`):

Delay between downloads (ms).

## Actor input object example

```json
{
  "lawNameKeyword": "個人資料保護法",
  "exactLawName": true,
  "pcodes": [],
  "articleKeyword": "",
  "articleNumbers": [],
  "includeEnglish": true,
  "onlyLawsWithEnglish": false,
  "scopes": [
    "law"
  ],
  "includeAbolished": false,
  "maxItems": 50,
  "requestDelayMs": 1500
}
```

# Actor output Schema

## `results` (type: `string`):

All records in the default dataset (JSON, CSV, Excel and more via the API).

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "lawNameKeyword": "個人資料保護法"
};

// Run the Actor and wait for it to finish
const run = await client.actor("waisuan/taiwan-laws-regulations").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "lawNameKeyword": "個人資料保護法" }

# Run the Actor and wait for it to finish
run = client.actor("waisuan/taiwan-laws-regulations").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "lawNameKeyword": "個人資料保護法"
}' |
apify call waisuan/taiwan-laws-regulations --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,waisuan/taiwan-laws-regulations"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/gTc3nK01lMW2TwiWA/builds/ALuLzvtNYKNXz9XFR/openapi.json
