The best part about joining The Easy API is that you'll have to integrate one single API interface. Think about how easy it will be to just build the code one time to connect forever. Take a look at all the services we have and click Get Started when you are ready!
API keys can be created in the Account section after you have logged in. These keys will be used to connect to the services which you select. It's a required attribute that should be sent as part of the GET URL, or POST XML request.
You are able to now able to uniquely name your API key when setting up a new one. When going through the registration process on The Easy API you'll get a default one which will look like the following:
eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE2NDM1NTk1MzAsImF1ZCI6MTE4OH0.I6oqs-HnPk5kFMwmvt7k0yqhY3wmkFfwoFC1ardIGfg
The older version of the application produced keys such as:
cd1b91ddb08825277f2f72eda79015a1
There is currently one environment that is available which is production. You can use the following URLs along with sample code snippets.
All endpoints produce UTF-8 character sets, please ensure your application is able to handle the characters.
https://json.theeasyapi.com/{api_key}/?{service_definition}
https://get.theeasyapi.com/{api_key}/?{service_definition}
// Initialize the CURL library
$cURL = curl_init();
// Set the URL to execute
curl_setopt($cURL, CURLOPT_URL, "https://xmlfeed.theeasyapi.com");
// Set options
curl_setopt($cURL, CURLOPT_HEADER, 0);
curl_setopt($cURL, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($cURL, CURLOPT_POST, 1);
curl_setopt($cURL, CURLOPT_POSTFIELDS, "request=<easyapi_wrapper><login>
<apikey>{api_key}</apikey></login><search><service>zipcode</service>
<criteria><zipcode>43021</zipcode></criteria></search></easyapi_wrapper>");
// Execute, saving results in a variable
$strPage = curl_exec($cURL);
// Close CURL resource
curl_close($cURL);
// Now the variable $strPage has the returned XML.
var_dump($strPage);
Each service returns data that can be consumed by your application in the ways that your language allows. Example data for the XML request above produces the values below.
<return>
<zipcodes>
<id>Delaware</id>
<zipcode>43021</zipcode>
<city>GALENA</city>
<state>OH</state>
<county>DELAWARE</county>
<areacode>740</zipcode>
<citytype>P</citytype>
<cityaliasabbreviation></cityaliasabbreviation>
<cityaliasname>GALENA</cityaliasname>
<latitude>40.204868</latitude>
<longitude>-82.880912</longitude>
<timezone>5</timezone>
<elevation>900</elevation>
<countyfips>041</countyfips>
<daylightsavings>Y</daylightsavings>
<preferredlastlinekey>X21095</preferredlastlinekey>
<classificationcode></classificationcode>
<multicounty></multicounty>
<statefips>39</statefips>
<citystatekey>X21095</citystatekey>
<cityaliascode></cityaliascode>
<primaryrecord>P</primaryrecord>
<citymixedcase>Galena</citymixedcase>
<cityaliasmixedcase>Galena</cityaliasmixedcase>
</zipcodes>
</return>