Legislation & Law Text API: Exact Statute Text (EU, UK, US)
Pricing
from $4.25 / 1,000 provision returneds
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
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
15 hours ago
Last modified
Categories
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.
| Jurisdiction | What you can cite | Official source |
|---|---|---|
| European Union | Regulations, 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 Kingdom | Acts 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 States | U.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
| Field | What it is |
|---|---|
status | found, repealed, not_found, ambiguous, invalid_citation, unsupported or source_unavailable |
citation | The citation in a normalised form, for example Art. 6(1)(f) Regulation (EU) 2016/679 |
jurisdiction | EU, UK or US (DE only on rows marked source_unavailable) |
provision, heading | The article, section or paragraph and its official heading |
actTitle, actShortName, actId | Official title of the act, abbreviation or type, and its identifier (CELEX number, legislation.gov.uk path, U.S.C. title or CFR part) |
text | The exact text of the provision, one block per line in the official order |
paragraphs | The same text split into its numbered paragraphs (1, 2, 3 or (a), (b)) |
pinpoint, pinpointText | The pinpoint you cited and only its text |
answer | For a question: the passages that answer it, each with the line, its paragraph path and an evidence score from 0 to 1 |
versionDate, versionDateMeaning, versionNote | The version date and what it means at that source (see below) |
inForce | Whether the act or provision is in force at the source |
sourceUrl, dataUrl | The official page of the provision and the machine-readable file that was read |
licence, sourceName | The source and its reuse terms |
amendmentNotes | Amendment, commencement, repeal or authority notes published with the provision |
eli | European Legislation Identifier of the version (EU) |
parse | How the citation was read: by rules, or by an AI pick among several matching acts, with the candidates |
note | Plain-language notes, for example why a row was not found |
disclaimer | The not-legal-advice note, on every row |
What the version date means
| Source | versionDate is |
|---|---|
| EU | The 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. |
| UK | The date from which this version of the provision applies |
| U.S. Code | The enactment date of the last public law included in the current release point |
| CFR | The latest amendment date stated in the eCFR title file (versionNote also gives the date of the data file) |
How to run it
- Open the Actor and put citations into Citations, one per line.
- To ask a question about a citation, write it after
|, for exampleArt. 17 GDPR | When must personal data be erased?. Or use Question for all citations to ask the same question of every citation. - Pick the language for EU law if you want a language other than English.
- 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
| Status | When | Charged |
|---|---|---|
found | The provision exists and its current text is returned | Yes |
repealed | The 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 it | Yes |
not_found | The act exists but the provision does not (for example a CFR section that was removed), or the act number is unknown | No |
ambiguous | An abbreviation matches several acts and the context does not decide it. The candidates are listed so you can add the act number | No |
invalid_citation | The citation could not be read | No |
unsupported | A citation type that is not covered, such as a whole CFR part | No |
source_unavailable | The official source did not answer. Retry later | No |
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
- Code fetches the official provision and numbers every line of it.
- 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.
- Code quotes those lines verbatim from the official text and returns their evidence scores. If the provision does not
address the question,
answer.statusisnot_in_this_provisionand 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:
- The agent collects the citations it needs ("Art. 6 GDPR", "26 U.S.C. § 162").
- It calls the Actor with each citation, optionally with a short question to select the relevant lines.
- It quotes
textoranswer.passagesword for word and linkssourceUrlwith theversionDate. - If a row comes back
repealed,not_foundorambiguous, 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.
| Event | Price |
|---|---|
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
| Source | Licence |
|---|---|
| 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.uk | Open Government Licence v3.0, Crown copyright. Retained EU law on legislation.gov.uk also credits © European Union, EUR-Lex. |
| uscode.house.gov | Public domain (US government work) |
| eCFR bulk data on govinfo.gov | Public 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.