Legislation & Law Text API: Exact Statute Text (EU, UK, US) avatar

Legislation & Law Text API: Exact Statute Text (EU, UK, US)

Pricing

from $4.25 / 1,000 provision returneds

Go to Apify Store
Legislation & Law Text API: Exact Statute Text (EU, UK, US)

Legislation & Law Text API: Exact Statute Text (EU, UK, US)

Get the exact current text of a law by citation: "Art. 6 GDPR", "26 U.S.C. § 162", "21 CFR 820.10", "Consumer Rights Act 2015 s. 9". Verbatim paragraphs, version date, official source URL and licence, plus the passages that answer your question.

Pricing

from $4.25 / 1,000 provision returneds

Rating

0.0

(0)

Developer

Reliable Tools

Reliable Tools

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

15 hours ago

Last modified

Share

Not legal advice. This Actor returns the published text of laws for reference. Check the authentic published version and ask a qualified professional before you rely on it. Every row carries this note in its disclaimer field.

This legislation API returns the exact current text of a law provision from its citation: "Art. 6 GDPR", "Art. 17 GDPR", "26 U.S.C. § 162", "21 CFR 820.10" or "Consumer Rights Act 2015 s. 9". You get the official title, the verbatim text split into its numbered paragraphs, the version date, the official source URL and the reuse licence. Ask a question with a citation and you also get the passages of that provision that answer it, each with an AI evidence score. The text always comes from the official publisher; nothing is paraphrased or written by AI.

What does the Legislation & Law Text API do?

It reads citations the way lawyers, tax advisers and compliance teams write them, finds the act at the official source and quotes the provision word for word.

JurisdictionWhat you can citeOfficial source
European UnionRegulations, directives and decisions: by common name ("GDPR", "AI Act", "DSA", "GPSR", "VAT Directive", "CRR", 50 acts in all), by number ("Regulation (EU) 2023/988", "Directive 2006/112/EC", "Regulation (EC) No 261/2004") or by CELEX number ("32016R0679"). Articles and annexes.EUR-Lex via the CELLAR repository of the Publications Office
United KingdomActs and statutory instruments by title and year, sections, regulations, articles and schedule paragraphs, plus retained EU law ("art. 6 UK GDPR")legislation.gov.uk (The National Archives)
United StatesU.S. Code sections ("26 U.S.C. § 162", "IRC § 199A") and Code of Federal Regulations sections ("21 CFR 820.10", "Treas. Reg. § 1.162-1")uscode.house.gov (Office of the Law Revision Counsel) and the eCFR from govinfo.gov

German law is not offered. The official German server (gesetze-im-internet.de) does not accept connections from the Apify cloud, and we do not route around that. German citations such as "§ 13b UStG" are recognised, but they come back as source_unavailable and are not charged.

Pinpoints work too: "Art. 6(1)(f) GDPR", "s. 172(1)(a) Companies Act 2006", "26 U.S.C. § 162(a)(2)", "16 CFR 310.4(b)(1)(iii)". The full provision is returned and the pinpoint text is given on its own in pinpointText.

Who uses it

  • Tax advisers and accountants who quote the exact wording of a VAT or income tax provision in a memo or client letter.
  • Compliance and product teams checking obligations in the GDPR, the AI Act, GPSR, MDR, the CFR or the Consumer Rights Act.
  • Legal tech and AI builders who need citable, verbatim statute text with a version date for retrieval and grounding.
  • AI agents and retrieval pipelines that need the verbatim source text with a version date (see Using it from an AI agent below).

What data you get

FieldWhat it is
statusfound, repealed, not_found, ambiguous, invalid_citation, unsupported or source_unavailable
citationThe citation in a normalised form, for example Art. 6(1)(f) Regulation (EU) 2016/679
jurisdictionEU, UK or US (DE only on rows marked source_unavailable)
provision, headingThe article, section or paragraph and its official heading
actTitle, actShortName, actIdOfficial title of the act, abbreviation or type, and its identifier (CELEX number, legislation.gov.uk path, U.S.C. title or CFR part)
textThe exact text of the provision, one block per line in the official order
paragraphsThe same text split into its numbered paragraphs (1, 2, 3 or (a), (b))
pinpoint, pinpointTextThe pinpoint you cited and only its text
answerFor a question: the passages that answer it, each with the line, its paragraph path and an evidence score from 0 to 1
versionDate, versionDateMeaning, versionNoteThe version date and what it means at that source (see below)
inForceWhether the act or provision is in force at the source
sourceUrl, dataUrlThe official page of the provision and the machine-readable file that was read
licence, sourceNameThe source and its reuse terms
amendmentNotesAmendment, commencement, repeal or authority notes published with the provision
eliEuropean Legislation Identifier of the version (EU)
parseHow the citation was read: by rules, or by an AI pick among several matching acts, with the candidates
notePlain-language notes, for example why a row was not found
disclaimerThe not-legal-advice note, on every row

What the version date means

SourceversionDate is
EUThe date of the consolidated version used (the latest one in force today), or the Official Journal date if the act has never been consolidated. If a later consolidated version with adopted future changes exists, versionNote says so.
UKThe date from which this version of the provision applies
U.S. CodeThe enactment date of the last public law included in the current release point
CFRThe latest amendment date stated in the eCFR title file (versionNote also gives the date of the data file)

How to run it

  1. Open the Actor and put citations into Citations, one per line.
  2. To ask a question about a citation, write it after |, for example Art. 17 GDPR | When must personal data be erased?. Or use Question for all citations to ask the same question of every citation.
  3. Pick the language for EU law if you want a language other than English.
  4. Click Start and download the results as JSON, CSV or Excel, or read them through the API.

Example output

Input 26 U.S.C. § 162 | Are travel expenses away from home deductible? (text shortened here):

{
"status": "found",
"jurisdiction": "US",
"citation": "26 U.S.C. § 162",
"heading": "Trade or business expenses",
"actTitle": "Title 26 INTERNAL REVENUE CODE",
"text": "(a) In general\nThere shall be allowed as a deduction all the ordinary and necessary expenses paid or incurred during the taxable year in carrying on any trade or business ...",
"answer": {
"question": "Are travel expenses away from home deductible?",
"status": "answered",
"answerInProvisionProbability": 0.98,
"passages": [
{"line": 4, "path": "(a)(2)", "evidenceScore": 1.0,
"text": "(2) traveling expenses (including amounts expended for meals and lodging other than amounts which are lavish or extravagant under the circumstances) while away from home in the pursuit of a trade or business; and"}
]
},
"versionDate": "2026-10-22",
"versionNote": "Text contains those laws in effect through Public Law 119-136 (October 22, 2026).",
"sourceUrl": "https://uscode.house.gov/us/usc/119-136/t26/s162/",
"licence": "Public domain (US government work, 17 U.S.C. § 105). Office of the Law Revision Counsel, uscode.house.gov."
}

Statuses and edge cases

StatusWhenCharged
foundThe provision exists and its current text is returnedYes
repealedThe act or provision was repealed or deleted. You get the official record: the repeal note, the repealing act where the source gives it, and the last text if the source keeps itYes
not_foundThe act exists but the provision does not (for example a CFR section that was removed), or the act number is unknownNo
ambiguousAn abbreviation matches several acts and the context does not decide it. The candidates are listed so you can add the act numberNo
invalid_citationThe citation could not be readNo
unsupportedA citation type that is not covered, such as a whole CFR partNo
source_unavailableThe official source did not answer. Retry laterNo

Ambiguous abbreviations: "CRD" can mean the Capital Requirements Directive or the Consumer Rights Directive. When a citation matches several acts, an AI pick chooses one only when it is confident (for example "Art. 21c CRD" points to the Capital Requirements Directive, because Article 21c only exists there). Otherwise the row is ambiguous and free.

How the question answering works

  1. Code fetches the official provision and numbers every line of it.
  2. An AI model answers two fixed questions: does any line of this provision answer the question, and which lines answer it most directly. It can only point at existing lines.
  3. Code quotes those lines verbatim from the official text and returns their evidence scores. If the provision does not address the question, answer.status is not_in_this_provision and the passages are empty (and not charged).

The AI never writes or rewrites legal text and gives no legal assessment. It only selects lines of the provision that relate to the question. Long provisions are read in overlapping windows. Questions are cut at 500 characters.

For this step the question and the provision text are sent to an external AI service, which only answers the fixed questions above. To keep questions out of it, leave the question empty or turn off Answer questions with passages. When a citation matches several acts, the citation and the question are also used for the AI pick described above.

Using it from an AI agent

An agent or retrieval pipeline can call this Actor as a tool to fetch the verbatim text it quotes:

  1. The agent collects the citations it needs ("Art. 6 GDPR", "26 U.S.C. § 162").
  2. It calls the Actor with each citation, optionally with a short question to select the relevant lines.
  3. It quotes text or answer.passages word for word and links sourceUrl with the versionDate.
  4. If a row comes back repealed, not_found or ambiguous, the agent reports that instead of guessing.

The output is source text, not an answer to a legal question and not legal advice.

API use

curl -X POST "https://api.apify.com/v2/acts/reliable_tools~legislation-text-api/run-sync-get-dataset-items?token=YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"requests": [{"citation": "Art. 17 GDPR", "question": "When must personal data be erased?"},
{"citation": "26 U.S.C. § 162"}]}'

The requests field takes objects with citation, an optional question and your own reference, which is returned unchanged. The run summary (counts per status, requests per source) is in the key-value store under SUMMARY.

Pricing

You pay per event, there is no subscription.

EventPrice
Provision returned (found or repealed)$0.005
Question answered with passages$0.005 extra
Actor start$0.00005 per run

Rows that are not_found, ambiguous, invalid_citation, unsupported or source_unavailable cost nothing. A question is only charged when passages are found.

Sources and licences

SourceLicence
EUR-Lex / CELLAR, Publications Office of the EU© European Union, EUR-Lex. Reuse allowed with acknowledgement of the source (Commission Decision 2011/833/EU). Consolidated texts are under CC BY 4.0; the amendment markers (such as ►B and ►M1) are removed by Reliable Tools. Only the Official Journal text is authentic; consolidated versions are documentation.
legislation.gov.ukOpen Government Licence v3.0, Crown copyright. Retained EU law on legislation.gov.uk also credits © European Union, EUR-Lex.
uscode.house.govPublic domain (US government work)
eCFR bulk data on govinfo.govPublic domain (US government work). The annual CFR edition is the official legal edition.

The Actor reads only these official, public, keyless sources, follows their robots.txt rules and identifies itself with a contact in its user agent. It waits 5 seconds between requests to legislation.gov.uk, as its crawl-delay asks, and keeps that gap across runs as far as it can by storing the time of the last request in a shared store. It caches unchanged files so it asks each source as little as possible.

This Actor is not affiliated with or endorsed by the Publications Office of the EU, The National Archives, the Office of the Law Revision Counsel, the U.S. Government Publishing Office or the Office of the Federal Register.

FAQ

Is this the officially binding text? It is the text as published by the official source at the time of the run. For the EU, consolidated versions and for the UK, revised versions are documentation tools; the version published in the Official Journal or as enacted is authentic. The versionNote says which one you got. This is not legal advice.

Does it cover case law or court rulings? Not yet. This version returns statutes and regulations.

Does it cover German law? No. The official server gesetze-im-internet.de refuses connections from the Apify cloud, so German citations come back as source_unavailable and are not charged. EU, UK and US citations in the same run are not affected.

Does it cover US state law? No. The US is the U.S. Code and the CFR.

Can I cite the EU treaties (TFEU, TEU)? Not yet. Regulations, directives and decisions are covered.

Why did my UK citation take a few seconds? legislation.gov.uk asks crawlers to wait 5 seconds between requests, and the Actor respects that. Well-known acts (Companies Act 2006, Consumer Rights Act 2015, UK GDPR and others) skip the title search.

How current is the text? It is read live from the source on every run (with a short cache for large files). The UK updates within days of an amendment, the eCFR daily, the U.S. Code with each release point and EU consolidations usually some weeks after an amending act applies.

Something broke or a citation is not read correctly? Open an issue on the Issues tab and include the citation.

About Reliable Tools

This Actor is made by Reliable Tools. We build data tools that return clean, official data plus an AI score where it helps, so you can filter and act on the results straight away.

If a citation does not parse the way you expect or a field is missing, open an issue on the Issues tab. We read every one and usually reply within a day. You can find our other Actors on our profile page.