Public API
The same data as the site, as JSON, with no key and no account. Free reuse, citing the source (National Assembly, Licence Ouverte) and this site.
Endpoints
GET /api/v1/deputies?query=&group=&department=&state=current|former|all&page=
GET /api/v1/deputies/{slug}
GET /api/v1/deputies/{slug}/votes?topic=&from=&to=&position=&page=
GET /api/v1/scrutins?query=&topic=&from=&to=&outcome=&type=&group=&page=
GET /api/v1/scrutins/{legislature}/{number}
GET /api/v1/topics
GET /api/v1/topics/{slug}
GET /api/v1/questionnaire
POST /api/v1/compare
POST /api/v1/reportsFormat
Lists are paginated by 50 (`page` from 1) and return `total`. Dates are YYYY-MM-DD. An error returns an HTTP status and an `error` object with `code` and `message`.
Positions are `POUR` (for), `CONTRE` (against), `ABSTENTION`, `NON_VOTANT_EXPLICITE` (non-voting), or `null` when the deputy was sitting but on no list. The name of the official list comes with each position.
With `group` (a group’s official identifier, as in `GET /api/v1/deputies`), the list of votes keeps those held while the group had a deputy in office, and each vote carries `groupMembers`: what the group’s members did that day, never a position of the group. An unknown identifier returns the `bad_group` error.
A group carries `color`, the colour the Assemblée nationale associates with it, as `#RRGGBB`, or `null` when it publishes none.
Requests are rate limited; please cache rather than poll.