The SDK is currently in active development. For more details, see the U301 Postman docs.

Most-Visited Shortlinks

Get the top shortlinks based on click volume.

Use this API to retrieve recent most visited shortlinks in a specified date range.

u301.analytics.getTopShortLinks
import { U301 } from 'u301';

const apiKey = '<YOUR_API_KEY>';
const workspaceId = '<YOUR_WORKSPACE_ID>';

const u301 = new U301({
  apiKey,
  workspaceId,
});

const clicks = await u301.analytics.getTopShortLinks({
    range: '1m',
    timezone: 'Europe/London'
})

the response schema

Request

NameLocationTypeRequiredDefaultDescription
AuthorizationHeaderstringBearer token used for authentication.
workspaceIdQuerystringWorkspace identifier for multi‑tenant routing.
rangeQuerystringDate range for data aggregation.
timezoneQuerystringUTCTimezone for data aggregation. See Timezone for details.

Response

Data is an array of objects, each object contains the shortlink label and click count.

{
    "datetimeRange": [
        "2025-11-01T00:00:00.000Z",
        "2025-11-30T23:59:59.999Z"
    ],
    "range": "1m",
    "data": [
        {
            "label": "u301.co/aK",
            "click": 20657
        },
        // ...
        {
            "label": "u301.co/gedU",
            "click": 1
        }
    ]
}

Last updated on

On this page