Login| Register|
logo image  

All.to API Documentation

Getting Started

  • All.to API Documentation
    • Getting Started
    • Authentication and Shared Parameters
    • Request / Response Formats
    • REST Api

Authentication and Shared Parameters

All API endpoints require that authentication credentials be supplied as query arguments.

To get started, you'll need a free All.to user account and apiKey. Signup at: http://all.to/user/register.

If you already have an account, you can find your apikey at: http://all.to/shorten/manage/apikey


Request / Response Formats

All.to api has a param of format, but now only support txt.
The HTTP Response Status Codes 200 and 500 was used.

The status_code is 200 for a successful request, and 500 for error.

When successful, server will return the short url. like this:

When error, server will return a message begin with error:
error:some error message



For a long URL, /api/shorten/shorturl encodes a URL and returns a short one.


urlthe long url that will be shorten,Required
prefixyou can use any prefix that we support, default is http://all.to/Optional
keycustomize short url keyOptional
key_passwordcustomize short url key passwordOptional
titlethe long url titleOptional
tagsthe tags of this url, split by commaOptional

  • Long URLs should be URL-encoded. You can not include a longUrl in the request that has '&', '?', '#', ' ', or other reserved parameters without first encoding it.
  • Long URLs should not contain spaces: any longUrl with spaces will be rejected. All spaces should be either percent encoded (%20) or plus encoded (+). Note that tabs, newlines and trailing spaces are all indications of errors. Please remember to strip leading and trailing whitespace from any user input before shortening.
  • use api, the shortened URL will be inserted into the history for the user specified by login.