Skip to main content

Getting link info

The instructions below demonstrate how to get the information about a link: original URL, date of creation, domainID, mobile URLs, expiration, cloaking etc..

  1. 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 information about a particular short link:

📘

Please replace {user.domain_name} , {user.path} (the URL slug), {user.apiKey} with the appropriate values.

<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.short.io/links/expand?domain=<<domain_name>>&path=<<path>>",
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>>",
"accept: application/json"
],
]);

$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:
{
originalURL: 'YOUR_LONG_URL',
path: 'YOUR_PATH',
idString: 'LINK_ID',
id: 'LINK_ID',
shortURL: 'https://example.com/YOUR_PATH',
secureShortURL: 'https://example.com/YOUR_PATH',
cloaking: false,
title: 'LINK_TITLE',
tags: [],
createdAt: '2025-05-08T08:56:34.967Z',
skipQS: false,
archived: false,
DomainId: 115111,
OwnerId: 141117,
hasPassword: false
}