API Endpoints

Census Demographics

Age of Arrival in UK

Tokens
× 1

API Credit Cost


Endpoint Overview

Census2021 Demographics

The Age of Arrival in UK endpoint provides data on the ages at which residents of a postcode area arrived in the UK, offering insights into migration patterns and demographics.


Coverage

EnglandEngland
WalesWales

Update Frequency

Census

Request Format

HTTP Method:

GET

To use the API you should send an HTTP request to the following endpoint URL. This will return a JSON response.

https://api.postcodearea.co.uk/census-ts018/?key=&postcode={postcode}

Note that your key has automatically been added to the API endpoint for convenience.

Querystring Parameters:

{postcode}

A valid UK postcode (e.g., SW1A 1AA). Note that you can send the postcode with or without the space separating the outward and inward codes. For example, both "SW1A 1AA" and "SW1A1AA" are both valid.

{api_key}

A valid API key that authenticates your account.


Authorisation

For every endpoint request your API Key should be sent as part of the querystring:

https://api.postcodearea.co.uk/census-ts018/?key={api_key}&postcode=WS3+3PD

For example:

https://api.postcodearea.co.uk/census-ts018/?key=&postcode=WS3+3PD

Example Request and Response

If the above URL endpoint exists and the API key is valid, our system will return the following example response:

https://api.postcodearea.co.uk/census-ts018/?key=&postcode=WS3+3PD
{"data":[{"Postcode":"ST20 0LY","Age of arrival in the UK: Total: All usual residents":310,"Age of arrival in the UK: Born in the UK":308,"Age of arrival in the UK: Arrived in the UK":2,"Age of arrival in the UK: Arrived in the UK: Aged 0 to 4 years":1,"Age of arrival in the UK: Arrived in the UK: Aged 5 to 7 years":0,"Age of arrival in the UK: Arrived in the UK: Aged 8 to 9 years":0,"Age of arrival in the UK: Arrived in the UK: Aged 10 to 14 years":0,"Age of arrival in the UK: Arrived in the UK: Aged 15 years":0,"Age of arrival in the UK: Arrived in the UK: Aged 16 to 17 years":0,"Age of arrival in the UK: Arrived in the UK: Aged 18 to 19 years":0,"Age of arrival in the UK: Arrived in the UK: Aged 20 to 24 years":0,"Age of arrival in the UK: Arrived in the UK: Aged 25 to 29 years":1,"Age of arrival in the UK: Arrived in the UK: Aged 30 to 44 years":0,"Age of arrival in the UK: Arrived in the UK: Aged 45 to 59 years":0,"Age of arrival in the UK: Arrived in the UK: Aged 60 to 64 years":0,"Age of arrival in the UK: Arrived in the UK: Aged 65 to 74 years":0,"Age of arrival in the UK: Arrived in the UK: Aged 75 to 84 years":0,"Age of arrival in the UK: Arrived in the UK: Aged 85 to 89 years":0,"Age of arrival in the UK: Arrived in the UK: Aged 90 years and over":0}],"response_time":0,"Source":"PostcodeArea API","Output Area":"OA","Radius":10,"Distance Unit":"Mile","Records":1,"Unique Fields":1,"Referrer":"api.postcodearea.co.uk","Host":"https://api.postcodearea.co.uk/census-ts018/?key=pa_XWQAV24RXCUU19NGUFM11TKTLN&postcode=st200ly","Endpoint":"/census-ts018/?key=pa_XWQAV24RXCUU19NGUFM11TKTLN&postcode=st200ly"}

Error Handling

HTTP Status Code Error Message Reason
400 Invalid postcode format The postcode provided is not valid.
401 Unauthorised request API key missing or invalid.
404 Postcode not found No data available for the given postcode.
404 No Results Found No data available for the given radius.
429 Too many requests Exceeded rate limit.
500 Internal server error An unexpected issue occurred.

Caching Policy

You may temporarily cache data retrieved from the API for performance optimisation purposes, provided that the cached data is:

  1. Stored in-memory only (e.g., application-level cache).
  2. Retained for no longer than one hour.

Caching API data to any persistent storage, including but not limited to databases, files, or external systems, constitutes a breach of our API Terms and Conditions. Such actions are strictly prohibited to ensure data accuracy and compliance with our licensing agreements.

If you have specific requirements for extended caching, you must seek prior written consent from us.


Get started today

Ready to use this data for your own business or organisation? Sign up today and get immediate access to all the PostcodeArea API endpoints.

Share this page