Skip to main content
The API returns rendered text from the body endpoint, plus links to the original files the publisher hosts. Any field may be 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, plain and content are null and available is false.
  • sourceUrl points at the official copy where we may link to it.
  • Nothing is charged, and a retry returns the same answer.
Search results and batch rows carry the same two fields, with 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.
If you feed sections to a model, use content. The full body can lead a model to quote an old amendment note as the law in force.CFR and the state corpora have no such split. All three fields are null there, and plain is the whole body.

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

Cite sourceUrl, not source. It is null when we hold no official link for the section.

Tables and images

When source 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:
A section with no marked subsections returns subsections: [], and markdown equals the plain text.

Source URL fields

Search results, section records and batch items carry these link fields. Any may be null. 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.
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.

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.
Last modified on November 22, 2026