Bristol wants to become a “programmable city” and right at the end of last year Bristol City Council unveiled The Bristol API. Let’s take a look…

Bristol programmable city

The Bristol API

In 2015 Bristol City Council’s City Innovation team appointed the London-based software company Urban Things to build an API to give developers access to transport data for Bristol in real time (plus some other nice features like route planning).

It looks like a dig at the council to mention that the company hired to do this was a London company when I’m sure there are plenty of companies in Bristol that could have delivered this but actually Urban Things already have good experience and an established platform for managing bus data so hopefully BCC got a good price with our tax money because of that!

And, dear citizen, you can get access to the Bristol API here for free so don’t say the council never give you anything back!

What’s Inside

Once you sign up, your next step is to create an API key. Given the context of this blog, I’m going to assume you’re familiar with what that is. Then you’ve got a pretty good set of documentation with a few simple “getting started” examples and an interactive Swagger UI page where you can try out some GET and POST calls and see what comes back.

Bristol API Swagger UI

I bashed together a quick example page to show live parking data for Bristol using Angular. It should also show Bath data but that part seems to be broken right now – when I query for the “stops” I don’t get them returned to then query the data for each of them. It worked at the weekend but not now. Anyway, I’ll probably come back to this for more playing around but for now…

[UPDATE 21/03/16: After a bit of emailing with the Urban Things guys we found that the API call to get nearby stops had been updated to be in metres rather then km and so I needed to increase my radius number by 1000x. The example page is back to working again now.]

Over to you!

I look forward to seeing what people build with this. I’m sure Bristol City Council do too! But I’m also hopeful that this is only the first of a number of APIs in the works. It’s pretty easy to make the case that providing public transport information is both in the public good and helps with the council’s aspirations to reduce the environmental footprint of us Bristolians navigating our city but it’ll be nice to have some other data-sets to play with too!

P.S.

As a side note I started to get very confused while looking into all of this by how many groups and organisations are involved and trying to work out how they all fit together. I didn’t succeed with the latter part but I did start a list of useful links for Bristol data sources, APIs and tech companies.

P.P.S.

That image at the top is from a UoB ad campaign rather than being from Programmable City but it’s a nice image and hopefully my old uni won’t mind a free ad placement!

One Comment

  1. Hi Jon,

    I’m the head of platforms over at Urban Things. It’s great to see that you have picked up the Bristol API and are pulling some interesting data out.

    Regarding your issues with getting data for Bath, would you mind dropping us an email, and we can work out what is going wrong for you, and get it fixed up?

    Thanks,

    David

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>