---
updatedAt: 2025-11-05T21:11:58.000Z
agentTools:
  projectIndex: https://developers.short.io/llms.txt
---

# Getting link info

Get a long URL by domain name and a path of a short URL

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

## To get short link info

1. [Create a secret API key ](https://developers.short.io/docs/creating-an-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 **example.xyz** , **YOUR_PATH** (the URL slug), **{user.apiKey}**  with the appropriate values.

```php
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://api.short.io/links/expand?domain=example.xyz&path=YOUR_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;
}
```
```python
import requests

url = "https://api.short.io/links/expand?domain=example.xyz&path=YOUR_PATH"

headers = {
    "accept": "application/json",
    "Authorization": "<<apiKey>>"
}

response = requests.get(url, headers=headers)

print(response.text)
```
```node Node.js
const url = 'https://api.short.io/links/expand?domain=example.xyz&path=YOUR_PATH';
const options = {
  method: 'GET',
  headers: {accept: 'application/json', Authorization: '<<apiKey>>'}
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```
```java
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://api.short.io/links/expand?domain=example.xyz&path=YOUR_PATH"))
    .header("accept", "application/json")
    .header("Authorization", "<<apiKey>>")
    .method("GET", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
```
```csharp
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Get,
    RequestUri = new Uri("https://api.short.io/links/expand?domain=example.xyz&path=YOUR_PATH"),
    Headers =
    {
        { "accept", "application/json" },
        { "Authorization", "<<apiKey>>" },
    },
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
```

5. Review the JSON response which should resemble the following:

```json
{
  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
}

```