Find the right constituency
The Pages Function looks up a postcode, resolves the parliamentary constituency, and returns the current MP in a normalised JSON shape with Parliament links when they are available.
Use the built-in postcode lookup to identify the correct MP, review a suggested message, and copy it into the contact route you want to use.
This lookup uses Cloudflare Pages Functions for the API layer while keeping the rest of the site static-first.
The Pages Function looks up a postcode, resolves the parliamentary constituency, and returns the current MP in a normalised JSON shape with Parliament links when they are available.
The starter gives supporters a suggested subject and body they can copy into the contact route they decide to use.