Get Regulation Content
GET /api/v1/regulations/{id}/contentReturns 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.
Parameters
Section titled “Parameters”| Name | In | Type | Default | Description |
|---|---|---|---|---|
id | path | string | — | Stable document id from a browse result |
offset | query | integer | 0 | Byte position to start reading from (UTF-8 source). Min 0. |
limit | query | integer | 40000 | Max bytes to return. Min 1, max 40000. |
Response
Section titled “Response”{ "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 }}Response Fields
Section titled “Response Fields”The response envelope contains a regulation object and a content object. See The Regulation Content Object for the nested content shape.
| Field | Type | Description |
|---|---|---|
regulation | object | Full Regulation Detail Object for the document being read. Always present. |
content.text | string | UTF-8 plain text slice. Pre-extracted at ingest time with navigation chrome stripped. |
content.startOffset | integer | Byte position where this slice starts. |
content.endOffset | integer | Byte position where this slice ends. Use this as the next offset when content.hasMore is true. |
content.limit | integer | Max bytes requested. |
content.totalBytes | integer | Total byte count of the full document text. |
content.hasMore | boolean | true if more text is available after this slice. |
Paging Through a Large Document
Section titled “Paging Through a Large Document”Use offset-based paging to read through a document that exceeds the 40,000 byte limit:
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.