Read Regulation Content API
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 Read Regulation API.
Parameters
Section titled “Parameters”| Name | In | Type | Default | Description |
|---|---|---|---|---|
id | path | string | — | Stable document id from a browse result |
offset | query | integer | 0 | Character position to start reading from. Min 0. |
limit | query | integer | 40000 | Max characters to return. Min 1, max 40000. |
Response
Section titled “Response”{ "id": "01HXZ3K4M7QR9VP2N8WYJF5GTB", "text": "§ 1020.320 Reports by banks of suspicious transactions.\n\n(a) General. (1) Every bank shall file with FinCEN...", "offset": 0, "limit": 40000, "totalBytes": 28400, "hasMore": false, "details": { "id": "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 }}Response Fields
Section titled “Response Fields”| Field | Type | Description |
|---|---|---|
id | string | Document id, echoed from the path |
text | string | UTF-8 plain text slice. Pre-extracted at ingest time with navigation chrome stripped. |
offset | integer | Character position this slice starts at |
limit | integer | Max characters requested |
totalBytes | integer | Total byte count of the full document text |
hasMore | boolean | true if more text is available after this slice |
details | object | Full Regulation Detail Object. Always present. |
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 character limit:
curl "https://api.midlyr.com/api/v1/regulations/01HXZ3K.../content?offset=0&limit=40000"curl "https://api.midlyr.com/api/v1/regulations/01HXZ3K.../content?offset=40000&limit=40000"Continue incrementing offset until hasMore is false.