Update: we've blogged more recently about the current state of APIs on GOV.UK.
Last week I talked about GOV.UK's APIs and how we use them to build and monitor the site. Now it's time to say a little more about what they mean for other developers who might want to use our content and data.
As with everything we do at GDS, our approach to APIs is driven by user need. Our core focus with APIs has been to approach them as a tool to help serve the vast majority of user needs that we're serving with web pages. But we know there are many opportunities to serve needs by working with other people to provide the right APIs.
The same APIs that GOV.UK uses internally are available to anyone using the site. For most of our content-rich pages you can get the full content of the page and some supporting information (such as which categories it lives in and whether it's designed for businesses) with a simple change of URL. So for:
As on the beta, we've included links in the page headers pointing to the API version. A similar approach works for getting search results.
There are still quite a few rough edges in these APIs (eg. a little inconsistency in some results and that annoying .json on the end of the URLs above). We've been so highly focussed on getting the main site ready that there's not been time to add the extra polish we'd like. Over the next couple of months we'll be making time to remove a few inconsistencies and pull together some documentation and an explorer to help developers find their way around.
What we really need now is feedback to help us understand the needs of those partners who might build things with our APIs. If you've got ideas or questions please do get in touch and help us shape the next iteration of GOV.UK APIs.