1API access
Your personal key from the API docs page. Keep it private — it identifies you.
The API does not publish CORS headers, so a browser may block direct calls (almost certainly when this file is opened from file://). If step 2 fails with a network error, serve this file over HTTP or put a proxy above. A {url} token is replaced with the URL-encoded target; without the token the proxy string is used as a plain prefix.
2Choose your issues
Load every policy ("issue") tracked on the site, then narrow by year, search and stance.
The policies endpoint only exposes last_edited_at — there is no field for when a policy's divisions took place. The year window filters on that edit date, so treat it as "issues worked on in this period", not "issues voted on in this period".
3Find your best-matching MPs
Fetches all current members, then one request per selected issue to pull every member's agreement score.
● match — meets your strictness ● leans your way but below strictness ● voted against your stance ● no voting record on this issue