81trust / 100
Gb Legislation
by Maxwell x402 in Search & web
x402 APIPassing, checked 2 h ago
Laws of the United Kingdom from legislation.gov.uk: search by title, or fetch one act by its official id, with title, in-force status, dates and the official link. In-force status is given only when an act is marked repealed; otherwise it is unknown. An id or search not yet cached answers 404, not charged, and is fetched within about a minute.
GET https://api.maxwellinternational.ai/v1/gov/gb/legislation
Last 30 days
All checks passedSome failedAll failedNot checked
- Uptime
- 100%
- Response time
- 73 ms typical, 73 ms slowest 5%
- Last check
- 2 h ago
- Next check
- any minute now
How to call it
# See the payment challenge (nothing is charged)
curl -i -X GET "https://api.maxwellinternational.ai/v1/gov/gb/legislation?id=ukpga%2F2018%2F12"import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
const client = new x402Client().register(
"eip155:8453",
new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);
// Not sure it's safe to pay? Preflight it first for $0.005:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fapi.maxwellinternational.ai%2Fv1%2Fgov%2Fgb%2Flegislation
const res = await pay("https://api.maxwellinternational.ai/v1/gov/gb/legislation?id=ukpga%2F2018%2F12");
console.log(await res.json());Example input
{
"id": "ukpga/2018/12"
}Example output
{
"cc": "gb",
"country": "United Kingdom",
"description": "An Act to make provision for the regulation of the processing of information ...",
"family": "legislation",
"found": true,
"id": "ukpga/2018/12",
"ok": true,
"sku": "gov.gb.legislation",
"source": "legislation.gov.uk (The National Archives)",
"sourceClass": "official-api",
"sourceLicence": {
"attribution": "Contains public sector information licensed under the Open Government Licence...",
"name": "Open Government Licence v3.0 (Crown copyright)",
"url": "https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/"
},
"title": "Data Protection Act 2018"
}Security scan
- No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.
Recent checks
| When | Result | HTTP | Time | Price |
|---|---|---|---|---|
| 2 h ago | Passed | 402 | 73 ms | $0.005 |
| 8 h ago | Passed | 402 | 224 ms | $0.005 |