# Japanese Law Article Text (e-Gov 法令・条文取得) (`fontom.ai.plus/egov-law-text`) Actor

Exact article text of Japanese statutes by name and article number (民法第709条 …), with point-in-time versions. Straight from the e-Gov Law API; for AI agents that must quote the law, not recall it.

- **URL**: https://apify.com/fontom.ai.plus/egov-law-text.md
- **Developed by:** [FONTOM AI](https://apify.com/fontom.ai.plus) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $10.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

## Japanese Law Article Text (e-Gov 法令・条文取得)

**Quote the law, don't recall it.** Give a law name and an article number (`民法第709条`, `個人情報保護法第27条`, `労働基準法第36条`) and get the **exact current article text** from the government's e-Gov Law API, with the law's number, enforcement date and a link to the official page.

- **Point-in-time versions.** Set `asOf` to a date and get the text that was in force then (e.g. 民法第4条 on 2019-01-01 says 二十歳; today it says 十八歳).
- **Flexible queries.** Kanji or Arabic numerals, branch articles (`第90条の2`), paragraphs (`第415条第2項`), official abbreviations (`個人情報保護法`). A query with only a law name returns the list of articles.
- **Honest misses.** Ambiguous law names return candidates instead of a guess; missing articles say so (a miss is a result row and is charged like any other).
- **For AI agents.** Available through the Apify MCP server, so an agent can fetch the real wording before answering a legal-text question instead of hallucinating it.

### Input

- `queries`: list of strings such as `民法第709条`.
- `asOf` (optional): `YYYY-MM-DD`.

### Output (example)

```json
{ "query": "民法第709条", "found": true,
  "law": { "title": "民法", "lawNum": "明治二十九年法律第八十九号", "enforcementDate": "2026-06-24", "url": "https://laws.e-gov.go.jp/law/129AC0000000089" },
  "article": { "articleTitle": "第七百九条", "caption": "（不法行為による損害賠償）",
               "text": "第七百九条　（不法行為による損害賠償）\n故意又は過失によって他人の権利又は法律上保護される利益を侵害した者は、これによって生じた損害を賠償する責任を負う。" },
  "notice": "出典: e-Gov法令検索（デジタル庁）…" }
```

### Pricing

Pay per event: $0.01 per result row written to the dataset (`apify-default-dataset-item`). **Every row is charged, including not-found rows**, so check names before bulk runs (ambiguous names return candidates, also one row).

### Limits

- Statutes, cabinet orders and ministerial ordinances available in e-Gov only; no court decisions, no local ordinances (条例), no commentary.
- Text is flattened to plain text (items, sub-items and tables become indented lines; complex tables lose their layout). The `law.url` always points to the authoritative rendering.
- This is a text-retrieval tool, **not legal advice**. Verify anything important on e-Gov.

Source: e-Gov法令検索 / 法令API (デジタル庁), government standard terms of use (https://laws.e-gov.go.jp/apitop/).

# Actor input Schema

## `queries` (type: `array`):

e.g. 民法第709条, 民法第90条の2第1項, 個人情報保護法第27条, 会社法. Kanji or Arabic numerals both work; official abbreviations (個人情報保護法) are resolved.

## `asOf` (type: `string`):

YYYY-MM-DD. Returns the version of the law that was in force on that date (point-in-time). Leave empty for the current version.

## Actor input object example

```json
{
  "queries": [
    "民法第709条",
    "民法第415条第2項",
    "個人情報保護法第27条",
    "労働基準法第36条"
  ]
}
```

# Actor output Schema

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

Result rows in the default dataset.

# 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 = {
    "queries": [
        "民法第709条",
        "民法第415条第2項",
        "個人情報保護法第27条",
        "労働基準法第36条"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("fontom.ai.plus/egov-law-text").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 = { "queries": [
        "民法第709条",
        "民法第415条第2項",
        "個人情報保護法第27条",
        "労働基準法第36条",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("fontom.ai.plus/egov-law-text").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 '{
  "queries": [
    "民法第709条",
    "民法第415条第2項",
    "個人情報保護法第27条",
    "労働基準法第36条"
  ]
}' |
apify call fontom.ai.plus/egov-law-text --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,fontom.ai.plus/egov-law-text"
        }
    }
}
```

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/sxbbbJwm9SC61Nux1/builds/hI8QvhmHdLytIRAFH/openapi.json
