Getting Started
Everything you need to start using the OCPF Public API.
Base URL
All API requests should be made to:
https://api.ocpf.us
For example, to search report items:
Authentication
No authentication is required. All data served by the OCPF Public API is public record. There are no API keys, tokens, or sign-up steps — just start making requests.
Response Format
All responses are JSON with the following conventions:
- Property names use camelCase (e.g.,
firstName,reportItemType) - Dates are ISO 8601 strings (e.g.,
"2024-03-15T00:00:00") - Null values are included in responses (not omitted)
- Content-Type is
application/json
Pagination
List and search endpoints support pagination with these query parameters:
| Parameter | Type | Description |
|---|---|---|
pageSize |
integer | Number of results per page (default varies by endpoint) |
currentIndex |
integer | Page number, 1-based |
withSummary |
boolean | Set to true to include a summary object with total counts |
When withSummary=true, the response includes:
Common Workflows
1. Find a Filer
Search for candidate committees by name, then get full details using the CPF ID.
Step 1: Search for filers named "Smith" among candidate type ("C"):
Response (truncated):
Step 2: Get full filer details using the CPF ID:
2. Search Contributions
Find all contributions from donors named "Jones" during 2024:
Or in JavaScript:
3. Get Reports for a Filer
Retrieve the list of report types filed by a filer, then get the individual reports.
Step 1: Get available report types for the filer:
Response:
Step 2: Get the list of filed reports for a specific type:
Data Export
Several search endpoints support exporting results in different formats. Use the export-specific endpoints to download data as:
- Text — tab-delimited text files
- Excel — .xlsx spreadsheet files
- PDF — formatted PDF reports
The export endpoints mirror the search parameters:
search/textOutput— tab-delimited textsearch/excelOutput— Excel spreadsheetsearch/pdfOutput— PDF report
See the API Reference for full parameter details.
Endpoint Categories
| Category | Description | Example Endpoints |
|---|---|---|
| Filers | Search and look up registered filers | filers/listings/{category}, filer/{cpfId} |
| Reports | Campaign finance filings and report details | reports/reportList/{cpfId}, report/pdf/{reportId} |
| Search | Search contributions, expenditures, and other report items | search/items, search/textOutput |
| Elections | Election chart data and aggregate totals | chartData/electionChart, chartData/monthly |
| Legal | Laws, guidance letters, agency actions, and nonfiler lists | legal/law/{section}, legal/gls, legal/nonfilers |
| Municipal | Town-level campaign finance data | municipalities, municipalityList/options |
| Content | News, events, filing deadlines, newsletters, and forms | news/recent, filingDeadlines, forms/all |
| Reference | Lookup values for offices, districts, and filing schedules | filingSchedules/{year}, municipalityList/options |
See the full interactive documentation at the API Reference.
Rate Limits & Usage
There are no formal rate limits at this time. However, please be respectful of shared resources:
- Add reasonable delays between bulk requests
- Use pagination instead of requesting very large result sets
- Cache results on your end when possible
- If you plan to make a large number of requests, consider reaching out to ocpf.us first
API key support for rate limiting may be introduced in a future update.
Ready to explore?
Open the interactive API Reference to try out endpoints directly in your browser, or head back to the Developer Portal home page.