Bulk Demographics Append
POST/v5/ei/bulk
AtData’s Bulk Demographics Append endpoint allows you to synchronously query demographics for up to 5,000 people at a time.
Tip
Adding email, name, and postal together will give you the highest match rate. Adding email and name will give you a better match rate than by email alone, and regular text emails will match better than MD5 or SHA1 versions.
Use the recipe below as a guide to creating the request body and executing this request:
Bulk Demographics Append
- Python
- Javascript
- Response Example
import requests
import json
api_key = "<YOUR_API_KEY_HERE>"
url = f"https://api.atdata.com/v5/ei/bulk?api_key={api_key}"
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
data = [
{
"email": "[email protected]",
"first": "Caitlin",
"last": "Plackard"
},
{
"email": "[email protected]"
},
{
"email": "[email protected]"
},
{
"email": "NOT_AN_EMAIL_ADDRESS"
}
]
response = requests.post(url, headers=headers, data=json.dumps(data))
print(response.json())
const fetch = require('node-fetch');
const api_key = "<YOUR_API_KEY_HERE>";
const url = `https://api.atdata.com/v5/ei/bulk?api_key=${api_key}`;
const headers = {
'Accept': 'application/json',
'Content-Type': 'application/json'
};
const data = [
{
"email": "[email protected]",
"first": "Caitlin",
"last": "Plackard"
},
{
"email": "[email protected]"
},
{
"email": "[email protected]"
},
{
"email": "NOT_AN_EMAIL_ADDRESS"
}
];
fetch(url, {
method: 'POST',
headers: headers,
body: JSON.stringify(data)
})
.then(response => response.json())
.then(responseData => {
console.log(responseData);
})
.catch(error => {
console.error('Error:', error);
});
[
{
"gender": "Female"
},
{},
{
"gender": "Male"
},
{
"error_code": 400,
"error_msg": "Invalid identifier"
}
]
Request
Responses
- 200
Success. Find detailed information about the Demographics Response Object here.