skip to content

Data feeds of newly elected MPs from

We will be providing a data feeds of newly elected MPs from

Here’s a technical post about our plans. Contact us if you would like to build something from our data, or see below.

mySociety just blogged about our joint plans to update as the election results come in over night on the 7th and 8th of May.

As well as updating TheyWorkForYou in real time, YourNextMP will get updated and the data that powers it will too.

We will expose this for reuse in a few ways:

Home page

Results will also be shown on the homepage of YourNextMP, and candidate and constituency pages will show the winners.


We will be tweeting on @democlub every time the Atom feed is updated.


The CSV export will have a new column elected with the same logic as above. This file is updated every 15 minutes


The PopIt API people objects will be updated to have a new key in the standing_in.2015 object. If the key is true the person has been elected, if it’s false the person is known not to have been elected (because someone else in that constituency got elected).

If the key doesn’t exist then we don’t have the results for that constituency yet.

The winner will also have a new membership created like:

    'start_date': '2015-05-08',
    'end_date': '9999-12-31',
    'organization_id': 'commons',
    'post_id': ...,
    'person_id': ...

… where post_id and person_id as as for their 2015
candidate membership. (n.b. this is actually broken at the
moment, but I’ll have it fixed soon).

Atom feed

We will publish an Atom feed with the results, updated as we press the button. This will be published at /results/all.atom and will have the following custom fields:


The MapIt area ID, which we use as constituency ID


The PopIt person ID of the winner in that constituency


The name of the winning candidate


The party ID of the winner’s party, as used on YourNextMP
(these are derived from the Electoral Commission’s IDs
except in a few cases: joint parties, independents and the
speaker seeking re-election.


The human readable party name


The user ID of the YourNextMP volunteer who recorded the result


The human readable name of the constituency


Our source for the result (presumably BBC TV coverage in most cases)


If present, this is a URL template for getting a thumbnail
image of the candidate. You should replace {width} and
{height} with the required width and height (you can just
fix one of them by setting the other to 0) and {extension}
with ‘jpg’ or ‘png’.


If present, that means that this person had that ID in
TheyWorkForYou / PublicWhip / parlparse before this

Get in touch:

Jump into the online chat in Slack, tweet us, or email