XML views of radio AOD availability
If you head over to
bbc.co.uk/radio/aod/availability/:network.xml then you will get an XML file (updated every 3 hours) with details about what’s available to listen to now and in the next 48 hours. So for example:
Will give you data about Radio 1 data [obviously]. The file contains a bunch of metadata about the episodes including details of the stream URLs.
What you will notice is that we’re not pointing you directly at the URLs for the audio instead we’re directing you to our ‘Media Selector’ which we use to maintain the availability window. So if you follow the media selector link you will get back a lump of XML with details of the available media. By the way you’ll want to use the
/mediaSelection/media/@encoding = real. Ignore the MP3 that’s a ‘secure’ stream used in iPlayer.
Programme schedules as XML, YAML, JSON and Text
Duncan has already written about his work to implement iCal views on the Radio Labs blog:
iCalendar is a standard for calendar data exchange. It is most notably used by Apple’s iCal application, Microsoft’s Outlook and Google Calendar, to import and export calendar information. We thought that some of the views in /programmes would also work well in the iCal format, so we have exposed a few for you to subscribe to, and play with.
These are available for your regular schedule and for genres [upcoming cricket programmes for example] and for individual programmes. For example:
Upcoming episodes of Eastenders
Upcoming (New) episodes of Eastenders
Episodes of Eastenders available to watch again
In addition to iCal you can also get this data as plain text, XML, JSON or YAML. So the upcoming drama programmes as XML can be found here:
Or the Radio 1 schedule as plain text as:
Artist pages as RDF
We’re busy doing a load of work on the music site right now which will be launching really soon. When we do in addition to lots of HTML we’ll also me making the data available for machines – including RDF. But if you are into this sort of thing here’s a sneaky peak at what will be released:
<?xml version="1.0" encoding="utf-8"?> <rdf:RDF xmlns:rdf = "http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs = "http://www.w3.org/2000/01/rdf-schema#" xmlns:foaf = "http://xmlns.com/foaf/0.1/" xmlns:mo = "http://purl.org/ontology/mo/" xmlns:mf = "http://purl.org/ontology/mo/mf#" xmlns:owl = "http://www.w3.org/2002/07/owl#" xmlns:time = "http://www.w3.org/2006/time#" xmlns:dc = "http://purl.org/dc/elements/1.1/" xmlns:timeline = "http://purl.org/NET/c4dm/timeline.owl#" xmlns:event = "http://purl.org/NET/c4dm/event.owl#"> <rdf:Description rdf:about="/music/artists/cc197bad-dc9c-440d-a5b5-d52ba2e14234.rdf"> <rdfs:label>Description of the artist Coldplay</rdfs:label> </rdf:Description> <mo:MusicGroup rdf:about="/music/artists/cc197bad-dc9c-440d-a5b5-d52ba2e14234#artist"> <foaf:name>Coldplay</foaf:name> <mo:image rdf:resource="/music/images/artists/7col_in/cc197bad-dc9c-440d-a5b5-d52ba2e14234.jpg" /> <mo:musicbrainz rdf:resource="http://musicbrainz.org/artist/cc197bad-dc9c-440d-a5b5-d52ba2e14234" /> <mo:homepage rdf:resource="http://www.coldplay.com/" /> <mo:fanpage rdf:resource="http://www.pleasureunit.com/coldplay/index.php" /> <mo:wikipedia rdf:resource="http://en.wikipedia.org/wiki/Coldplay" /> <mo:imdb rdf:resource="http://www.imdb.com/name/nm1095892/" /> <mo:myspace rdf:resource="http://www.myspace.com/coldplay" /> <mo:member rdf:resource="/music/artists/18690715-59fa-4e4d-bcf3-8025cf1c23e0#artist" /> <mo:member rdf:resource="/music/artists/d156ceb2-fd90-4e82-baea-829bbdf1c127#artist" /> <mo:member rdf:resource="/music/artists/6953c4db-7214-4724-a140-e87550bde420#artist" /> <mo:member rdf:resource="/music/artists/98d1ec5a-dd97-4c0b-9c83-7928aac89bca#artist" /> </mo:MusicGroup> <mo:SoloMusicArtist rdf:about="/music/artists/18690715-59fa-4e4d-bcf3-8025cf1c23e0#artist"> <foaf:name>Guy Berryman</foaf:name> </mo:SoloMusicArtist> <mo:SoloMusicArtist rdf:about="/music/artists/d156ceb2-fd90-4e82-baea-829bbdf1c127#artist"> <foaf:name>Jon Buckland</foaf:name> </mo:SoloMusicArtist> <mo:SoloMusicArtist rdf:about="/music/artists/6953c4db-7214-4724-a140-e87550bde420#artist"> <foaf:name>Will Champion</foaf:name> </mo:SoloMusicArtist> <mo:SoloMusicArtist rdf:about="/music/artists/98d1ec5a-dd97-4c0b-9c83-7928aac89bca#artist"> <foaf:name>Chris Martin</foaf:name> </mo:SoloMusicArtist> </rdf:RDF>
We would really welcome your feedback on any of this.
And finally a bit of URL hackery…
Our decision to use opaque IDs for our programmes [episodes, series and programme brands] means that we can provide persistent URL – which is a good thing. The downside is that you can’t guess the URL. To fix this you can now enter URLs like this:
That’s a disambiguation page for all programmes with Eastenders in the title. If however there’s just one programme with that title, like for example www.bbc.co.uk/programmes/chrismoyles then you will be redirected to that brand page (www.bbc.co.uk/programmes/b006wkqb).
Photo: Data storage - old and new, by Ian-s. Used under licence.