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 against our Green Web database.
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 /greencheck/{url} script at this url. http://api.thegreenwebfoundation.org/greencheck/{url}
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".
http://api.thegreenwebfoundation.org/greencheck/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.
Looking up "www.cleanbits.nl" with the greencheck api
http://api.thegreenwebfoundation.org/greencheck/www.cleanbits.nl
returns the following json result
{
"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
The Green Web add-ons
There are add-ons that use this api, available at The Green Web Foundation webiste, called
The Green Web.
It shows you for every website you visit if it is green, and if so the hosting party.
Widgets
In the future, we will add some widgets to this page, so that you can easily put a greencheck widget on your site,
without the need to code it yourself