Sign In
Services

Documentation : Getting Started

Getting started with The Easy API system is ... well easy. At the top of the page you will see a "Sign-Up" button. Click that and sign up for an account. Even a free account will work. The limitations to a free account is that you cannot access any of the premium services.

Premium Services

A premium service is any service that is not part of the "Free" services that are offered to any member of The Easy API. We tried to include free services that everyday programmers need access to the data. Such as GeoIP services, zip code data, and zip code radius searches. Premium services are services that often times have higher accuracy of data and it has premium content.

Sending Data

Below is a classic example of PHP using cURL. It will use the free service zipcode to get the details for 43021 (Galena, OH).

// Initialize the CURL library
$cURL = curl_init();

// Set the URL to execute
curl_setopt($cURL, CURLOPT_URL, "http://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>{yourapikey}</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.

Returned Data

If you ran the code above you will now have a variable named strPage with the valid XML from the result. To show you what will be returned as example data you can always refer to that service documentation. Please look below to see what is returned in our example.

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