TheyWorkForYou API
getMS function

https://www.theyworkforyou.com/api/getMS

Fetch a particular MS.

Arguments

postcode (optional)
Fetch the MSs for a particular postcode.
constituency (optional)
The name of a constituency.
id (optional)
If you know the person ID for the member you want (returned from getMSs or elsewhere), this will return data for that person.
always_return (optional)
For the postcode and constituency options, sets whether to always try and return an MS (due to e.g. the period before an election when there are no MSs).

Example Response

<twfy>
  </twfy>

Explorer

Try out this function without writing any code!

id:
constituency:
postcode:
always_return:
Output: