Skip to content

Get Regulation Content

GET /api/v1/regulations/{id}/content

Returns a slice of a regulatory document’s plain text along with the full Regulation Detail Object. Use offset/limit for random access. Document metadata and the table of contents are also available standalone through the Get Regulation Details.

NameInTypeDefaultDescription
idpathstringStable document id from a browse result
offsetqueryinteger0Byte position to start reading from (UTF-8 source). Min 0.
limitqueryinteger40000Max bytes to return. Min 1, max 40000.
{
"regulation": {
"id": "cmdoc_01HXZ3K4M7QR9VP2N8WYJF5GTB",
"category": "regulation",
"title": "Suspicious Activity Report Filing Requirements for Banks",
"authorities": ["fincen"],
"jurisdictions": ["us-federal"],
"description": "Part of the Bank Secrecy Act / Anti-Money Laundering (BSA/AML) framework...",
"updatedAt": "2026-04-09T00:00:00Z",
"sourceUrl": "https://www.ecfr.gov/current/title-31/...",
"totalBytes": 28400,
"tableOfContents": {
"entries": [
{ "id": "toc_a", "title": "(a) General", "level": 1, "startOffset": 0 }
]
},
"attributes": null
},
"content": {
"text": "§ 1020.320 Reports by banks of suspicious transactions.\n\n(a) General. (1) Every bank shall file with FinCEN...",
"startOffset": 0,
"endOffset": 28400,
"limit": 40000,
"totalBytes": 28400,
"hasMore": false
}
}

The response envelope contains a regulation object and a content object. See The Regulation Content Object for the nested content shape.

FieldTypeDescription
regulationobjectFull Regulation Detail Object for the document being read. Always present.
content.textstringUTF-8 plain text slice. Pre-extracted at ingest time with navigation chrome stripped.
content.startOffsetintegerByte position where this slice starts.
content.endOffsetintegerByte position where this slice ends. Use this as the next offset when content.hasMore is true.
content.limitintegerMax bytes requested.
content.totalBytesintegerTotal byte count of the full document text.
content.hasMorebooleantrue if more text is available after this slice.

Use offset-based paging to read through a document that exceeds the 40,000 byte limit:

Terminal window
curl "https://api.midlyr.com/api/v1/regulations/cmdoc_01HXZ3K.../content?offset=0&limit=40000"
curl "https://api.midlyr.com/api/v1/regulations/cmdoc_01HXZ3K.../content?offset=40000&limit=40000"

Continue setting offset to the prior response’s content.endOffset until content.hasMore is false.