TheyWorkForYou API
getLords function

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

Fetch a list of Lords.

Arguments

date (optional)
Fetch the list of Lords as it was on this date. Note our from date is when the Lord is introduced in Parliament.
party (optional)
Fetch the list of Lords from the given party.
search (optional)
Fetch the list of Lords that match this search string in their name.

Example Response

<twfy>
    <match>
        <member_id>100003</member_id>
        <person_id>13375</person_id>
        <name>Lord Acton</name>
        <party>Labour</party>
    </match>
    <match>
        <member_id>100060</member_id>
        <person_id>12981</person_id>
        <name>Lord Blyth of Rowington</name>
        <party>Conservative</party>
    </match>
    ...

Explorer

Try out this function without writing any code!

date:
party:
search:
Output: