The Webpage to Icon API converts URL's into icons, just try this demo to see it in action. The Webpage to Icon API is not simply a favicon finder, but instead bases the final icon on all the available icons for the webpage. If no icons are available it will generate one for the webpage. The source icon chosen, the background and any border selected can change depending on the users requirements.
To get started with the API replace the APPLICATION KEY text example in the below call with your application key then set the size parameter, which defaults to 32. Finally specify the webpage that you want to turn into an icon, by passing the required URL to the URL parameter. In the following example http://www.google.com is being converted into a 48x48 pixel icon.
//api.grabz.it/services/icon.ashx?key=Sign in to view your Application Key&size=48&url=http://www.google.com
It is a good idea to keep the url parameter as the last parameter in the querystring as this avoids having to URL encode most URLs passed to the Webpage to Icon API.
While the Icon can be downloaded this with a server side language such as PHP. It can also be displayed directly in a web page as shown below. Remember that when using the Icon API in a webpage the domain of the webpage must be added to the list of authorized domains.
<img src="//api.grabz.it/services/icon.ashx?key=Sign in to view your Application Key&size=48&url=http://www.google.com"/>
An icon can also be transformed just pass the transform you want to apply from the options below. An example of which can be seen here were the transform makes the resulting icon sepia.
//api.grabz.it/services/icon.ashx?key=Sign in to view your Application Key&transform=sepia&size=48&url=http://www.google.com
The Webpage to Icon API accepts the following four parameters.
The Webpage to Icon API can return the following error codes.