Age by five-year age bands
England
Wales
gethttps://crystalroof.co.uk/customer-api/demographics-and-migration/age-by-five-year-age-bands/postcode/v1/{location}
Description
This method returns Census 2021 estimates that classify usual residents by five-year age bands.
Age is split into 19 categories including total.
The estimates are as at Census Day, 21 March 2021.
Parameters
Name | Description |
---|---|
location path string | Postcode, coordinates in the lat,long format or UPRN in the uprn12345678 format. Postcode with or without space. This argument is case-insensitive. |
area_type query enum | Area types used in Census 2021. The method returns results based on the inclusion of the postcode/coordinate/UPRN within the designated geographical area. For instance, when using 'oa' as a parameter, the returned results will be for the Output Area that contains the specified postcode/coordinate/UPRN.
|
api_key query enum | Your API key.
|
Request URL:
https://crystalroof.co.uk/customer-api/demographics-and-migration/age-by-five-year-age-bands/postcode/v1/W60WW?api_key=DEMO
Possible responses with examples
Code
Description
200
Success
{
"data": {
"residents": {
"Total": 194,
"Aged 4 years and under": 7,
"Aged 5 to 9 years": 14,
"Aged 10 to 14 years": 13,
"Aged 15 to 19 years": 18,
"Aged 20 to 24 years": 7,
"Aged 25 to 29 years": 7,
"Aged 30 to 34 years": 14,
"Aged 35 to 39 years": 16,
"Aged 40 to 44 years": 14,
"Aged 45 to 49 years": 17,
"Aged 50 to 54 years": 20,
"Aged 55 to 59 years": 22,
"Aged 60 to 64 years": 11,
"Aged 65 to 69 years": 5,
"Aged 70 to 74 years": 3,
"Aged 75 to 79 years": 5,
"Aged 80 to 84 years": 1,
"Aged 85 years and over": 0
},
"rank": {
"Aged 4 years and under": 3,
"Aged 5 to 9 years": 6,
"Aged 10 to 14 years": 5,
"Aged 15 to 19 years": 6,
"Aged 20 to 24 years": 2,
"Aged 25 to 29 years": 2,
"Aged 30 to 34 years": 4,
"Aged 35 to 39 years": 6,
"Aged 40 to 44 years": 6,
"Aged 45 to 49 years": 7,
"Aged 50 to 54 years": 7,
"Aged 55 to 59 years": 8,
"Aged 60 to 64 years": 4,
"Aged 65 to 69 years": 2,
"Aged 70 to 74 years": 1,
"Aged 75 to 79 years": 3,
"Aged 80 to 84 years": 1,
"Aged 85 years and over": 1
}
},
"dataDate": "2021-03-21",
"refreshedDate": "2021-03-21"
}
401
Unauthorized
{
"error": "No such API key or it is not valid anymore."
}
402
Payment Required
{
"error": "You have exhausted the available calls provided by your package."
}
403
Forbidden
{
"error": "API key is invalid for the given action."
}
404
Not Found
{
"error": "Can't find such location."
}
429
Too Many Requests
{
"error": "Too many requests have been sent in one second."
}
500
Internal Server Error
{
"error": "We have already started working on a resolution!"
}