Welcome to the Green Web Foundation Api Service
Currently available services
- Greencheck api service: With the Green Web Foundation greencheck api service it is possible to check if a website is green.
Example
Results
Fill in a website and click the check button to check it
Usage
The greencheck api service can be used by calling the json.php script at this url. http://api.thegreenwebfoundation.org/json.php
The greencheck api service expects only one parameter : "url". This should be the url of a website without the "http://" part, so just "www.example.com". This url parameter is checked and the result is returned to the calling script. The result contains a couple of fields:
- If the url was not valid, then only an error field is returned
- For a correct url, both the url and the green field are returned. Green is either true or false. For websites that are hosted on a known hosting provider we return a "hostedby" and "hostedbywebsite" with either the Name and website of the hosting provider.
The following is returned for "www.cleanbits.nl"
{
"green":true,
"url":"www.cleanbits.nl",
"hostedby":"LEASEWEB",
"hostedbywebsite":"www.leaseweb.com"
}
Jquery example
View the source of this webpage to see how you can call the greencheck api service by using jquery