# Japan Laws & Regulations (e-Gov Official) (`minako-ph/japan-laws-regulations`) Actor

Full text of Japanese laws as structured JSON — articles, paragraphs, items — with optional English reference translations and summaries. Official e-Gov API.

- **URL**: https://apify.com/minako-ph/japan-laws-regulations.md
- **Developed by:** [Minako Yamamoto](https://apify.com/minako-ph) (community)
- **Categories:** Developer tools, Agents
- **Stats:** 2 total users, 1 monthly users, 66.7% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.00 / 1,000 article records

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Japan Laws & Regulations (e-Gov Official)

Full text of Japanese laws as structured JSON, with optional English reference translations. This Actor reads the **official e-Gov Laws API v2** (e-Gov法令検索・デジタル庁) and returns one JSON item per article (条) — articles, paragraphs (項) and items (号) as a clean tree plus flat text — for any law you pick by title, number, or ID, at any point in time (`as_of_date`). **Official API based — no scraping.**

**An honest note first**: for laws already covered by the Ministry of Justice's official [Japanese Law Translation Database (JLT)](https://www.japaneselawtranslation.go.jp/), use JLT — those translations are curated. This Actor's value is the **gap JLT does not cover**: laws not yet in JLT, the latest amendments, point-in-time versions, and machine-readable structure for pipelines and AI agents. Translations here are machine-generated reference translations with no legal effect. Tested against frozen datasets on every release.

### What you get

One JSON item per article — real output for the Act on the Protection of Personal Information (個人情報保護法):

```json
{
  "record_type": "article",
  "law_id": "415AC0000000057",
  "law_num": "平成十五年法律第五十七号",
  "law_title_ja": "個人情報の保護に関する法律",
  "law_abbrev_ja": "個人情報保護法",
  "title_en": null,
  "promulgation_date": "2003-05-30",
  "enforcement_date": "2026-06-24",
  "law_revision_id": "415AC0000000057_20260624_508AC0000000046",
  "as_of": null,
  "article_number": "1",
  "article_display_ja": "第一条",
  "article_caption_ja": "（目的）",
  "paragraphs": [
    { "paragraph_number": "1", "text_ja": "この法律は、デジタル社会の進展に伴い…", "items": [] }
  ],
  "text_ja": "（目的）\n第一条\nこの法律は、デジタル社会の進展に伴い…",
  "source": "laws",
  "source_url": "https://laws.e-gov.go.jp/api/2/law_data/415AC0000000057?response_format=json",
  "retrieved_at": "2026-07-10T00:00:00+09:00",
  "attribution": "出典：e-Gov法令検索（デジタル庁）",
  "schema_version": "0.1.0"
}
````

With `translate: true`, each item also carries a `translated` block: a faithful English `translation_en` (numbers preserved and cross-checked against the source — mismatches are flagged, never silently kept), a one-sentence `summary_en`, the law-level `law_title_en`, and the disclaimer. All generated fields carry `confidence` and `method: "llm"`.

### How to use

1. Set `law_query`: a law title (個人情報の保護に関する法律), a common abbreviation, a law number (平成十五年法律第五十七号), or an e-Gov law ID (415AC0000000057). One law per run — the prefilled example returns the first five articles in seconds.
2. Optionally narrow with `articles` (e.g. `["1", "2-2", "第二十三条"]`) or pin a historical version with `as_of_date`.
3. Optionally set `translate: true` for English reference translations.
4. Read the results from the default dataset as JSON, CSV, or Excel.

### What this does NOT do

- **No bulk corpus.** Retrieving all laws sequentially is prohibited by the API provider, and this Actor is built so it cannot do that (one law per run, `law_query` required). For corpus needs, use the official [bulk XML download](https://laws.e-gov.go.jp/bulkdownload/).
- **Translations are unofficial.** This is an unofficial reference translation generated by machine. It has no legal effect and does not constitute legal advice. For official translations, see the Japanese Law Translation Database (JLT) by the Ministry of Justice.
- `title_en` is `null` in the basic output — the upstream API provides no English titles, and this Actor does not guess. (With `translate: true`, an LLM-generated title rendering is included in the `translated` block, clearly labeled.)
- **Main provision (本則) only** in v1: supplementary provisions (附則), appended tables and figures are not extracted as articles.
- Numbers in translations are cross-checked for presence against the kanji-normalized source; mismatches set `verification_failed: true` on the field (values are kept so you can inspect them).
- The upstream API may change or suspend service without notice; we monitor with frozen-dataset regression tests.

### Pricing

Pay-per-event, fully transparent:

| Event              | Price               |
| ------------------ | ------------------- |
| Actor start        | $0.02               |
| Article (basic)    | $0.004              |
| Translated article | $0.029 (LLM output) |

Free allowance: **the first 20 articles of every run are free** (basic records; translated articles are always billed). Per-run limit: 200 articles. If your run hits the maximum charge limit you set, the Actor stops gracefully and keeps the partial results.

### Data source & attribution

Law texts come from the [e-Gov Laws API](https://laws.e-gov.go.jp/) operated by Japan's Digital Agency: 出典：e-Gov法令検索（デジタル庁）. Japanese law texts themselves are not subject to copyright (Copyright Act art. 13); the structure and translations are produced by this Actor, which is independent and not endorsed by the Digital Agency or the Ministry of Justice.

### More Japan data Actors

This Actor is part of a family of official-API-based Japan data Actors. See also [**Japan Company Filings (EDINET Official)**](https://apify.com/minako-ph/japan-edinet-filings), [**Japan Subsidies & Grants Data (Official)**](https://apify.com/minako-ph/japan-subsidies-grants), [**Japan Real Estate Transaction Prices (MLIT Official)**](https://apify.com/minako-ph/japan-real-estate-prices), and [**Japan Company Data Enrichment (Official Registry)**](https://apify.com/minako-ph/japan-company-enrichment). Check the developer profile for the full list.

### Contact

Found an issue or need a field the upstream API provides but this Actor doesn't expose yet? Open a ticket on the **Issues** tab — first response within 48 hours.

# Actor input Schema

## `law_query` (type: `string`):

Law title (個人情報の保護に関する法律), common abbreviation, law number (平成十五年法律第五十七号), or e-Gov law ID (415AC0000000057). One law per run.

## `articles` (type: `array`):

Article numbers to keep: "1", "2-2" (第2条の2), or Japanese like 第二条の二. Empty = all main-provision articles (up to 200 per run).

## `as_of_date` (type: `string`):

Point-in-time version of the law (YYYY-MM-DD). Empty = current text.

## `translate` (type: `boolean`):

Add an English reference translation and a one-sentence summary per article (LLM; unofficial, no legal effect). Billed per translated article.

## Actor input object example

```json
{
  "law_query": "個人情報の保護に関する法律",
  "articles": [
    "1",
    "2",
    "3",
    "4",
    "5"
  ],
  "translate": false
}
```

# 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 = {
    "law_query": "個人情報の保護に関する法律",
    "articles": [
        "1",
        "2",
        "3",
        "4",
        "5"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("minako-ph/japan-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 = {
    "law_query": "個人情報の保護に関する法律",
    "articles": [
        "1",
        "2",
        "3",
        "4",
        "5",
    ],
}

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

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

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

```

## CLI example

```bash
echo '{
  "law_query": "個人情報の保護に関する法律",
  "articles": [
    "1",
    "2",
    "3",
    "4",
    "5"
  ]
}' |
apify call minako-ph/japan-laws-regulations --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=minako-ph/japan-laws-regulations",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Japan Laws & Regulations (e-Gov Official)",
        "description": "Full text of Japanese laws as structured JSON — articles, paragraphs, items — with optional English reference translations and summaries. Official e-Gov API.",
        "version": "0.1",
        "x-build-id": "YnyDKFoigdDr44USH"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/minako-ph~japan-laws-regulations/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-minako-ph-japan-laws-regulations",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/minako-ph~japan-laws-regulations/runs": {
            "post": {
                "operationId": "runs-sync-minako-ph-japan-laws-regulations",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/minako-ph~japan-laws-regulations/run-sync": {
            "post": {
                "operationId": "run-sync-minako-ph-japan-laws-regulations",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "law_query"
                ],
                "properties": {
                    "law_query": {
                        "title": "Law (title / number / ID)",
                        "type": "string",
                        "description": "Law title (個人情報の保護に関する法律), common abbreviation, law number (平成十五年法律第五十七号), or e-Gov law ID (415AC0000000057). One law per run."
                    },
                    "articles": {
                        "title": "Articles (optional)",
                        "type": "array",
                        "description": "Article numbers to keep: \"1\", \"2-2\" (第2条の2), or Japanese like 第二条の二. Empty = all main-provision articles (up to 200 per run).",
                        "items": {
                            "type": "string"
                        }
                    },
                    "as_of_date": {
                        "title": "As-of date (optional)",
                        "type": "string",
                        "description": "Point-in-time version of the law (YYYY-MM-DD). Empty = current text."
                    },
                    "translate": {
                        "title": "English reference translation",
                        "type": "boolean",
                        "description": "Add an English reference translation and a one-sentence summary per article (LLM; unofficial, no legal effect). Billed per translated article.",
                        "default": false
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
