This API provides three POST endpoints. Each endpoint requires an API key for authentication and accepts data via POST request. The endpoints allow retrieving record counts, generating CSV files, and checking the status of CSV generation.
Base URL: https://api.thedatacentral.com/api/{endpoint}
Used to get the number of records available based on the filters and fields required by the user.
| Variable | Type | Required | Description |
|---|---|---|---|
| apikey | string | Required | API Key for authentication |
| ajax | boolean | Required | Must be true to make the call |
| getCount | boolean | Required | Must be true to return count only |
| page | string | Required | Which page data count you want (consumer, business, aged_internet, canada) |
| data | array | Required | Fields and filters to get the count |
Used to generate a CSV file containing records based on filters and selected fields.
| Variable | Type | Required | Description |
|---|---|---|---|
| apikey | string | Required | API Key for authentication |
| ajax | boolean | Required | Must be true to make the call |
| createList | boolean | Required | Must be true for generating the CSV |
| page | string | Required | Which page data you want (consumer, business, aged_internet, canada) |
| data | array | Required | Fields and filters to fetch data |
| downloadLeads | integer | Required | Number of records to include |
| listName | string | Required | Name of the CSV file |
Used to check if the generated CSV file is ready for download.
| Variable | Type | Required | Description |
|---|---|---|---|
| apikey | string | Required | API Key for authentication |
| filehash | string | Required | Returned by /createcsv |
| Variable | Array 1 | Array 2 | Type | Required | Possible Values |
|---|---|---|---|---|---|
| data | selectedFields | array | yes | personfirstname, personlastname, primaryaddress, cityname, state, ZipCode, phone, countyname, email, ip, personexactage, persondateofbirthyear, persondateofbirthmonth, persondateofbirthday, CreditRating | |
| data | filters | state | array | yes | State codes (AK, AL, AR, CA...) |
| data | filters | AreaCode | array | optional | Area code (example: 201, 202) |
| data | filters | countyname | array | optional | Name of the county (example: Borough) |
| data | filters | cityname | array | optional | Name of the cities (example: East Anchorage) |
| data | filters | ZipCode | array | optional | Zipcode of the cities (example: 99405) |
| data | filters | homeownerprobabilitymodel | array | optional | H for Home Owner, R for Rental, U for Unknown |
| data | filters | dwellingtype | array | optional | M for Multiple Family Dwelling Unit, S for Single Family Dwelling Unit |
| data | filters | homeswimmingpoolindicator | array | optional | Y for Yes, N for No |
| data | filters | veteraninhousehold | array | optional | Y for Yes, N for No, U for Unknown |
| data | filters | DONOTCALL | array | optional | TRUE, FALSE |
| data | filters | IsMobile | array | optional | T for Cell Phone, F for LandLine |
| data | filters | personexactage1 | array | optional | 18–90 |
| data | filters | personexactage | array | optional | 18–90 |
| data | filters | persondateofbirthyear | array | optional | Numbers between 1920 - 2010 |
| data | filters | persondateofbirthmonth | array | optional | Month number (example: January = 1, February = 2 and so on) |
| data | filters | persondateofbirthday | array | optional | Number between 1 - 31 |
| data | filters | personmaritalstatus | array | optional | M for Married, S for Single, A for Inferred Married, B for Inferred Single |
| data | filters | persongender | array | optional | M for Male, F for Female, U for Unknown |
| data | filters | traveler | array | optional | Y for Yes, U for Unknown |
| data | filters | traveldomestic | array | optional | Y for Yes, U for Unknown |
| data | filters | travelinternational | array | optional | Y for Yes, U for Unknown |
| data | filters | travelcruisevacations | array | optional | Y for Yes, U for Unknown |
| data | filters | Smoker | array | optional | Y for Yes, U for Unknown |
| data | filters | pets | array | optional | Y for Yes, U for Unknown |
| data | filters | charitable | array | optional | Y for Yes, U for Unknown |
| data | filters | politicalcontributor | array | optional | Y for Yes, U for Unknown |
| data | filters | politicalcharitabledonation | array | optional | Y for Yes, U for Unknown |
| data | filters | politicalconservativecharitabledonation | array | optional | Y for Yes, U for Unknown |
| data | filters | politicalliberalcharitabledonation | array | optional | Y for Yes, U for Unknown |
| data | filters | languagecode | array | optional | Language code (example: A1 for Afrikaans, A2 for Albanian, B1 for Bantu, B2 for Basque and so on) |
| data | filters | ethniccode | array | optional | Ethnic code (example: 00 for unknown, C1 for Afghani, C2 for Bengladesh, C3 for Indian and so on) |
| data | filters | religioncode | array | optional | Religion code (example: B for Buddhist, C for Catholic, H for Hindu, I for Islamic) |
| data | filters | CreditRating | array | optional | A for 800+, B for 750 -799, C for 700 – 749, D for 650 – 699, E for 600 – 649, F for 550 – 599, G for 500 – 549, H for under 499, U for unknown |
| data | filters | Networth | array | optional | A for less the $1, B for $1 - $4,999, C for $5,000 - $9,999, D for $10,000 - $24,999, E for $25,000 - $49,999, F for $50,000 - $99,999, G for $ 100,000 - $249,999, H for $250,000 - $499,999, I for above $499,999 |
| data | filters | InvestmentsRealEstate | array | optional | Y for Yes, U for Unknown |
| data | filters | investmentstocksecurities | array | optional | Y for Yes, U for Unknown |
| data | filters | estimatedincomecode | array | optional | A for under $10,000, B for $10,000 - $14,999, C for $15,000 – $19,999, D for $20,000 - $24,999, E for $25,000 - $29,999, F for $30,000 - $34,999, G for $35,000 - $39,999, H for $40,000 - $44,999, I for $45,000 - $49,999, J for $50,000 - $54,999, K for $55,000 - $59,999, L for $60,000 - $64,999, M for $65,000 - $74,999, N for $75,000 - $99,999, O for $100,000 - $149,999, P for $150,000 - $174,999, Q for $175,000 - $199,999, R for $200,000 - $249,999, S for above $250,000 |
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.thedatacentral.com/api/getcount',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => 'data%5BselectFields%5D%5B%5D=personfirstname&data%5BselectFields%5D%5B%5D=personlastname
&data%5BselectFields%5D%5B%5D=primaryaddress&data%5BselectFields%5D%5B%5D=cityname&data%5BselectFields%5D%5B%5D=state&data%5BselectFields%5D%5B%5D=ZipCode
&data%5BselectFields%5D%5B%5D=phone&data%5Bfilters%5D%5Bstate%5D%5B%5D=AK&data%5Bfilters%5D%5Bstate%5D%5B%5D=AZ
&ajax=true&getCount=true&page=consumer&data%5Bfilters%5D%5BDONOTCALL%5D=No%20Preference&apikey=%7B%20YOUR%20API%20KEY%20%7D',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/x-www-form-urlencoded'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
When you will run the code, it will provide you the below output
Response : {"status":"success","count":96015}
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.thedatacentral.com/api/createcsv',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => 'data%5BselectFields%5D%5B%5D=personfirstname&data%5BselectFields%5D%5B%5D=personlastname&data%5BselectFields%5D%5B%5D=primaryaddress&data%5BselectFields%5D%5B%5D=cityname
&data%5BselectFields%5D%5B%5D=state&data%5BselectFields%5D%5B%5D=ZipCode&data%5BselectFields%5D%5B%5D=phone&data%5Bfilters%5D%5Bstate%5D%5B%5D=AK
&data%5Bfilters%5D%5Bstate%5D%5B%5D=AZ&ajax=true&createList=true&page=consumer&data%5Bfilters%5D%5BDONOTCALL%5D=No%20Preference
&apikey={YOUR API KEY}&downloadLeads=500&listName=Demo%20Data',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/x-www-form-urlencoded'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
When you will run the code, it will provide you the below output
Response : {"status":"success","filename":"eJwrtjI0tFIyNDQ3MzEzN7E0MVGyBgAqygQO"}