API Documentation
All API requests require authentication using an API key. Include your API key in the X-API-Key
header with every request.
X-API-Key: YOUR_API_KEY
All API endpoints are relative to the base URL: https://usconstitutionapi.com
Returns a list of all available documents (Constitution and Bill of Rights).
No parameters required.
[ { "id": 1, "title": "The Constitution of the United States", "description": "The founding document of the United States of America", "created_at": "2025-01-01T00:00:00.000Z" }, { "id": 2, "title": "Bill of Rights", "description": "The first ten amendments to the United States Constitution", "created_at": "2025-01-01T00:00:00.000Z" } ]
Returns a specific document by its ID.
Parameter | Type | Description |
---|---|---|
document_id | integer | The ID of the document to retrieve |
{ "id": 1, "title": "The Constitution of the United States", "description": "The founding document of the United States of America", "created_at": "2025-01-01T00:00:00.000Z", "sections": [ { "id": 1, "section_type": "preamble", "number": null, "title": "Preamble", "content": "We the People of the United States, in Order to form a more perfect Union...", "parent_id": null }, ... ] }
Returns a specific amendment by its number (roman numeral).
Parameter | Type | Description |
---|---|---|
amendment_number | string | The amendment number (roman numeral, e.g., I, II, III) |
{ "id": 36, "document_id": 3, "section_type": "amendment", "number": "I", "title": "Amendment I.", "content": "Congress shall make no law respecting an establishment of religion, or prohibiting the free exercise thereof; or abridging the freedom of speech, or of the press; or the right of the people peaceably to assemble, and to petition the government for a redress of grievances.", "parent_id": null }
Searches document content for a specific query term.
Parameter | Type | Required | Description |
---|---|---|---|
query | string | Yes | The search term or phrase |
document_id | integer | No | Filter by document ID |
section_type | string | No | Filter by section type (article, amendment, etc.) |
[ { "document_id": 3, "document_title": "Bill of Rights", "section_id": 36, "section_type": "amendment", "section_number": "I", "section_title": "Amendment I.", "content": "Congress shall make no law respecting an establishment of religion, or prohibiting the free exercise thereof; or abridging the freedom of speech, or of the press; or the right of the people peaceably to assemble, and to petition the government for a redress of grievances." }, ... ]
View the complete API specification below: