API
The pages on this site are built on a small set of read-only JSON endpoints. They are public and can be called directly. No key is required at present. Responses are served from the same database as the site, so a figure returned here matches what the page shows.
Endpoints and fields may change without notice while the site is in beta. If you build on them, get in touch through the contact address on the About page so we can warn you before a breaking change.
Endpoints
- GET /api/v1/search
- Entity name search, used for autocomplete.
q search text, at least 2 characters limit max results, default 10, max 50 - GET /api/v1/ego
- An entity and its immediate connections, as nodes and edges.
id entity UUID (required) limit max neighbour nodes, default 25, max 100 - GET /api/v1/graph
- The aggregated donor, PAC, and recipient flow graph used by the money-flow diagram.
sector sector tag, for example crypto party D or R, filters person entities limit max donation flows, default 200 - GET /api/v1/elections
- Donor to PAC to candidate to result flows for a cycle, with summary counts.
year election year state two-letter state code office senate or house sector sector tag - GET /api/v1/geo
- Donation totals by US state, for money originating in and flowing to each state.
- GET /api/v1/insider-trading
- Congressional stock transactions grouped by member.
chamber house or senate ticker stock symbol from, to ISO dates bounding the transaction date - GET /api/v1/policy-events
- Finance-sector policy events, each with the positions taken on it.
type vote, enforcement, or rulemaking regulator fed, occ, fdic, sec, cftc, cfpb, doj, treasury, fincen, fsoc, congress, other sector financial sector slug from, to ISO dates bounding the event date limit, offset pagination, limit default 50, max 200 - GET /api/v1/policy-events/{slug}
- One policy event with positions, evidence, and tracked spending in its window.
- GET /api/v1/health
- Liveness check.
Example
curl "https://www.purchasingpolicy.org/api/v1/search?q=fairshake&limit=5"
Entity IDs returned by search can be passed to the ego endpoint, and correspond to the entity pages at /entity/{id}.