null when the source does not offer that format.
Text from the body endpoint
GET /us/statutes/section/{actId}/body returns the section’s text in several forms at once.
Check
available first.
When bodyUnavailable is true
html,plainandcontentarenullandavailableisfalse.sourceUrlpoints at the official copy where we may link to it.- Nothing is charged, and a retry returns the same answer.
body set to null.
Law and notes in USC
For USC sections,plain and html hold the operative text, then the credit line, then the notes (historical notes, committee reports, amendments). Most of the body is often notes.
Use content for the operative text only, sourceCredit for the credit line and notes for the rest.
Choosing what comes over the wire: format
format selects which representations are returned.
Every value costs the same. The choice only changes payload size.
tables and figures come back with every value, because they describe the text you received.
markdown is opt-in because it is a third full copy of the text.
Ask for it when you want images and tables as Markdown, for example to feed a model or a Markdown renderer.
Check content for null and fall back to plain if you are not sure which corpus you have.
Citing where the text came from
CitesourceUrl, not source. It is null when we hold no official link for the section.
Tables and images
Whensource is r2_render, tables and images stay where the publisher printed them, in html, markdown and plain, and tables and figures list them.
See Tables and images for where they appear, the image fields and the hosted image files.
Point-in-time text: asOf
Pass asOf=YYYY-MM-DD to get the text as it stood on that date, at the same price.
The response has an asOf block that says which version you hold.
See Point-in-time law for how to read asOf.isBounded before citing the text.
Structured text and pincites
Pass?structured=true to GET /us/statutes/section/{actId}/body for two more fields, at no extra cost:
Each node in
subsections has these fields:
subsections: [], and markdown equals the plain text.
Source URL fields
Search results, section records and batch items carry these link fields. Any may benull.
stateHtmlUrl, govInfoHtmlUrl and govInfoPdfUrl are null on much of the corpus.
source is not a link. It names a sub-source inside a multi-source corpus, for use as a search filter.
Where a state publishes its official text only through a commercial platform, sourceUrl and externalUrl are null, and licenseNote says a link exists.
Publishers that need a browser
Publishers that need a browser
The Texas Administrative Code is published only through a JavaScript portal. Its link opens in a browser but returns an empty page to
curl.
To confirm a Texas section without a browser, use adoptingCitations (for example 50 TexReg 8285) and read the text at textUrl.Picking the best available format
Use the first field that is present, in this order:sourceUrl, govInfoHtmlUrl, stateHtmlUrl, htmlUrl, govInfoPdfUrl, pdfUrl, textUrl, xmlUrl, docxUrl, externalUrl.
Helper that applies this order
Helper that applies this order
Related
Section identifiers
How to get an actId and fetch a section’s metadata and body.
Corpus types
The corpusType tokens you filter a search by.

