Make a GET request to any OpenFEC endpoint (e.g., /v1/candidates/) appending ?api_key=DEMO_KEY to test without registration; the DEMO_KEY works immediately but is subject to strict rate limits.
Note the rate limit headers (X-RateLimit-Limit, X-RateLimit-Remaining) in the response to observe how many requests remain under the DEMO_KEY quota.
Register for a free API key at api.data.gov/signup to obtain a personal key with a substantially higher rate limit than DEMO_KEY.
Replace DEMO_KEY with your registered key in requests; the higher limit allows production-scale querying across large datasets.
Paginate through results using the 'page' and 'per_page' query parameters; large datasets such as individual contributions require many paginated requests and benefit greatly from the higher registered-key limit.
Known gotchas
DEMO_KEY rate limits are shared across all users sending DEMO_KEY requests and are intentionally low — sustained or bulk use requires a registered key.
Registered keys from api.data.gov are shared infrastructure keys; treat them as sensitive, store them in environment variables, and do not commit them to source control.
Some OpenFEC endpoints require additional query parameters (e.g., a required cycle or committee_id) — omitting them returns a 400 error; consult the interactive API docs at api.open.fec.gov/developers for required vs. optional fields.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp