TinyArrows for Developers
We have a pretty straight-forward API for developers. This is used to create short links in the style and mode you like.
The default API call is simply this:
Which will return something like this in raw HTML:
(which, when displayed on a website would look more like this: http://➡.ws/abcb)
api-create.php is the core API used to shrink URLs.
url - The URL you want to shrink. This parameter has to be last in the query string and is the most important part. Don't phone us without it.
host - This allows you to specify which of our domains you want the short URL to come from. We support a number of custom domains.
The following host parameters are supported as of the last time we updated this document:
- xn--ogi.ws for ➨.ws
- xn--vgi.ws for ➯.ws
- xn--3fi.ws for ➔.ws
- xn--egi.ws for ➞.ws
- xn--9gi.ws for ➽.ws
- xn--5gi.ws for ➹.ws
- xn--1ci.ws for ✩.ws
- xn--odi.ws for ✿.ws
- xn--rei.ws for ❥.ws
- xn--cwg.ws for ›.ws
- xn--bih.ws for ⌘.ws
- xn--fwg.ws for ‽.ws
- xn--l3h.ws for ☁.ws
- ta.gd for ta.gd
suggest - This allows you to try to specify your own word to use for the short URL. If it doesn't work, we'll respond with a random URL instead.
New: The suggest feature can now request non-unicode URL suffixes. If you set suggest=_nounicode then we'll try to send you a random ASCII-based URL suffix.
utfpure - Set this to 1 and we'll return the entire URL in UTF-8 without using HTML entity encoding for the hostname. We really recommend everyone use this, but the existing API can't be changed without breaking people who rely upon it.
userid - Set this to the userid of a specific user and the tiny URL created will be registered with their account. (Note that user accounts haven't been made publicly available yet.)
DescriptionQuick API that returns the punycode version of a link that uses an International Domain Name. Some platforms do not support automatic decoding of these links to their punycode/ASCII form, so this API may be handy for converting tinyarro.ws links to ASCII. iPhone is one such platform where NSURL doesn't quite support international domains in the API (even though Safari does).
url - Provide the url-encoded unicode URL to convert to punycode.
DescriptionJust like idn-lookup, but instead of returning the ASCII version of the IDN, it performs an HTTP redirect to the punycoded site. Use this if you need an easy mechanism to just quickly redirect a user to a domain you think may be IDN (though should work with any domain). Useful especially for platforms or browsers that don't have full IDN support built-in.
url - Provide the url-encoded unicode URL to convert and then redirect the user.
Would perform a 301 redirect to this url: