Published 21st July 2011
Type SPARQL Stored Procedure
Users 3

Ordnance Survey Postcode By Region

Select postcode by district (where district is any of unitary authority, district, metropolitan district, London Borough) or ward.

Example API call:

http://api.kasabi.com/api/ordnance-survey-postcode-region?district=70000...

Postcode as KML:

 

http://api.kasabi.com/api/ordnance-survey-postcode-region?district=7000000000037256&apikey=yourkey&output=kml

Remember default limit is set so add a &limit=100 (or whatever) on the end to get more...

 

Documentation

Endpoint URL

http://api.kasabi.com/dataset/ordnance-survey-linked-data/apis/34e
Login to test this query using our experimental API explorer

Authentication

You will need your API key in order to authenticate to this API. You have two options for authentication:

  • By URL Parameter -- add a apikey parameter to your request URL, with your key as the value
  • By Request Header -- add a custom HTTP header called X_KASABI_APIKEY to your HTTP request, with your key as the value

For more information on Kasabi authentication options read the authentication documentation. Your API key will need to be authorized to use this service.

Parameters

This API supports the following request parameters:

ParameterDefaultRequiredTypeBaseNotes
districtNourihttp://data.ordnancesurvey.co.uk/id/
wardNourihttp://data.ordnancesurvey.co.uk/id/

HTTP Response Codes

Clients should be prepared to receive any valid HTTP response code. The following table lists the most frequently used codes

CodeMeaning
200 OKSuccessful Request
400 Bad RequestMissing or malformed SPARQL query
401 Not AuthorizedAPI key is not authorized to access the data

Please also review our additional notes on response codes.

Response Formats

The following response formats are supported for this SPARQL endpoint. Formats can be selected using either the HTTP Accept header, or via the output parameter. As noted in the table below, the type of SPARQL query further limits the available range of output options Please also review our additional notes on content negotiation used in Kasabi APIs

NameMedia TypeNotes
kmlapplication/vnd.google-earth.kml+xml