TheyWorkForYou API
getConstituency function

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

Fetch a UK Parliament constituency.

Arguments

name
Fetch the data associated to the constituency with this name.
postcode
Fetch the constituency with associated information for a given postcode.

Example Response

{ "name" : "Manchester, Gorton" }

Explorer

Try out this function without writing any code!

name:
postcode:
Output:

Output

URL for this: https://www.theyworkforyou.com/api/getConstituency?name=edinburgh+south&output=js

{
  "bbc_constituency_id" : "695",
  "guardian_election_results" : "http://www.guardian.co.uk/politics/constituency/919/edinburgh-south",
  "guardian_id" : "919",
  "guardian_name" : "Edinburgh South",
  "pa_id" : "230",
  "name" : "Edinburgh South"
}