# UK Legislation API: Is This Law Still in Force? (+ Japan) (`wooden_scanner_c1n/law-in-force-checker`) Actor

Give a statute citation (e.g. 'Data Protection Act 2018 s.3', '民法 第90条'). Get in-force / repealed / not-yet-in-force status, the official current or point-in-time text, and amendments passed but not yet in force, from legislation.gov.uk and e-Gov. Source and licence on every record.

- **URL**: https://apify.com/wooden_scanner_c1n/law-in-force-checker.md
- **Developed by:** [Sean](https://apify.com/wooden_scanner_c1n) (community)
- **Categories:** AI, Developer tools, Business
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 provision checkeds

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

## Is This Still the Law? UK & Japan Statute In-Force Checker

**Give it a statute citation and find out if that provision is still the law.** For each provision you get:

- **status**: `in_force`, `repealed`, `not_yet_in_force`, `not_found`, `ambiguous` or `invalid_citation`;
- the **official text** in force today or on any past date you choose;
- **changes passed but not yet in force**, with the amending law and the expected in-force date;
- the official URL, the source, and the licence.

It covers the **United Kingdom** ([legislation.gov.uk](https://www.legislation.gov.uk), The National Archives) and **Japan** ([e-Gov 法令検索](https://laws.e-gov.go.jp), Digital Agency). Every record uses the same schema, with source and licence attached.

Built for **AI agents, legal-tech tools and compliance teams** that need to check whether a cited statute is real, current and about to change. A model that cites a repealed section, or a section with an amendment already passed, is a liability. This Actor is the deterministic check: no LLM, official sources only.

### What makes it different

- **Pending changes, not just text.**
  - UK: outstanding "changes to legislation" effects that legislation.gov.uk has not yet applied, plus prospective amendments marked in the text.
  - Japan: e-Gov revisions that are promulgated but not yet enforced (未施行). For each one, the Actor checks whether it **actually changes the article you asked about** and returns the future text.
- **Point-in-time:** set `asOfDate` to get the version that was in force on that day (UK from 1991, Japan from 2017-04-01).
- **Monitoring:** set `changedSinceDate` on a scheduled run. Each record then says whether today's version changed since that date.
- **Forgiving citation parser:**
  - UK: `Data Protection Act 2018 s.3(2)(a)`, `section 6 of the Road Traffic Regulation Act 1984`, `Equality Act 2010 Sch 1 para 2`, `reg 6`, `art 5`, `r 3`, legislation.gov.uk URLs or paths.
  - Japan: `民法 第90条`, `民法第三百九十八条の二` (kanji numerals), `個人情報保護法 第27条第1項` (abbreviations), law numbers (`明治二十九年法律第八十九号`), e-Gov law IDs, and official English names of about 35 common Japanese laws (`Civil Code art. 90`, `Labor Standards Act art 36`).
- **One normalised schema** for both countries, with `source`, `licence` and `attribution` on every record.

### Input example

```json
{
  "provisions": [
    "Data Protection Act 2018 s.3",
    "Road Traffic Regulation Act 1984 s.22B",
    "Data Protection Act 1998 s 1",
    "民法 第90条",
    "個人情報保護法 第27条第1項",
    "刑法 第200条"
  ],
  "jurisdiction": "auto",
  "asOfDate": "",
  "changedSinceDate": "",
  "comparePendingText": true,
  "includeAmendmentNotes": true,
  "maxTextChars": 20000
}
```

Prefix a line with `UK:` or `JP:` to force the country. Without a year, "Companies Act" is read as the Japanese 会社法; write "Companies Act 2006" for the UK Act.

### Output example (shortened)

```json
{
  "input": "個人情報保護法 第27条第1項",
  "jurisdiction": "JP",
  "status": "in_force",
  "verdict": "In force (version in force since 2026-11-02). 1 promulgated change to this provision not yet in force; next on 2028-07-16.",
  "lawTitle": "個人情報の保護に関する法律",
  "lawId": "415AC0000000057",
  "provision": "第27条第1項",
  "versionDate": "2026-11-02",
  "text": "個人情報取扱事業者は、次に掲げる場合を除くほか、あらかじめ本人の同意を得ないで…",
  "hasPendingChanges": true,
  "pendingChanges": [{
    "kind": "promulgated_not_yet_enforced",
    "changeType": "amends_this_provision",
    "amendingLaw": "個人情報の保護に関する法律等の一部を改正する法律（令和八年法律第五十六号）",
    "expectedInForceDate": "2028-07-16",
    "futureText": "…"
  }],
  "officialUrl": "https://laws.e-gov.go.jp/law/415AC0000000057",
  "source": "e-Gov 法令検索 / 法令API (Digital Agency, Japan)",
  "licence": "Public Data License 1.0 (PDL1.0) (https://www.digital.go.jp/resources/open_data/public_data_license_v1.0)",
  "attribution": "出典：e-Gov法令検索 (https://laws.e-gov.go.jp/)、PDL1.0 …"
}
```

A UK example: `Road Traffic Regulation Act 1984 s.22B` returns `not_yet_in_force`, with "S. 22B inserted (prosp.) by Railways and Transport Safety Act 2003 (c. 20), ss. 108, 120". `Data Protection Act 1998 s 1` returns `repealed`, with the repealing provision.

Main fields: `input, jurisdiction, status, statusDetail, verdict, lawTitle, lawId, lawType, provision, provisionId, asOfDate, versionDate, versionLastUpdated, extent (UK), text, textTruncated, textLength, hasPendingChanges, pendingChangesCount, pendingChanges[], lawPendingAmendmentsCount (JP), amendmentNotes, commencementNotes (UK), versionDates, lastAmendedBy, changedSince, candidates (for ambiguous titles), officialUrl, sourceUrl, source, licence, attribution, retrievedAt`.

Each `pendingChanges[]` item has: `kind, changeType, description, amendingLaw, amendingLawUrl, amendingProvision, expectedInForceDate, inForceStatus, appliedToText`, plus `futureText` for Japan and `affectedProvisions` for UK.

### Pricing (pay per event)

- **$0.005 per provision checked.** You are charged only when the provision was found, whether it is in force, repealed or not yet in force.
- `not_found`, `ambiguous`, `invalid_citation` and source errors are returned free.
- A small Actor start fee of $0.005 per run.

Example: checking 100 provisions costs about $0.505.

### Use it from AI agents (MCP)

This Actor works as a tool through the [Apify MCP server](https://mcp.apify.com): `https://mcp.apify.com?tools=wooden_scanner_c1n/law-in-force-checker`. An agent can pass the statutes it is about to cite and read back `status`, `verdict` and `hasPendingChanges` before it answers. The `verdict` field is a single sentence you can quote directly.

### Data sources and licences

| Country | Source | Licence |
|---|---|---|
| United Kingdom | legislation.gov.uk Legislation API (CLML XML, `/resources` metadata for unapplied effects) | [Open Government Licence v3.0](https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/). "All content is available under the Open Government Licence v3.0 except where otherwise stated." Commercial re-use is allowed with attribution. EU-origin items carry the extra EUR-Lex attribution (Decision 2011/833/EU), and pre-1987 secondary legislation carries the Westlaw UK attribution, as legislation.gov.uk asks. |
| Japan | e-Gov 法令API Version 2 (no registration) | [公共データ利用規約 第1.0版 (PDL1.0)](https://www.digital.go.jp/resources/open_data/public_data_license_v1.0), compatible with CC BY 4.0: "商用利用も可能です". The required 出典 (source) statement and an "edited/processed" note are on every record. |

**Fair use:**

- legislation.gov.uk's robots.txt sets `Crawl-delay: 5`. The Actor waits 5 seconds between legislation.gov.uk requests and identifies itself with a descriptive User-Agent, as the [fair use policy](https://www.legislation.gov.uk/fair-use-policy) asks.
- e-Gov requests are limited to 3 at a time.
- Act titles, Act metadata and Japanese law and revision lists are cached within a run.

This tool returns official public-sector information. It is **not legal advice**. Revised UK text can lag behind recent changes (legislation.gov.uk lists those changes as outstanding effects, and the Actor reports them). Always rely on the official publication for legal decisions.

### Limits

- **Speed:**
  - UK: about 10 provisions per minute because of the 5-second crawl delay. Several provisions from the same Act are faster, because the title and metadata are fetched once.
  - Japan: several provisions per second.
  - Up to 500 provisions per run.
- **UK:**
  - Whole-Act lookups (no provision given) return the Act's metadata and outstanding changes, with status `act_found`. legislation.gov.uk does not publish one in-force status for an entire Act.
  - Private and Personal Acts are refused, because they concern named individuals.
- **Japan:**
  - Main-provision articles, paragraphs (項) and items (号) are supported. Supplementary provisions (附則) are not yet supported.
  - Point-in-time text starts on 2017-04-01.
  - With `comparePendingText`, at most 10 pending revisions are compared per provision.
- **Not yet supported:** EU law, Irish law and Norway (Lovdata's API host disallows robots, so it is not used).

# Actor input Schema

## `provisions` (type: `array`):

One citation per line. UK: 'Data Protection Act 2018 s.3(2)', 'section 6 of the Road Traffic Regulation Act 1984', 'Equality Act 2010 Sch 1 para 2', 'reg 6', 'art 5', or a legislation.gov.uk URL / path like 'ukpga/2018/12/section/3'. Japan: '民法 第90条', '民法第三百九十八条の二', '個人情報保護法 第27条第1項', an e-Gov law ID ('129AC0000000089 Article 90') or a built-in English name ('Civil Code art. 90'). Prefix 'UK:' or 'JP:' to force a country. An Act without a provision returns Act-level data. Up to 500 per run.

## `jurisdiction` (type: `string`):

Auto detects Japan from Japanese text, e-Gov law IDs and the built-in English names of Japanese laws; everything else is treated as UK.

## `asOfDate` (type: `string`):

Optional. Return the text and status as they stood on this date (YYYY-MM-DD). Empty = today. UK revised data starts 1991-02-01; Japan point-in-time data starts 2017-04-01. Pending changes are always listed relative to today.

## `changedSinceDate` (type: `string`):

Optional. Adds changedSince true/false: has today's version of the provision changed since this date? Useful for scheduled monitoring of a watchlist of provisions.

## `comparePendingText` (type: `boolean`):

For Japanese provisions, fetch the provision in every promulgated-but-not-yet-enforced revision of the law and report only the amendments that actually change this provision, with its future text. Off = list all pending amendments to the law (faster).

## `includeAmendmentNotes` (type: `boolean`):

UK: the official amendment (F) and commencement (I) annotations for the provision. Japan: the law's revision list.

## `maxTextChars` (type: `integer`):

Truncate provision text to this many characters (textTruncated says when). 0 = no text, status and changes only.

## Actor input object example

```json
{
  "provisions": [
    "Data Protection Act 2018 s.3",
    "民法 第90条"
  ],
  "jurisdiction": "auto",
  "comparePendingText": true,
  "includeAmendmentNotes": true,
  "maxTextChars": 20000
}
```

# Actor output Schema

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

All provision checks in the run.

# 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 = {
    "provisions": [
        "Data Protection Act 2018 s.3",
        "民法 第90条"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("wooden_scanner_c1n/law-in-force-checker").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 = { "provisions": [
        "Data Protection Act 2018 s.3",
        "民法 第90条",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("wooden_scanner_c1n/law-in-force-checker").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 '{
  "provisions": [
    "Data Protection Act 2018 s.3",
    "民法 第90条"
  ]
}' |
apify call wooden_scanner_c1n/law-in-force-checker --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,wooden_scanner_c1n/law-in-force-checker"
        }
    }
}
```

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/1aA1t3Wf4vFHA30vt/builds/aUCZ67ux3UfOy4Zki/openapi.json
