API Documentation

Overview

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}

/getcount

Used to get the number of records available based on the filters and fields required by the user.

Data Used in the Endpoint

VariableTypeRequiredDescription
apikeystringRequiredAPI Key for authentication
ajaxbooleanRequiredMust be true to make the call
getCountbooleanRequiredMust be true to return count only
pagestringRequiredWhich page data count you want (consumer, business, aged_internet, canada)
dataarrayRequiredFields and filters to get the count

/createcsv

Used to generate a CSV file containing records based on filters and selected fields.

Data Used in the Endpoint

VariableTypeRequiredDescription
apikeystringRequiredAPI Key for authentication
ajaxbooleanRequiredMust be true to make the call
createListbooleanRequiredMust be true for generating the CSV
pagestringRequiredWhich page data you want (consumer, business, aged_internet, canada)
dataarrayRequiredFields and filters to fetch data
downloadLeadsintegerRequiredNumber of records to include
listNamestringRequiredName of the CSV file

/checkstatus

Used to check if the generated CSV file is ready for download.

VariableTypeRequiredDescription
apikeystringRequiredAPI Key for authentication
filehashstringRequiredReturned by /createcsv

Possible Values of Data to be Sent

Variable Array 1 Array 2 Type Required Possible Values
dataselectedFieldsarrayyes personfirstname, personlastname, primaryaddress, cityname, state, ZipCode, phone, countyname, email, ip, personexactage, persondateofbirthyear, persondateofbirthmonth, persondateofbirthday, CreditRating
datafiltersstatearrayyes State codes (AK, AL, AR, CA...)
datafiltersAreaCodearrayoptional Area code (example: 201, 202)
datafilterscountynamearrayoptional Name of the county (example: Borough)
datafilterscitynamearrayoptional Name of the cities (example: East Anchorage)
datafiltersZipCodearrayoptional Zipcode of the cities (example: 99405)
datafiltershomeownerprobabilitymodelarrayoptional H for Home Owner, R for Rental, U for Unknown
datafiltersdwellingtypearrayoptional M for Multiple Family Dwelling Unit, S for Single Family Dwelling Unit
datafiltershomeswimmingpoolindicatorarrayoptional Y for Yes, N for No
datafiltersveteraninhouseholdarrayoptional Y for Yes, N for No, U for Unknown
datafiltersDONOTCALLarrayoptional TRUE, FALSE
datafiltersIsMobilearrayoptional T for Cell Phone, F for LandLine
datafilterspersonexactage1arrayoptional 18–90
datafilterspersonexactagearrayoptional 18–90
datafilterspersondateofbirthyeararrayoptional Numbers between 1920 - 2010
datafilterspersondateofbirthmontharrayoptional Month number (example: January = 1, February = 2 and so on)
datafilterspersondateofbirthdayarrayoptional Number between 1 - 31
datafilterspersonmaritalstatusarrayoptional M for Married, S for Single, A for Inferred Married, B for Inferred Single
datafilterspersongenderarrayoptional M for Male, F for Female, U for Unknown
datafilterstravelerarrayoptional Y for Yes, U for Unknown
datafilterstraveldomesticarrayoptional Y for Yes, U for Unknown
datafilterstravelinternationalarrayoptional Y for Yes, U for Unknown
datafilterstravelcruisevacationsarrayoptional Y for Yes, U for Unknown
datafiltersSmokerarrayoptional Y for Yes, U for Unknown
datafilterspetsarrayoptional Y for Yes, U for Unknown
datafilterscharitablearrayoptional Y for Yes, U for Unknown
datafilterspoliticalcontributorarrayoptional Y for Yes, U for Unknown
datafilterspoliticalcharitabledonationarrayoptional Y for Yes, U for Unknown
datafilterspoliticalconservativecharitabledonationarrayoptional Y for Yes, U for Unknown
datafilterspoliticalliberalcharitabledonationarrayoptional Y for Yes, U for Unknown
datafilterslanguagecodearrayoptional Language code (example: A1 for Afrikaans, A2 for Albanian, B1 for Bantu, B2 for Basque and so on)
datafiltersethniccodearrayoptional Ethnic code (example: 00 for unknown, C1 for Afghani, C2 for Bengladesh, C3 for Indian and so on)
datafiltersreligioncodearrayoptional Religion code (example: B for Buddhist, C for Catholic, H for Hindu, I for Islamic)
datafiltersCreditRatingarrayoptional 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
datafiltersNetwortharrayoptional 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
datafiltersInvestmentsRealEstatearrayoptional Y for Yes, U for Unknown
datafiltersinvestmentstocksecuritiesarrayoptional Y for Yes, U for Unknown
datafiltersestimatedincomecodearrayoptional 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

Example for getcount endpoint

$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}

Example for createscv endpoint

$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"}