Use the Link Shortener API to shorten and track links

Reliable and fast to help you grow your brand.

Universal Link Shortener API

API Designed for Ease

We have optimized for ease of implementation. All API methods are accessible via simple HTTP calls. Most implementations of this API take less than 15 minutes to setup. Simply call the provided URLs with their respective parameters, and you're done.

Getting Started: Authentication

All API endpoints require API authentication credentials to be supplied as query arguments. To get started, you'll need a free Shareaholic account and Site ID. Signup for an account and then add your site to get your Site ID. The Site ID is your API Key for the URL Shortener API.



Note: the apikey used in this document is intended for use as an example only. It is subject to change.



Parameter Description Required Example
url URL to shorten Required url=
apikey API Key Required apikey=8943b7fd64cd8b1770ff5affa9a9437b
service[name] Shortener Service Optional service[name]=shrlc (shrlc|bitly|tinyurl)
service[token] Service Authentication Optional service[token]=0642e640dc831a3f32b68e579acssdbeaab1b360

Working Example:[name]=shrlc

You may use your own Bitly Generic Access Token by passing in an additional service[token] parameter. When set, the URL Shortener API will use your personal key to shorten the link.[name]=bitly&service[token]=[INSERT YOUR BITLY Generic Access Token]

Example success response:

"status_code": "200",
"data": ""

Give it a try: Shorten with SHRLC

Example error response:

       "detail":"Missing URL. See for usage examples."


URL Shortener API checks if the provided URL is safe with the help of Google Safe Browsing. In the case of unsafe URL, the API will respond with the original URL and message that indicates why the URL is not safe.

For example:[name]=shrlc


"errors": [
    "code": "145",
    "source": {
      "pointer": "/data/attributes/short-url"
    "detail": "Unsafe URL: Malware (Any platform)"

Error codes

Code Description
100 apikey not provided
101 apikey provided is invalid
140 Missing URL
141 Invalid URL
145 URL shortening problem or unsafe URL
429 rate_limit_exceeded

Rate Limits

In order to maintain an efficient, secure, and high-performing API, there are limits on how many times this API can be called in any given period. If you exceed your per-hour or per-minute call limit, you will receive a rate_limit_exceeded 429 error. To increase your limit, subscribe to a higher plan or contact your account manager for assistance. API responses include X-RateLimit-* headers that describe rate limit usage.


If you believe you have found a bug, or you’d like to request additional functionality, or you release something using this API, we’d love to hear from you.

Build with Shareaholic

Developer Tools and APIs that are reliable, stable, and fast. Built and run on the same scaled cloud infrastructure that runs Shareaholic products and powers functionality across over 300,000+ sites. Over 10 rock solid years in production.

As seen in