Skip to content

Read Regulation Content API

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 Read Regulation API.

NameInTypeDefaultDescription
idpathstringStable document id from a browse result
offsetqueryinteger0Character position to start reading from. Min 0.
limitqueryinteger40000Max characters to return. Min 1, max 40000.
{
"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
}
}
FieldTypeDescription
idstringDocument id, echoed from the path
textstringUTF-8 plain text slice. Pre-extracted at ingest time with navigation chrome stripped.
offsetintegerCharacter position this slice starts at
limitintegerMax characters requested
totalBytesintegerTotal byte count of the full document text
hasMorebooleantrue if more text is available after this slice
detailsobjectFull Regulation Detail Object. Always present.

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

Terminal window
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.