Header

Developer API for our service

The AX.ag API allows developers to interact with our website.

How to embedd AX.ag for your site:

Send a POST or GET request to ax.ag with a "url" parameter, with either an "Accept: application/javascript" or "Accept: text/xml" header. You'll get a simple text response with the shortened URL:

$ curl --request GET --header "Accept: application/javascript" http://ax.ag/\?url=http://YOUR_WEBSITE_HERE

Output: http://ax.ag/12345
Example:
http://ax.ag?url=YOUR_WEBSITE_HERE >>> will compress your site with an AX.ag-Key and make an entry on our frontpage.

How to decompress an URL from AX.ag:

You can send a "reverse" parameter with the shortened key (not the whole URL, just the key) and you'll get the original URL in return:
$ curl --request GET --header "Accept: text/xml" http://ax.ag/\?reverse=12345

Output: http://YOUR_WEBSITE_UNCOMPRESSED
Example:
http://ax.ag?reverse=AXAG_KEY_HERE >>> will decompress the site and show the original URL.