You can now access our list of UK towns through our API saving you both time and money. The API is easy to use - and can be set up within seconds.
All data is returned in JSON format suitable for both web and mobile applications.
All API keys are created with 20 free credits to help you on your way. Every request costs 1 credit and credits can be topped up below.
By default, all API keys created are created with 20 credits to help integrate with your application. For production use, you can top up credits by purchasing them with the following form. The more credits you purchase, the more you save. 1 API request costs 1 credit.
Once you have created an API Key (above), you can then begin to use the API and query the UK towns database. This works by accessing a URL with specific parameters to return a set of data. All URLs need to include the API Key. For example, the following URL will fetch all towns in Dorset:
Please remember to URL encode all parameters. In the following examples, replace the bold values with your actual values.
To retrieve all counties from the API, do not specify any parameter other than the API key
To retrieve all towns in a county from the API, specify the 'county' parameter.
To retrieve all town information from the API, specify the 'postcode' parameter.