API Reference
Getting Started
All API methods are either a GET, POST or OPTIONS request.
The API communicates over both HTTPS and plain HTTP using IPv4 and IPv6.
We recommend using HTTPS only although HTTP is available.
We use appropriate HTTP status codes where possible to indicate the request status.
OpenAPI Spec
Our OpenAPI specification is available at:
Rate Limiting
Each IP address is rate limited at 30 requests per second. Tripping the rate limit will result in a 503 response.
The autocomplete API also has an additional rate limit.
If you expect to breach the limit please contact us and we can move you to an endpoint with a higher limit.
Authentication
Most requests require an API key for authentication. Authenticate by passing an api_key as part of the query string. For example:
api.ideal-postcodes.co.uk/v1/autocomplete/addresses?api_key=iddqd&q=parkside
Alternatively, authentication can be transmitted via the Authorization header using the following scheme:
Authorization: IDEALPOSTCODES api_key="iddqd" [other_key="foo"]
Versioning
This API is versioned with a simple prefix in the URL. The current version is /v1/. We will maintain backwards-compatibility by releasing breaking changes under a new version.
Please note that the following changes are backwards-compatible:
- Adding new properties to existing API responses
- Adding new API endpoints
- Adding new optional request parameters to existing API endpoints
- Changing the order of properties in existing API responses
- Changing the autocomplete address suggestion format
Error Handling
A successful lookup is accompanied with a HTTP status code of 200 and a response code of 2000 (found in the body).
An error has occurred if the HTTP status code is not 200. Errors can range from a benign 404 (resource not found) to more urgent errors (your API Key ran out of credit, failed authentication, etc).
Testing
Each new account comes with a free test balance. Contact us if you need more for testing and integration.
Metadata
Requests that affect your balance may be annotated with arbitrary metadata. This data is stored along with your lookup history and can be queried at a later date via the API or the dashboard. We call the ability to label your requests tagging.
Response Codes
The API returns two indicators to help you to determine the status of each HTTP request.
The first is the HTTP Status, which is found in the status-line of all HTTP requests. The API will return status codes that adhere to HTTP /1.1 Specifications wherever possible.
2XX status codes indicates success while 4XX and 5XX indicate client and server errors respectively.
The second is the API response code, which can be found in the code property of the response body. This code will provide a more specific reason if a failure has occurred and can point you in the right direction when debugging.
Terms of Service
https://terms.ideal-postcodes.co.ukLicense
AGPLv3