API Documentation
JSON API for accessing federal regulatory data programmatically.
Overview
Base URL: https://regometer.com/api/v1
Format: JSON only
Authentication: None required (public API)
Rate Limiting: None currently
Agencies
List All Agencies
GET /api/v1/agencies
Returns a list of all federal agencies with basic information and latest statistics.
Example Response:
{
"agencies": [
{
"id": 1,
"name": "Environmental Protection Agency",
"slug": "epa",
"display_name": "EPA",
"short_name": "EPA",
"latest_word_count": 1234567,
"word_count_growth_1_year": 2.5,
"word_count_growth_5_year": 15.3
}
],
"total": 150
}
Get Single Agency
GET /api/v1/agencies/:id
Returns detailed information for a specific agency, including content hash.
Example Response:
{
"agency": {
"id": 1,
"name": "Environmental Protection Agency",
"slug": "epa",
"display_name": "EPA",
"short_name": "EPA",
"latest_word_count": 1234567,
"word_count_growth_1_year": 2.5,
"word_count_growth_5_year": 15.3,
"content_hash": "abc123def456...",
"parent_agency_id": null
}
}
Get Agency Statistics
GET /api/v1/agencies/:id/stats
Returns comprehensive statistics for a specific agency.
Example Response:
{
"agency": {
"id": 1,
"name": "Environmental Protection Agency",
"slug": "epa",
"display_name": "EPA",
"short_name": "EPA",
"latest_word_count": 1234567,
"word_count_growth_1_year": 2.5,
"word_count_growth_5_year": 15.3
},
"stats": {
"latest_word_count": 1234567,
"word_count_growth_1_year": 2.5,
"word_count_growth_5_year": 15.3,
"content_hash": "abc123def456...",
"chapters_count": 5,
"snapshots_count": 20,
"earliest_snapshot": "2020-01-15",
"latest_snapshot": "2025-01-15"
}
}
Topics
List All Topics
GET /api/v1/topics
Returns a list of all regulatory topics with section counts and word counts.
Example Response:
{
"topics": [
{
"id": 1,
"name": "Environmental Protection",
"slug": "environmental-protection",
"sections_count": 2541,
"latest_word_count": 5432100
}
],
"total": 20
}
Get Single Topic
GET /api/v1/topics/:id
Returns detailed information for a specific topic, including description and keywords.
Example Response:
{
"topic": {
"id": 1,
"name": "Environmental Protection",
"slug": "environmental-protection",
"sections_count": 2541,
"latest_word_count": 5432100,
"description": "Environmental and pollution regulations...",
"keywords": ["environment", "environmental", "pollution", "emission"]
}
}
Get Topic Statistics
GET /api/v1/topics/:id/stats
Returns comprehensive statistics for a specific topic.
Example Response:
{
"topic": {
"id": 1,
"name": "Environmental Protection",
"slug": "environmental-protection",
"sections_count": 2541,
"latest_word_count": 5432100
},
"stats": {
"sections_count": 2541,
"latest_word_count": 5432100,
"snapshots_count": 15,
"earliest_snapshot": "2020-01-15",
"latest_snapshot": "2025-01-15",
"growth_percent": 12.5
}
}
Code Examples
cURL
curl https://regometer.com/api/v1/agencies
JavaScript (fetch)
fetch('https://regometer.com/api/v1/agencies')
.then(response => response.json())
.then(data => console.log(data));
Python
import requests
response = requests.get('https://regometer.com/api/v1/agencies')
data = response.json()
print(data)
Error Handling
All errors return JSON with an error message and appropriate HTTP status code.
404 Not Found
{
"error": "Agency not found"
}
Common Status Codes
200- Success404- Resource not found422- Unprocessable entity
Data Notes
- Word Counts: Represent total words across all CFR sections managed by the agency
- Growth Rates: Calculated as percentage change from historical snapshots (1-year and 5-year)
- Content Hash: MD5 checksum of all regulatory content, useful for detecting changes
- Topics: Cross-cutting regulatory domains identified using FTS5 full-text search with BM25 ranking
- Snapshots: Historical data points captured from eCFR XML snapshots