const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
address: '123 Main Street',
postal_code: '55555',
record_types: 'all',
record_count: 100,
include_condos: true
})
};
fetch('https://api.thanks.io/api/v2/mailing-lists-utils/count-radius-search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://api.thanks.io/api/v2/mailing-lists-utils/count-radius-search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"address": "123 Main Street",
"postal_code": "55555",
"record_types": "all",
"record_count": 100,
"include_condos": true
}
'import requests
url = "https://api.thanks.io/api/v2/mailing-lists-utils/count-radius-search"
payload = {
"address": "123 Main Street",
"postal_code": "55555",
"record_types": "all",
"record_count": 100,
"include_condos": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"status": "success",
"count": 42,
"failure": false
}{
"message": "Unauthorized"
}{
"message": "The given data was invalid.",
"errors": {
"record_count": [
"The record count field must not be greater than 10000."
]
},
"failure": true
}Radius Search Count
This call reports how many records a radius search would find, without buying them. Nothing is charged, no mailing list is created, and the call can be repeated freely, so use it to preview a search before purchasing it with the Radius Search endpoint. It accepts the same search parameters with the same defaults, so sending the same payload to both counts exactly what would be bought. Because counting is free, record_count may go up to 10,000 and the API/Zapier Test Mode purchase limit does not apply.
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
address: '123 Main Street',
postal_code: '55555',
record_types: 'all',
record_count: 100,
include_condos: true
})
};
fetch('https://api.thanks.io/api/v2/mailing-lists-utils/count-radius-search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://api.thanks.io/api/v2/mailing-lists-utils/count-radius-search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"address": "123 Main Street",
"postal_code": "55555",
"record_types": "all",
"record_count": 100,
"include_condos": true
}
'import requests
url = "https://api.thanks.io/api/v2/mailing-lists-utils/count-radius-search"
payload = {
"address": "123 Main Street",
"postal_code": "55555",
"record_types": "all",
"record_count": 100,
"include_condos": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"status": "success",
"count": 42,
"failure": false
}{
"message": "Unauthorized"
}{
"message": "The given data was invalid.",
"errors": {
"record_count": [
"The record count field must not be greater than 10000."
]
},
"failure": true
}Authorizations
Bearer token authentication using your thanks.io API key
Body
Street address to use for center of nearest neighbor search.
"123 Main Street"
Postal code to use for center of nearest neighbor search.
"55555"
Maximum number of nearest neighbors to count. The response reports how many records the search actually finds, up to this number.
1 <= x <= 10000100
Which type of records to search for
all, likelytomove, apartmentcomplex, likelytodownsize, likelytorefi, absenteeowner, highnetworth, majorityhomeequity, homefreeclear, underwater, kidsinhousehold, newhomeowner, firsttimehomebuyer, renters, retiring, retired, pool, onlybusinesses, newbusiness Include condos in search.
Was this page helpful?