Introduction
What is LocationIQ
LocationIQ is the API (Application Programming Interface) that provides access to PostcodeArea's demographic and geographic data. This data includes house prices, Census 2021 statistics, demographic profiles and more.
The menu on the left lists the different data endpoints that can be accessed via the LocationIQ API.
Key Features
The PostcodeArea API provides developers with streamlined access to rich geographic and demographic data on UK postcodes. Whether you're building a real estate app, analysing socio-economic factors, or simply need detailed data for a research project, this API opens up a wealth of information to integrate into your applications.
- Access to comprehensive geographic and demographic data
- Data on crime rates, property values, amenities, transport links, and more
- Easy-to-use endpoints tailored for postcode-based data
Basic Concepts
To make full use of the API, here’s a quick rundown of some core concepts:
- Postcode Sector: The initial part of the postcode, which groups smaller postcode units.
- Postcode Unit: The complete postcode, specific to a small area.
- Data Types Available:
- Demographics: Age, household income, education, etc.
- Geographics: Boundaries, proximity to amenities, etc.
- Crime Stats: Crime rates and types per postcode.
- Property Info: Average sold prices, rental prices, yield etc.
Pricing
What is LocationIQ
LocationIQ is the API (Application Programming Interface) that provides access to PostcodeArea's demographic and geographic data. This data includes house prices, Census 2021 statistics, demographic profiles and more.
The menu on the left lists the different data endpoints that can be accessed via the LocationIQ API.
Key Features
The PostcodeArea API provides developers with streamlined access to rich geographic and demographic data on UK postcodes. Whether you're building a real estate app, analysing socio-economic factors, or simply need detailed data for a research project, this API opens up a wealth of information to integrate into your applications.
- Access to comprehensive geographic and demographic data
- Data on crime rates, property values, amenities, transport links, and more
- Easy-to-use endpoints tailored for postcode-based data
Get Started
Authentication Method
Users of LocationIQ (the PostcodeArea API) will require a valid "key" sent with each request to the API to validate the request.
Sign up for an API key to begin, which you'll use to authenticate your requests. All requests must include your API key in the headers.
Prerequisites
Our API is suitable for developers who are already familiar with XML and web services. For those seeking information and resources about learning these services, we recommend w3schools XML tutorials.
Endpoints
API Endpoints
The PostcodeArea endpoints allow you access information, data and analysis for your projects. All endpoints are available to browse and test in the API documentation:
Example Endpoint
Returns an approximate Credit Status Score, calculated and based on average credit ratings by local authority, and ajusted and weighted with neighbourhood factors such as unemployment, crime, deprivation and income.
Input variables
https://api.postcodearea.co.uk/credit-score?key={api_key}&postcode={postcode}
Example response
{"error":"User not found"}
Error Handling
400 Bad Request
This error means that you have provided invalid data to the endpoint.
401 Unauthorised
This error means that your API key is missing, is invalid, or has expired.
404 Not Found
This error means that the enpoint URL is incorrect.
429 Too Many Requests
If you receive a 429 error, implement a back-off strategy by slowing down the frequency of your requests. An exponential back-off approach (e.g., 1, 2, 4, 8 seconds) can be effective in managing your request rate smoothly.
Credits and Usage Limits
API Credits
With the exception of resource-intensive endpoints that return larger datasets, most enpoints will use 1 API credit per request. Each endpoint shows the amount of credits that are used.
Usage Limits
Usage limits apply to all endpoints in the LocationIQ API unless specifically outlined in the API documentation. This in order to protect other users of the API and to help protect the server from excessive overheads.
The following outlines the limits for each plan:
Plan | Requests per Minute | Requests per Day | Throttling Policy |
---|---|---|---|
Basic | 30 | 10,000 | Low throttling |
Premium | 60 | Unlimited* | Priority access, no throttling |
* While the Premium plan has no daily cap, we may still limit usage to prevent unusually high traffic that could impact other users.
By throttling the number of requests that users can make to the API, we can ensure that everyone can benefit from the data without experiencing technical problems and outages.
The usage limit is currently set at a maximum of 100 requests per minute, although this will remain under review while tests are conducted.
Frequently Asked Questions
What does the API do?
The API provides access to a wealth of geographic, demographic, and infrastructure data for UK postcodes. It includes information on property prices, EV charging points, crime rates, schools, air pollution levels, and much more. It’s designed to help businesses, public organisations, and developers build solutions that rely on postcode-level data.
How do I access the API?
To access the API, you’ll need to:
- Sign up for an API key on our website.
- Use the API key in your requests by including it in the
Authorization
header like this:Authorization: Bearer YOUR_API_KEY
Are there rate limits on API usage?
Yes, rate limits depend on your subscription plan:
- Free Plan: 10 requests per minute, 1,000 requests per day.
- Basic Plan: 30 requests per minute, 10,000 requests per day.
- Premium Plan: 60 requests per minute, unlimited daily requests (with safeguards).
If you exceed these limits, you’ll receive a 429 Too Many Requests
error.
Can I cache the data?
Temporary in-memory caching is allowed for up to one hour to optimise performance. However, caching data to persistent storage like databases or files is strictly prohibited and a breach of our Terms and Conditions.
Can I use the API for commercial purposes?
Yes, the API is designed to support both personal and commercial projects. However, your usage must comply with the Terms and Conditions, including restrictions on data caching and redistribution.
How often is the data updated?
Data is updated regularly to ensure accuracy. The update frequency depends on the specific dataset. It is important to check the API documentation for each endpoint to determine the update frequency. Please note that the API does not provide real-time data, and that some datasets are updated less frequently. We cannot guarantee the update frequency or the accuracy of third-party data sources or larger datasets that change or update frequently, such as business data, geography, and crime. As per our terms and conditions, we recommend that you do not rely on the API for making business decisions.
Who can use this API?
The API is ideal for:
- Developers building apps or tools.
- Businesses analysing market trends or demographics.
- Public sector organisations planning community initiatives.
- Real estate professionals, retailers, transport operators, and more.
Can I request custom data or features?
We welcome feedback and feature requests! If you need a custom dataset or endpoint, please contact us, and we’ll evaluate your request.