To connect to this service you'll need to use one of these endpoints:
JSON
Copied!
Open API
Copied!
SOAP
Description
Finds geo-demographic profiling information from a postcode.
Supply a single postcode to retrieve a full demographic profile based on life stage (youngest - oldest) and wealth (poorest to richest). A name and full description of the profile that the supplied postcode falls in is also supplied.
Please note that profiles are created based on an aggregate of information available about each area, and there are always variations in the people living in each postcode which means that a particular individual might not always match the indicated profile.
Model Versions
The demographics model is refreshed annually. The details of the codes can vary slightly between editions of the model.
By default you will always be using the latest version of the model. However, if you need to remain on a specific version to keep consistency in your results, please ask your account manager. Major differences in the structure of the results between different versions are highlighted below.
Credit Usage
Each request to this method consumes 1 Demographics credit.
Parameters
The following parameters can be supplied to this method
username
username
See the available authentication methods. If you are
using username & password authentication,
specify the username to authenticate as. If you are using
API Key authentication and you are not using
the JSON, Javascript or ADO APIs, use your API Key here with the prefix apikey-, e.g.
apikey-ABCD-1234-EFGH-5678
The postcode to get the geo-demographic profile for
Advanced Options
The following options can be specified as part of the option parameter. Each option is specified
as a key/value pair. The list of available names is shown below, along with a description of the allowable values
for that name.
Common Options
Name
Description
ApplicationName
ApplicationName
Gives the name of the calling application - used to break down usage by application in the usage reports on the dashboard
Results
This method returns an object containing the following fields:
Status
Status
Indicates whether the method call was successful, or if some error occurred.
If the Success field is true, the other results described below can be used to get the results of the method.
If Success is false, some error occurred in calling the method, such as the authentication failed or the
account is out of credits. The details of the error can be obtained from the ErrorMessage field, and any other results should be ignored
SonarCode
SonarCode
The unique code for the profile that the postcode falls in to
Title
Title
A human-readable name for the profile
PercentageOfHouseholds
PercentageOfHouseholds
The percentage of households in the UK that fall into this same profile
Lifestage
Lifestage
A rating from A to F to indicate the life stage of people living in this area. A indicates Young Singles and F indicates Retired
WealthQuartile
WealthQuartile
An indicator of the affluence of people living in this area. 1 indicates Affluent and 4 indicates Struggling
WealthRanking
WealthRanking
Latest Version
A more detailed indicator of the wealth of people living in this postcode. While the WealthQuartile value is calculated at census output area (average of 11 postcodes), this value is calculated at individual postcode level. Postcodes are ranked in wealth between 1 (wealthiest) and 20 (poorest).
Because of the difference in area across which the WealthQuartile and WealthRanking values are calculated, there can be discrepancies between the two. Where there are wealthy and poorer areas close together, the WealthQuartile is essentially an average of the different WealthRanking values within that area, so it is possible to have a poor (ranking 20) postcode within a generally wealthy (quartile 1) area.
2016 Version
An indicator of the wealth of people living in this postcode. 1 indicates the wealthiest people and 100 indicates the poorest
Description
Description
A human-readable description of the type of area that the postcode tends to cover
Live Demo
postcode
options
Name
Value
Common Options
Credits Remaining Today:
Live Demo Results
We hope you like our service! Sign up for a free account and start using our full range of products today.
Sample Code
<!-- Import the Integr8 Ajax API --><!-- NOTE: Get your own API key to use in the following script tag from: --><!-- https://www.data-8.co.uk/ValidationAdmin/AjaxAPIKey --><scripttype="text/javascript"src="https://webservices.data-8.co.uk/Javascript/Loader.ashx?key=your-api-key&load=Demographics"></script><scripttype="text/javascript">function GetDemographics(postcode) {
/// <param name="postcode">string</param>var demographics = new data8.demographics();
demographics.getdemographics(
postcode,
[
],
showGetDemographicsResult
);
}
function showGetDemographicsResult(result) {
// Check that the call succeeded, and show the error message if there was a problem.if (!result.Status.Success) {
alert('Error: ' + result.Status.ErrorMessage);
}
else {
// TODO: Process method results here.// Results can be extracted from the following fields:// result.SonarCode// The unique code for the profile that the postcode falls in to// result.Title// A human-readable name for the profile// result.PercentageOfHouseholds// The percentage of households in the UK that fall into this same profile// result.Lifestage// A rating from A to F to indicate the life stage of people living in this area. A indicates Young Singles and F indicates Retired// result.WealthQuartile// An indicator of the affluence of people living in this area. 1 indicates Affluent and 4 indicates Struggling// result.WealthRanking// #### Latest Version// // A more detailed indicator of the wealth of people living in this postcode. While the `WealthQuartile` value is calculated at census output area (average of 11 postcodes), this value is calculated at individual postcode level. Postcodes are ranked in wealth between 1 (wealthiest) and 20 (poorest).// // Because of the difference in area across which the `WealthQuartile` and `WealthRanking` values are calculated, there can be discrepancies between the two. Where there are wealthy and poorer areas close together, the `WealthQuartile` is essentially an average of the different `WealthRanking` values within that area, so it is possible to have a poor (ranking 20) postcode within a generally wealthy (quartile 1) area.// // #### 2016 Version// // An indicator of the wealth of people living in this postcode. 1 indicates the wealthiest people and 100 indicates the poorest// result.Description// A human-readable description of the type of area that the postcode tends to cover
}
}
</script>
// NOTE: A Service Reference to the web service must be added to use this sample code.privatevoid GetDemographics(string postcode)
{
// Declare the required options.// Invoke the web service method.
DemographicsSoapClient proxy = new DemographicsSoapClient();
DemographicsOutput results = proxy.GetDemographics("your-username", "your-password", postcode, new Option[0]);
// Check that the call succeeded, and show the error message if there was a problem.if ((results.Status.Success == false))
{
MessageBox.Show(("Error: " + results.Status.ErrorMessage));
}
else
{
// TODO: Process method results here.// Results can be extracted from the following fields:// result.SonarCode// The unique code for the profile that the postcode falls in to// result.Title// A human-readable name for the profile// result.PercentageOfHouseholds// The percentage of households in the UK that fall into this same profile// result.Lifestage// A rating from A to F to indicate the life stage of people living in this area. A indicates Young Singles and F indicates Retired// result.WealthQuartile// An indicator of the affluence of people living in this area. 1 indicates Affluent and 4 indicates Struggling// result.WealthRanking// #### Latest Version// // A more detailed indicator of the wealth of people living in this postcode. While the `WealthQuartile` value is calculated at census output area (average of 11 postcodes), this value is calculated at individual postcode level. Postcodes are ranked in wealth between 1 (wealthiest) and 20 (poorest).// // Because of the difference in area across which the `WealthQuartile` and `WealthRanking` values are calculated, there can be discrepancies between the two. Where there are wealthy and poorer areas close together, the `WealthQuartile` is essentially an average of the different `WealthRanking` values within that area, so it is possible to have a poor (ranking 20) postcode within a generally wealthy (quartile 1) area.// // #### 2016 Version// // An indicator of the wealth of people living in this postcode. 1 indicates the wealthiest people and 100 indicates the poorest// result.Description// A human-readable description of the type of area that the postcode tends to cover
}
}
'NOTE: A Service Reference to the web service must be added to use this sample code.PrivateSub GetDemographics(ByVal postcode AsString)
'Declare the required options.'Invoke the web service method.Dim proxy As DemographicsSoapClient = New DemographicsSoapClient()
Dim results As DemographicsOutput = proxy.GetDemographics("your-username", "your-password", postcode, New [Option](-1) {})
'Check that the call succeeded, and show the error message if there was a problem.If (results.Status.Success = false) Then
MessageBox.Show(("Error: " + results.Status.ErrorMessage))
Else'TODO: Process method results here.'Results can be extracted from the following fields:'result.SonarCode' The unique code for the profile that the postcode falls in to'result.Title' A human-readable name for the profile'result.PercentageOfHouseholds' The percentage of households in the UK that fall into this same profile'result.Lifestage' A rating from A to F to indicate the life stage of people living in this area. A indicates Young Singles and F indicates Retired'result.WealthQuartile' An indicator of the affluence of people living in this area. 1 indicates Affluent and 4 indicates Struggling'result.WealthRanking' #### Latest Version' ' A more detailed indicator of the wealth of people living in this postcode. While the `WealthQuartile` value is calculated at census output area (average of 11 postcodes), this value is calculated at individual postcode level. Postcodes are ranked in wealth between 1 (wealthiest) and 20 (poorest).' ' Because of the difference in area across which the `WealthQuartile` and `WealthRanking` values are calculated, there can be discrepancies between the two. Where there are wealthy and poorer areas close together, the `WealthQuartile` is essentially an average of the different `WealthRanking` values within that area, so it is possible to have a poor (ranking 20) postcode within a generally wealthy (quartile 1) area.' ' #### 2016 Version' ' An indicator of the wealth of people living in this postcode. 1 indicates the wealthiest people and 100 indicates the poorest'result.Description' A human-readable description of the type of area that the postcode tends to coverEndIfEndSub
// NOTE: The php_soap.dll extension must be enabled in the php.ini file.function GetDemographics($postcode)
{
$options = array(
"Option" => array(
)
);
$params = array(
"username" => "your-username",
"password" => "your-password",
"postcode" => $postcode,
"options" => $options
);
$client = new SoapClient("https://webservices.data-8.co.uk/Demographics.asmx?WSDL");
$result = $client->GetDemographics($params);
if ($result->GetDemographicsResult->Status->Success == 0)
{
echo"Error: " . $result->GetDemographicsResult->Status->ErrorMessage;
}
else
{
// TODO: Process method results here.// Results can be extracted from the following fields:// $result->GetDemographicsResult->SonarCode// The unique code for the profile that the postcode falls in to// $result->GetDemographicsResult->Title// A human-readable name for the profile// $result->GetDemographicsResult->PercentageOfHouseholds// The percentage of households in the UK that fall into this same profile// $result->GetDemographicsResult->Lifestage// A rating from A to F to indicate the life stage of people living in this area. A indicates Young Singles and F indicates Retired// $result->GetDemographicsResult->WealthQuartile// An indicator of the affluence of people living in this area. 1 indicates Affluent and 4 indicates Struggling// $result->GetDemographicsResult->WealthRanking// #### Latest Version// // A more detailed indicator of the wealth of people living in this postcode. While the `WealthQuartile` value is calculated at census output area (average of 11 postcodes), this value is calculated at individual postcode level. Postcodes are ranked in wealth between 1 (wealthiest) and 20 (poorest).// // Because of the difference in area across which the `WealthQuartile` and `WealthRanking` values are calculated, there can be discrepancies between the two. Where there are wealthy and poorer areas close together, the `WealthQuartile` is essentially an average of the different `WealthRanking` values within that area, so it is possible to have a poor (ranking 20) postcode within a generally wealthy (quartile 1) area.// // #### 2016 Version// // An indicator of the wealth of people living in this postcode. 1 indicates the wealthiest people and 100 indicates the poorest// $result->GetDemographicsResult->Description// A human-readable description of the type of area that the postcode tends to cover
}
}
Request Format
{
"postcode": "CH2 4NE",
"options": {}
}
Results Format
{
"Status": {
"Success": true,
"CreditsRemaining": 1000
},
"SonarCode": "C43",
"Title": "Post War Council",
"PercentageOfHouseholds": "1.67%",
"Lifestage": "C",
"WealthQuartile": 4,
"WealthRanking": 20,
"Description": "These neighbourhoods are concentrated within the industrial North and North-East of Britain. A very high proportion of the properties are post war local authority owned terraced properties. These estates were built to house the blue collar workers in our manufacturing heartlands in the fifties and sixties. The majority of properties are rented from the council but a few of the homes are now in owner occupation as the tenants have exercised the right to buy. The population in these areas is now mixed as younger families have replaced many of the older inhabitants, although some older residents still remain. Many are in social grades D and E and there is a very high proportion of residents not in employment. On all measures of deprivation these areas score well above the national average."
}
Depending on your chosen authentication method you will need to modify this request slightly:
Post the request to https://webservices.data-8.co.uk/Demographics/GetDemographics.json?key=your-api-key
and do NOT include the username or password properties in the request JSON document.
Post the request to https://webservices.data-8.co.uk/Demographics/GetDemographics.json
and include username and password properties in the request JSON document.
Do not use for client-side requests!
Obtain a JWT token for your user and post the request to https://webservices.data-8.co.uk/Demographics/GetDemographics.json
Include the JWT token in the request headers as: Authorization: Bearer your-jwt-token
PublicSub GetDemographics(postcode AsString)
Dim rs As ADODB.Recordset
Set rs = New ADODB.Recordset
rs.Open "https://webservices.data-8.co.uk/recordset.ashx?service=Demographics&method=GetDemographicsSimple" &
"&username=your-username" &
"&password=your-password" &
"&postcode=" & postcode
If rs.MoveFirst ThenIf rs.Fields(0).Name = "Success"And rs.Fields(0).Value = falseThen
MsgBox "Error: " & rs.Fields(1)
Else'TODO: Process method results here.'All the results are available in the first row in the recordset.'Results can be extracted from the following fields:'SonarCode' The unique code for the profile that the postcode falls in to'Title' A human-readable name for the profile'PercentageOfHouseholds' The percentage of households in the UK that fall into this same profile'Lifestage' A rating from A to F to indicate the life stage of people living in this area. A indicates Young Singles and F indicates Retired'WealthQuartile' An indicator of the affluence of people living in this area. 1 indicates Affluent and 4 indicates Struggling'WealthRanking' #### Latest Version' ' A more detailed indicator of the wealth of people living in this postcode. While the `WealthQuartile` value is calculated at census output area (average of 11 postcodes), this value is calculated at individual postcode level. Postcodes are ranked in wealth between 1 (wealthiest) and 20 (poorest).' ' Because of the difference in area across which the `WealthQuartile` and `WealthRanking` values are calculated, there can be discrepancies between the two. Where there are wealthy and poorer areas close together, the `WealthQuartile` is essentially an average of the different `WealthRanking` values within that area, so it is possible to have a poor (ranking 20) postcode within a generally wealthy (quartile 1) area.' ' #### 2016 Version' ' An indicator of the wealth of people living in this postcode. 1 indicates the wealthiest people and 100 indicates the poorest'Description' A human-readable description of the type of area that the postcode tends to coverEndIfEndIfEndSub
Cookie Notice
Find out more about how this website uses cookies to enhance your browsing experience.