Country of birth
England
Wales
gethttps://crystalroof.co.uk/customer-api/demographics-and-migration/country-of-birth/postcode/v1/{location}
Description
This method returns Census 2021 estimates that classify usual residents by their country of birth.
The country of birth is the country in which a person was born. The countries of birth are split into 14 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/country-of-birth/postcode/v1/W60WW?api_key=DEMO
Possible responses with examples
Code
Description
200
Success
{
"data": {
"residents": {
"Total": 195,
"Europe": 137,
"Europe: United Kingdom": 101,
"Europe: EU countries": 24,
"Europe: EU countries: European Union EU14": 13,
"Europe: EU countries: European Union EU8": 10,
"Europe: EU countries: European Union EU2": 1,
"Europe: EU countries: All other EU countries": 0,
"Europe: Non-EU countries": 12,
"Europe: Non-EU countries: All other non-EU countries": 12,
"Africa": 32,
"Middle East and Asia": 17,
"The Americas and the Caribbean": 5,
"Antarctica and Oceania (including Australasia) and Other": 4,
"British Overseas ": 0
},
"rank": {
"Europe": 4,
"Europe: United Kingdom": 3,
"Europe: EU countries": 5,
"Europe: EU countries: European Union EU14": 5,
"Europe: EU countries: European Union EU8": 5,
"Europe: EU countries: European Union EU2": 2,
"Europe: EU countries: All other EU countries": 1,
"Europe: Non-EU countries": 6,
"Europe: Non-EU countries: All other non-EU countries": 6,
"Africa": 8,
"Middle East and Asia": 4,
"The Americas and the Caribbean": 3,
"Antarctica and Oceania (including Australasia) and Other": 6,
"British Overseas ": 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!"
}