api documentation

Request / Response Formats


All caíu.nu APIs support an optional return format parameter. Note that string is the default response format. but xml is also available. Some endpoints also support a json format.
XML format


All the Caiu supports XML APIs which is the XML format, json and string such as:


XML format


format » http://caiu.nu/_shared/API.php?type=xml&url=yourURL

<?xml version="1.0" encoding="UTF-8"?>
<response>
     <status_code>200</status_code>
     <status_txt>OK</status_txt>
     <data>
         <url>http://caiu.nu/$Url_gerada</url>
         <long_url>url_generated</long_url>
     </data>
</response>


JSON format


format » http://caiu.nu/_shared/API.php?type=json&url=suaURL

{"status_code":200,"dados":{"url":"http://Caiu.nu/a","long_url":"url_generated"}}


STRING format


format » http://caiu.nu/_shared/API.php?type=string&url=yourURL

http://Caiu.nu/url_generated


Errors


HTTP Response Status Code is 200 on all valid response in json and xml formats. In json and xml responses, the status_code and status_txt values indicate whether a request is well formed and valid.

Enter valid urls.

Please enter only valid methods (xml, string, json) always lowercase.

Always put the two fields, method and complete URL.