Skip to main content

Get links info by original URL

In some circumstances, you may want to generate multiple short links from the same original URL, for example, to compare how your campaigns perform across different social media sites. Follow the instructions below on how to use the Short.io API to get the information for all the short links created with the same long link:

  1. To use our API, it is required to create a secret API key from the Integrations and API menu: https://app.short.io/settings/integrations/api-key
  2. Then you may need to install prerequisites for HTTP requests (if necessary, depending on your programming language and its version).
  3. Use the following code snippets to get the short links information:

📘

Please replace {user.domain_name}, {user.long_url} and {user.apiKey} with the appropriate values.

<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.short.io/links/multiple-by-url?domain=<<domain_name>>&originalURL=<<long_url>>",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <<apiKey>>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
  1. Review the JSON response which should resemble the following:
{
links: [
{
createdAt: '2025-06-02T08:57:28.746Z',
source: 'website',
DomainId: 1164000,
archived: false,
OwnerId: 1456817,
updatedAt: '2025-06-02T09:00:07.021Z',
originalURL: '<<long_url>>',
tags: [],
cloaking: false,
title: '<<title>>',
icon: 'https://shortiougc.com/icons/b7c594f9-7ccc-43f4-a567-b54846220ee2',
path: '<<path>>',
id: 'lnk_4SOc_UQqxRNCkuNl111',
idString: 'lnk_4SOc_UQqxRNCkuNl111',
shortURL: '<<short_link1>>',
secureShortURL: '<<short_link1>>'
},
{
createdAt: '2025-06-02T09:17:46.528Z',
source: 'website',
DomainId: 1164000,
archived: false,
OwnerId: 1456817,
updatedAt: '2025-06-02T09:17:57.803Z',
originalURL: '<<long_url>>',
tags: [],
cloaking: false,
title: '<<title>>',
icon: 'https://shortiougc.com/icons/91a95cb9-6258-4569-9bdf-34a80dd32827',
path: '<<path>>',
id: 'lnk_4SOc_mNjj3o4ilZZFjRI5222',
idString: 'lnk_4SOc_mNjj3o4ilZZFjRI5222',
shortURL: '<<short_link2>>',
secureShortURL: '<<short_link2>>'
},
{
createdAt: '2025-06-02T09:00:16.779Z',
source: 'website',
DomainId: 1164000,
archived: false,
OwnerId: 1456817,
updatedAt: '2025-06-02T09:01:29.062Z',
originalURL: '<<long_url>>',
tags: [],
cloaking: false,
title: '<<title>>',
icon: 'https://shortiougc.com/icons/25835800-b5e8-4b05-b2c5-acc05bee80d0',
path: '<<path>>',
id: 'lnk_4SOc_xIQktdesTJzBZL4pEU333',
idString: 'lnk_4SOc_xIQktdesTJzBZL4pEU333',
shortURL: '<<short_link3>>',
secureShortURL: '<<short_link3>>'
}
]
}