KildareStreet API

getMP function

http://www.kildarestreet.com/api/getMP

Fetch a particular MP.

Arguments

postcode (optional)
Fetch the MP for a particular postcode (either the current one, or the most recent one, depending upon the setting of the always_return variable.
constituency (optional)
The name of a constituency; we will try and work it out from whatever you give us. :)
id (optional)
If you know the person ID for the member you want (returned from getMPs 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 MP, even if the seat is currently vacant.

Example Response

<twfy>
  </twfy>

Explorer

Try out this function without writing any code!

id:
constituency:
postcode:
always_return:
extra:
Output: