Navigation

Overview

Aquagenuity API documentation

Overview

Overview

Overview

This is the API documentation for the current version of Aquagenuity’s Waterscore access API, v1.0. All new clients should reference this documentation for retrieving Waterscores based on Zip. Requests should always be made over HTTPS. Currently Aquagenuity does not support a sandbox API. To access the Aquagenuity API, a Developer account is required, which can be created at Create account now

Authentication

Aquagenuity uses Basic Authentication, with the username and password you received when signing up for a Developer account.

Error Code

The following are possible error codes, please be sure to check your credentials and ensure your account is active. If you still have issues retrieving a Waterscore, please contact us at hello@aquagenuity.com.

Error code format

401 Unauthorized 
{"error": "Authorization Required"}
                    
440 Expired 
{"error": "Subscription Ended"}
                    
404 Not Found 
{"error": "Resource not found"}
                    
403 Forbidden 
{"error": "You are not allowed to access this site"}
                    

GET a Water Score

Retrieves a single water score based on zip code.

API URL: https://aquagenuity.com/GetWaterScore

Parameters:

zipcode (zipcode of desired waterscore)

Sample cURL Calling Process

        //API URL
        $url = "https://aquagenuity.com/GetWaterScore";
        #Example Zipcode value of (99759) 
        $data = array(
            "auth" => array("username" => XXXXXXXXX, "password" => XXXXXXXXXX'),
            "zipcode" => 99759, 
        );
        $ch = curl_init($url);
        # Setup request to send json via POST.
        $payload = json_encode($data);
        curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);
        curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
        curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type:application/json'));
        # Return response instead of printing.
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
        # Send request.
        $result = curl_exec($ch);
        curl_close($ch);
        print_r($result);
 
                    

Sample Response (Encoded JSON)

{
"waterscore":[{
    "Zip":99759,
    "City":"Point lay",
    "Score Sequence":29,
    "As of Date":"2020-04-30",
    "Zip Water Score":91.23010000000001,
    "Zip State Rank":"90th to 95th percentile",
    "Zip Country Rank":"95th to 100th percentile"
}],
"contaminantDetails":[
{
    "As of Date":"2020-01-31",
    "Zip Score Sequence":"25",
    "Zip":"99759",
    "utility_id":"AK2333013",
    "sample_dtm":"2017-03-14",
    "toxin_type_cd":"2955",
    "toxin_type_name":"XYLENES, 
    TOTAL","sample_amount":"0.9400000",
    "sample_unit":"UG\/L",
    "toxin_limit_value":"10",
    "toxin_limit_unit":"MG\/L",
    "health_risk_type_description":"Nervous system damage"
},
{
    "As of Date":"2020-01-31",
    "Zip Score Sequence":"25",
    "Zip":"99759","utility_id":"AK2331184",
    "sample_dtm":"2017-07-05",
    "toxin_type_cd":"1020",
    "toxin_type_name":"CHROMIUM",
    "sample_amount":"1.3000000",
    "sample_unit":"UG\/L",
    "toxin_limit_value":"0.10000000000000001",
    "toxin_limit_unit":"MG\/L",
    "health_risk_type_description":"Allergic dermatitis"
},
{
    "As of Date":"2020-01-31",
    "Zip Score Sequence":"25",
    "Zip":"99759",
    "utility_id":"AK2350235",
    "sample_dtm":"2017-08-11",
    "toxin_type_cd":"2950",
    "toxin_type_name":"TTHM",
    "sample_amount":"2.2000000",
    "sample_unit":"UG\/L",
    "toxin_limit_value":"0.080000000000000002",
    "toxin_limit_unit":"MG\/L",
    "health_risk_type_description":"Liver, kidney, or central nervous system problems; 
    increased risk of cancer"
},
{
    "As of Date":"2020-01-31",
    "Zip Score Sequence":"25",
    "Zip":"99759",
    "utility_id":"AK2330079",
    "sample_dtm":"2018-08-06",
    "toxin_type_cd":"2979",
    "toxin_type_name":"TRANS-1,2-DICHLOROETHYLENE",
    "sample_amount":"0.0007200",
    "sample_unit":"MG\/L",
    "toxin_limit_value":"0.10000000000000001",
    "toxin_limit_unit":"MG\/L",
    "health_risk_type_description":"Liver problems"
},
{
    "As of Date":"2020-01-31",
    "Zip Score Sequence":"25",
    "Zip":"99759",
    "utility_id":"AK2320426",
    "sample_dtm":"2019-01-22",
    "toxin_type_cd":"4030",
    "toxin_type_name":"RADIUM-228",
    "sample_amount":"1.4000000",
    "sample_unit":"PCI\/L",
    "toxin_limit_value":"0",
    "toxin_limit_unit":"MG\/L",
    "health_risk_type_description":""
},
{
    "As of Date":"2020-01-31",
    "Zip Score Sequence":"25",
    "Zip":"99759",
    "utility_id":"AK2320086",
    "sample_dtm":"2017-06-20",
    "toxin_type_cd":"1040",
    "toxin_type_name":"NITRATE",
    "sample_amount":"0.4500000",
    "sample_unit":"MG\/L",
    "toxin_limit_value":"10",
    "toxin_limit_unit":"MG\/L",
    "health_risk_type_description":"Infants below the age of six months who drink water 
     containing nitrate in excess of the MCL could become seriously ill and,
     if untreated, may die. Symptoms include shortness of breath and blue-baby syndrome."
},
{
    "As of Date":"2020-01-31",
    "Zip Score Sequence":"25",
    "Zip":"99759",
    "utility_id":"AK2331184",
    "sample_dtm":"2017-07-05",
    "toxin_type_cd":"1025",
    "toxin_type_name":"FLUORIDE",
    "sample_amount":"0.2000000",
    "sample_unit":"MG\/L",
    "toxin_limit_value":"4",
    "toxin_limit_unit":"MG\/L",
    "health_risk_type_description":"Bone disease (pain and tenderness of the bones);
     children may get mottled teeth"
},
{
    "As of Date":"2020-01-31",
    "Zip Score Sequence":"25",
    "Zip":"99759",
    "utility_id":"AK2330070",
    "sample_dtm":"2017-08-14",
    "toxin_type_cd":"2964",
    "toxin_type_name":"DICHLOROMETHANE",
    "sample_amount":"0.0012000",
    "sample_unit":"MG\/L",
    "toxin_limit_value":"0.0050000000000000001",
    "toxin_limit_unit":"MG\/L",
    "health_risk_type_description":"Liver problems; increased risk of cancer"
},
{
    "As of Date":"2020-01-31",
    "Zip Score Sequence":"25",
    "Zip":"99759",
    "utility_id":"AK2320248",
    "sample_dtm":"2018-10-10",
    "toxin_type_cd":"2992",
    "toxin_type_name":"ETHYLBENZENE",
    "sample_amount":"1.3000000",
    "sample_unit":"UG\/L",
    "toxin_limit_value":"0.69999999999999996",
    "health_risk_type_description":"Liver or kidney problems"
},
{
    "As of Date":"2020-01-31",
    "Zip Score Sequence":"25",
    "Zip":"99759",
    "sample_dtm":"2019-08-14",
    "toxin_type_cd":"1005",
    "sample_amount":"2.1000000",
    "sample_unit":"UG\/L",
    "toxin_limit_value":"0.01",
    "toxin_limit_unit":"MG\/L",
    "health_risk_type_description":"Skin damage or problems with circulatory systems,
     and may have increased risk of getting cancer"
},
{
    "As of Date":"2020-01-31",
    "Zip Score Sequence":"25",
    "Zip":"99759",
    "utility_id":"AK2333013",
    "sample_dtm":"2017-07-04",
    "toxin_type_cd":"1030",
    "toxin_type_name":"LEAD",
    "sample_amount":"0.6860000",
    "sample_unit":"UG\/L",
    "toxin_limit_value":"0.014999999999999999",
    "toxin_limit_unit":"TT; Action Level",
    "health_risk_type_description":"Infants and children: Delays in physical or mental development; 
     children could show slight deficits in attention span and learning abilities;
     Adults: Kidney problems; high blood pressure"
  }
 ]
}