API Thoughts

Our medium to long term plans for Public Whip are to introduce an API (Application Programming Interface: if you don’t recognise the term, you can just gloss over this whole post) to help third parties integrate with Public Whip – without having to “screen scrap” the content. An example of a service currently utilising the content is “Keep track of how your MP votes” Boxee application.

Things we’d like to know:

  • What format of data would you prefer the data: CSV, TSV, XML, JSON, SQL, other?
  • How would you prefer to access it: SOAP, REST, HTTP GET, HTTP POST, data download (we do currently offer this!), other?
  • How often would you like to refresh the data: weekly, daily, hourly, “as live as possible”?
  • What sort of information would you like to be able to access?
  • Would you prefer, in the first instance, “documents” or “code” integration guides?
  • Would this be for a commercial or “open source/free access” project
  • What sort of volume of requests would you expect to push to us? (And would it be possible to introduce caching/proxying your end)
  • Would you like to “push” data to us? If so, what sort (comments, policy division revisions, etc etc)
  • Anything else you think relevant :-)

Basically, we’d just like to hear from you how you would like to use the data. At the moment, we’re not going to make any guarantees about anything, but if we can get ideas from YOU then we may be able to start making plans…

4 thoughts on “API Thoughts

  1. Glad you’re thinking about this. It was only the other week I thought id love to write a WordPress plugin that auto-posts votes to a custom post type! Wed use it on lichfieldlive.co.uk and hopefully other local sites could use it too.

    So, to answer your questions;
    – JSON, XML, CSV, maybe even serialised PHP
    – REST
    – as live as possible of course :) (rate-limited, maybe?)
    – as much as possible (surprise, surprise) but crucially, each vote per MP and rebel or not plus overall vote and description (important for explaining)
    – code integration guides
    – personally, open-source & free
    – once a day with caching seems fair
    – not personally, no

    Cheers!

  2. I’d love to get email updates on which way my MP votes – it would be nice to have this as live as possible, but personally I’d once a day email updates.

    The info that would be useful is which way a certain MP votes, the generalised topic, maybe a more specific description on what they voted on, etc.

    Keep up the good work :)

  3. Hi,

    Currently the “Your MP” Boxee app screen scrapes but it would be much easier if I could get hold of the data in XML or JSON format through a REST interface. This app runs on the user’s own machine (or Boxee Box) so it would be great if the communication could be between that machine and PublicWhip without the need for the user to set up their own API key or anything as this might put potential users off (although this might change in future as I am thinking about turning the app into a webapp to reach more platforms).

    Pushing data back to you could mean in interesting opportunity for users to “like” or comment on votes. If there was a centralised way to do this on your platform then any app that talks to it could implement this idea and that would be very interesting to see what the feedback was like. Maybe even the MP could comment on why they voted that way.

    Maybe in the future some time it could be interesting as well to make PublicWhip data available in Linked Data store with a SPARQL (http://en.wikipedia.org/wiki/SPARQL) endpoint. This could open up lots of new opportunities to integrate PublicWhip data with a lot of other datasets (e.g. those found at http://data.gov.uk/linked-data). Probably best to work on a REST API first though!

    Thanks for all of the work you are doing on PublicWhip – it is great to see this very important website continue.

  4. Hi. An API would be excellent. JSON format would be a must I would think, XML too – the other formats would be pretty easy to provide but probably not as popular.

    I expect getting this via HTTP GET would suit most applications.

    Cheers.

    Ben

Comments are closed.