OCPF Public API

Free, open access to Massachusetts campaign finance data. Search contributions, look up filers, and explore public filings.

Getting Started API Reference

No Authentication Required

All endpoints are open. No API keys, no sign-up — just start making requests.

JSON Responses

Clean, consistent JSON with camelCase property names and ISO date formats.

49 Documented Endpoints

Covering filers, reports, contributions, expenditures, elections, and more.

What You Can Do

Search Contributions

Find individual contributions by donor name, date range, amount, or recipient filer.

Look Up Filers

Search for candidates, PACs, and committees by name, CPF ID, or filer type.

View Reports

Access campaign finance filings with summary totals and detailed line items.

Export Data

Download search results as text, Excel, or PDF for offline analysis.

Quick Example

Base URL: https://api.ocpf.us

Search for contributions from donors named "Smith" in 2024:

fetch('https://api.ocpf.us/search/items?name=Smith&startDate=2024-01-01&endDate=2024-12-31&pageSize=5&withSummary=true') .then(r => r.json()) .then(data => console.log(data));

Response:

{ "summary": { "count": 5, "total": 1247 }, "items": [ { "firstName": "John", "lastName": "Smith", "amount": 500.00, "date": "2024-03-15T00:00:00", "filerName": "Committee to Elect Jane Doe", "reportItemType": "Receipt" }, ... ] }

Ready to Get Started?

Read the guide for common workflows and code examples, or jump straight into the interactive API reference.

Read the Guide Explore the API