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:
To get links info
- 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
- Then you may need to install prerequisites for HTTP requests (if necessary, depending on your programming language and its version).
- Use the following code snippets to get the short links information:
Please replace example.xyz, YOUR_LONG_URL and 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;
}
import requests
url = "https://api.short.io/links/multiple-by-url?domain=<<domain_name>>&originalURL=<<long_url>>"
headers = {"Authorization": "<<apiKey>>"}
response = requests.get(url, headers=headers)
print(response.text)
const url = 'https://api.short.io/links/multiple-by-url?domain=<<domain_name>>&originalURL=<<long_url>>';
const options = {method: 'GET', headers: {Authorization: '<<apiKey>>'}};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.short.io/links/multiple-by-url?domain=<<domain_name>>&originalURL=<<long_url>>"))
.header("Authorization", "<<apiKey>>")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("https://api.short.io/links/multiple-by-url?domain=<<domain_name>>&originalURL=<<long_url>>"),
Headers =
{
{ "Authorization", "<<apiKey>>" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
- 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>>'
}
]
}
Updated 24 days ago