# Unshorten.me

> Find out where short links really lead with Unshorten.me, which follows a bit.ly, t.co, TinyURL, ow.ly or other short link and reports the full address it ends up at, without anybody opening it. Unshorten one link, a whole list of links, or every link in a message, and get the website each one leads to, ready to check against the sites you trust. Needs a free Unshorten.me account.

App · Links and QR Codes · 3 actions. Web page: https://docs.lodol.com/docs/integrations/unshorten-me

## Actions

### Unshorten a link

Find the full address a short link leads to, such as a bit.ly, t.co, TinyURL or ow.ly link, without opening it: Unshorten.me follows the link and reports where it ends up. Use it to see where a link in an email or a message really goes before anybody clicks it, or to keep the real address instead of the short one. A link that is already the full address comes back as itself.

**Inputs**

- Link (`url`, text, required): The short link to unshorten, as it appears in the message, e.g. https://bit.ly/3DKWm5t. A link written without https:// gets it added, so bit.ly/3DKWm5t works too. Up to 2,000 characters.

**Outputs**

- `domain` (text): The website the link leads to: the host name of original_url, in lower case, e.g. www.youtube.com. Check it against the sites you trust before anybody clicks the link. Null in the rare case the address has no host name.
- `original_url` (text): The full address the link leads to: where somebody who clicked it would end up, e.g. https://www.youtube.com/.
- `redirects` (true/false): Whether the link leads somewhere other than itself, as every short link does. False for a link that was already the full address.
- `short_url` (text): The link that was looked up, e.g. https://bit.ly/3DKWm5t. An address typed without https:// comes back with it added.

**Example output**

```json
{
  "domain": "www.youtube.com",
  "original_url": "https://www.youtube.com/",
  "redirects": true,
  "short_url": "https://bit.ly/3DKWm5t"
}
```

### Unshorten several links

Unshorten a whole list of links in one step, up to 25, and get one result for each, in the order you gave them, along with the websites they lead to. A link Unshorten.me cannot follow is reported beside the rest with the reason instead of stopping the run, and a link listed twice is looked up once.

**Inputs**

- Links (`urls`, list, required): The links to unshorten: a list from an earlier step, such as a column of a spreadsheet, or pasted in with one on each line. Up to 25 at a time, since each one is a request and the free plan answers 10 new links an hour.

**Outputs**

- `count` (number): How many links were handled in total.
- `domains` (list): The websites the links lead to, each once, in the order they first appear: the domain of every link that was unshortened. Check it against the sites you trust.
- `failed_count` (number): How many could not be unshortened. Branch on this to catch a link nobody could check.
- `links` (list): One entry per link you gave, in the same order.
- `redirect_count` (number): How many lead somewhere other than themselves, as short links do.
- `unshortened_count` (number): How many of them Unshorten.me said where they lead.

**Example output**

```json
{
  "count": 2,
  "domains": [
    "www.youtube.com",
    "example.com"
  ],
  "failed_count": 0,
  "links": [
    {
      "domain": "www.youtube.com",
      "error": null,
      "original_url": "https://www.youtube.com/",
      "redirects": true,
      "short_url": "https://bit.ly/3DKWm5t",
      "unshortened": true
    },
    {
      "domain": "example.com",
      "error": null,
      "original_url": "https://example.com/",
      "redirects": false,
      "short_url": "https://example.com/",
      "unshortened": true
    }
  ],
  "redirect_count": 1,
  "unshortened_count": 2
}
```

### Unshorten the links in a message

Hand over a message, such as an email body or a text, and get it back with every short link swapped for the full address it leads to and nothing else touched, along with the websites its links lead to. Use it to see where a message's links really go before anybody clicks one. A link Unshorten.me cannot follow is left as it was written, with the reason beside it.

**Inputs**

- Message (`text`, text, required): The message to unshorten the links in, with up to 25 different links. Every link starting with http:// or https:// is looked up, and everything else comes back untouched, line breaks included, so this can be a whole email body or text message.

**Outputs**

- `count` (number): How many links were handled in total.
- `domains` (list): The websites the links lead to, each once, in the order they first appear: the domain of every link that was unshortened. Check it against the sites you trust.
- `failed_count` (number): How many could not be unshortened. Branch on this to catch a link nobody could check.
- `links` (list): One entry per link found in the message, in the order they appear. A link written twice appears once.
- `redirect_count` (number): How many lead somewhere other than themselves, as short links do.
- `text` (text): The message, with each link that leads somewhere else swapped for the full address and every other character exactly as it was.
- `unshortened_count` (number): How many of them Unshorten.me said where they lead.

**Example output**

```json
{
  "count": 1,
  "domains": [
    "www.youtube.com"
  ],
  "failed_count": 0,
  "links": [
    {
      "domain": "www.youtube.com",
      "error": null,
      "original_url": "https://www.youtube.com/",
      "redirects": true,
      "short_url": "https://bit.ly/3DKWm5t",
      "unshortened": true
    }
  ],
  "redirect_count": 1,
  "text": "Watch this before you click: https://www.youtube.com/",
  "unshortened_count": 1
}
```
