TheyWorkForYou API
convertURL function

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

Converts a parliament.uk Hansard URL into a TheyWorkForYou one, if possible.

Arguments

url (required)
The parliament.uk URL you wish to convert, e.g. http://www.publications.parliament.uk/pa/cm201415/cmhansrd/cm150128/debtext/150128-0002.htm#150128-0002.htm_spnew98

Example Response

{
    gid : "uk.org.publicwhip/debate/2006-07-11a.1352.2",
    url : "https://www.theyworkforyou.com/debates/?id=2006-07-11a.1311.0#g1352.2"
}

Example Use

This probably counts as "AJAX", though it doesn't use XMLHTTP, asynchronicity, or XML, only cross-site JavaScript... It's definitely Web 2.1, at least.

  • Hansard prettifier - drag this bookmarklet to your bookmarks bar, or bookmark it. Then if you ever find yourself on the official site, clicking this will try and take you to the equivalent page on TheyWorkForYou. (Tested in IE, Firefox, Opera.)

Explorer

Try out this function without writing any code!

url:
Output: