Ads Header

Get Paid to Shrink URL






adf.ly provides you with a simple, yet useful API for your application. Simply have your application access a URL like the following example:
http://api.adf.ly/api.php?key=c008d02083f8759d6100becc6707de30&uid=1024938&advert_type=int&domain=adf.ly&url=http://somewebsite.com
Replace "http://somewebsite.com" with whatever URL you are wanting shortened. The "key" and "uid" fields must be as they are above or the request will return an error.
Replace "advert_type=int" with "advert_type=banner" if you require the Framed Banner advertising option.
Replace "domain=adf.ly" with "domain=q.gs" if you wish to use our q.gs domain.
The shortened URL will be returned to you in the body of the response in plain text. If the request was unsuccessful for any reason you will receive "error" as your response. If the exact link you request is already in your account, the original shortened URL will be returned to you and no new entry added to your account.
There will most likely be special characters in the URL you send, so you must encode the URL with Javascript's encodeURIComponent() or its equivalent in other languages, otherwise your request will fail.