Skip to main content
GET
Preview. This endpoint is available to organisations in the Wordsmith MCP pilot. Other organisations receive 403 mcp_not_enabled. See the preview overview.
Returns the text of a judgment, statute or rulemaking document found with Search Research Sources. Take source and document_id from a search result. Long documents come back in pages of text. Each call returns up to max_chars characters, starting at offset. When text_truncated is true, more text follows: call again with offset set to next_offset. The call is synchronous and fetches from the source on demand, so it can take a few seconds. Each call fetches the whole document again. What text holds depends on the source:
  • uk_case_law: the judgment’s paragraphs. uk_legislation: the provisions’ text.
  • courtlistener: the opinion’s text. moonlit: the document as Markdown.
  • eur_lex: the act’s English text. nz_legislation: the version’s text.
  • federal_register: the document’s plain text. regulations_gov: the document’s details and summary only; the body is a posted file.
  • sec_edgar cannot be read here. Open the search result’s url.

Authentication

Send an API key, or an OAuth access token with the research:read scope, as a bearer token in the Authorization header. A token without the scope gets 403 with "error": "insufficient_scope".

Path parameters

string
required
The source id from the search result, such as uk_case_law. See Sources.

Query parameters

string
required
The document id from the search result. URL-encode it: some ids contain /, which becomes %2F.
integer
default:"0"
The character to start from. 0 or greater.
integer
default:"20000"
The most characters to return, from 1 to 100000.

Response

string
The source id.
string
The document’s id at the source.
string
The case name or the instrument’s title. For EUR-Lex, the title comes from a separate lookup; when that lookup fails or takes more than 5 seconds, the title is EUR-Lex <CELEX> and date is null, and the text is still returned.
string | null
The neutral or reporter citation, or CELEX number, when the source gives one.
string | null
ISO 8601: a full date where the source gives one, else the year.
string | null
The document’s public page at the source.
string
This page of the text.
boolean
true when more text follows this page.
integer | null
Pass as offset to read on. null on the last page.

Errors

See Errors for the error format.