PurchasingPolicy.orgPURCHASINGPOLICYBETA

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.
qsearch text, at least 2 characters
limitmax results, default 10, max 50
GET /api/v1/ego
An entity and its immediate connections, as nodes and edges.
identity UUID (required)
limitmax neighbour nodes, default 25, max 100
GET /api/v1/graph
The aggregated donor, PAC, and recipient flow graph used by the money-flow diagram.
sectorsector tag, for example crypto
partyD or R, filters person entities
limitmax donation flows, default 200
GET /api/v1/elections
Donor to PAC to candidate to result flows for a cycle, with summary counts.
yearelection year
statetwo-letter state code
officesenate or house
sectorsector 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.
chamberhouse or senate
tickerstock symbol
from, toISO dates bounding the transaction date
GET /api/v1/policy-events
Finance-sector policy events, each with the positions taken on it.
typevote, enforcement, or rulemaking
regulatorfed, occ, fdic, sec, cftc, cfpb, doj, treasury, fincen, fsoc, congress, other
sectorfinancial sector slug
from, toISO dates bounding the event date
limit, offsetpagination, 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}.