Getting data out of DirectGov

Mashing up Direct GovOn Saturday at BarCampUKGovWeb I asked whether it was possible to use the data from DirectGov to direct website users to their local government services, without needing to send them via the pretty orange pages of

Thanks for a tip-off from Paul Clarke, I got in touch with Andy Key from Hampshire who has helped out with a few pointers to some currently unofficial (but possibly soon-to-be-supported) ways of making use of Local Direct Gov data:

The answer is No, Yes, and Maybe.

Web services: not yet. This is something I've been asking for and the Local Directgov team are looking at doing. […]

What is possible now is simple link redirection. This involves linking to a Directgov URL and passing it the code number of the service you want, the code number for the interaction type you want (normally 8 for “finding information”) and the code number of the local authority whose service you want to access. The service codes are a subset of the standard Local Government Service List (LGSL); interaction codes are from the Local Government Interaction List (LGIL).

Here's an example:

Find information (LGIL code 8) about the Youth Opportunies Fund (LGSL code 1116) at Bristol City Council (authority code 558):

Find information (8) about volunteering opportunities for young people (629) in Nottinghamshire (239):

Obviously this only works for services that are included in the Local Directgov service list, and for authorities in England and Wales. Local Directgov relies on the authority having provided a URL for the service in question. If a particular authority has failed to do so, the link defaults to the “Contact us” page of the authority's website.

This facility has a few obvious drawbacks:

  • The website user has to know which council area they're in.
  • You, the website owner, have to know what the code number is for that council.
  • It doesn't work well with services delivered by more than one tier of local authority (e.g. services provided by both county and district council in an area).

[…] LDG have their own numbering system for local authorities.

As it stands, then, the facility is quite usable for a council website where I only have to know the codes for a handful of authorities in my area – see for instance – but not much good for a national website.

The alternative, for now, is to recreate the input form at on your own website. So you prompt the user for their postcode, then use that to send them to Directgov with the postcode already set – for example, like this:

5 thoughts on “Getting data out of DirectGov”

  1. I agree with Harry Harold and I know that it will take much longer to create the website, but I think that you are trying to provide a great service to the youth of America and I applaud you for that.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.