BBC Clifton API JSON data (attn: Martin Powell)

Mike Ralphson mike.ralphson at gmx.com
Fri Dec 1 02:24:01 PST 2017


As we got shown the door at the forum, I hope it's not too off-topic to post this here.
 
To clarify, this data is not mine or generated by me, it comes straight from the BBC's replacement for the data sources they shut down back in April/May. It *could* be used by get_iplayer to reinstate the lost category information, should the maintainer so wish.
 
Using the BBC's normal category names, it's possible to get a list of all currently available PIDs for that category by fetching the data from a URL such as:
 
http://clifton.api.bbci.co.uk/aps/programmes/genres/drama/scifiandfantasy/player/episodes.json
 
I'd suggest using cURL or wget to fetch the data, but you should be able to save it from a browser.
 
If you need a list of categories, they're available here:
 
http://www.bbc.co.uk/programmes/genres.json
 
As the JSON output is somewhat difficult to read (especially if it's all on one line), I'd suggest using the jq programme (https://stedolan.github.io/jq/) to query / reformat it.
 
An example of the syntax is:
 
jq '. | .episodes[].programme | .pid+","+.display_titles.title+","+.title' scifi.json
 
cURL, wget and jq are all available for Windows, Mac and Linux.
 
Cheers, Mike



More information about the get_iplayer mailing list