Getting Clicks for Links per ID

Gets link clicks for link ids


Information below might be outdated - please visit our recently updated API Reference

The instruction below shows how to get the number of clicks for links.

  • Click "Create API key".
  • Add a Secret key.

2) Copy an ID of a short link you want to get detailed statistics.

  • Open the statistics of the short link.
  • Copy the link ID.

3) Install prerequisites for requests.

pip install requests
npm install --save axios

Now everything is ready to run the following snippet. It will send the number of clicks for short URLs.

4) Create a file: .js/ .rb. Use the code snippet below.


Please, replace DOMAIN_ID and IDS with appropriate values.

import requests

url = ""

querystring = {"ids":"293627801, 292673342"}

headers = {
    'accept': "*/*",
    'authorization': "<<apiKey>>"

response = requests.request("GET", url, headers=headers, params=querystring)

const axios = require('axios');

axios.get('', {
    params: {
        ids: '293627801, 292673342'
		headers: {
        authorization: '<<apiKey>>'
.then(function (response) {
.catch(function (response) {
require 'uri'
require 'net/http'
require 'openssl'

url = URI("")

http =, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request =
request["accept"] = '*/*'
request["authorization"] = '<<apiKey>>'

response = http.request(request)
puts response.read_body

5) Launch the file.

node filename.js
ruby filename.rb

6) JSON Response.

Once you run the code, you will see the response.

  '292673342': 0, '293627801': 1