# is.gd

> Shorten links with is.gd, the free link shortener, or with its sister service v.gd, whose links show people where they lead before sending them on. Shorten one link, with an ending of your choosing if you like, a whole list of links, or every link inside a message, and check where an is.gd or v.gd link goes without opening it. The same link always gives back the same short link, so a workflow that runs every day reuses its links instead of making new ones. No account or API key required.

App · Links and QR Codes · 4 actions. Web page: https://docs.lodol.com/docs/integrations/is-gd

## Actions

### Check where a short link goes

Find the address an is.gd or v.gd link opens, without opening it: is.gd is asked, so nothing is fetched from the far side and no visit is counted. Takes the whole link, a v.gd or preview link included, or just the code of an is.gd one. No API key required.

**Inputs**

- Short link (`short_url`, text, required): The is.gd or v.gd link to look up: the whole link, or just the code at the end of an is.gd one. Capitals count, so AG3Hwv and ag3hwv are different links.

**Outputs**

- `code` (text): The end of the short link, after is.gd/ or v.gd/, e.g. AG3Hwv. Capitals count.
- `original_url` (text): The address the short link opens: the long link somebody shortened.
- `preview_url` (text): The short link's preview page, which shows where it goes without going there: the short link with a dash on the end, e.g. https://is.gd/AG3Hwv-.
- `service` (text): 'is.gd', whose links open their destination straight away, or 'v.gd', whose links show a preview page first.
- `short_url` (text): The short link, e.g. https://is.gd/AG3Hwv, or https://v.gd/lcmljb for a link that shows a preview first. Paste this wherever the long one would have gone.

**Example output**

```json
{
  "code": "c5duOZ",
  "original_url": "https://www.google.com/search?q=test&hl=en",
  "preview_url": "https://is.gd/c5duOZ-",
  "service": "is.gd",
  "short_url": "https://is.gd/c5duOZ"
}
```

### Shorten a link

Turn a long web address into a short is.gd link to paste into a text message, a post, an invoice or anywhere else the whole address would not fit. Optionally choose how it ends, make a v.gd link that shows people where it leads before sending them on, or count its visits. The same link always gives the same short link, so a workflow that runs again reuses the one it made. No API key required.

**Inputs**

- Link (`url`, text, required): The web address to shorten, up to 5,000 characters. Paste it exactly as it appears in the address bar: question marks, ampersands and tracking parameters are all fine, and an address typed without https:// gets it added. Other kinds of link work too, such as mailto: and tel: ones.
- Custom ending (`custom_ending`, text): Optional. What the short link ends with instead of a random code, such as spring_sale for is.gd/spring_sale: 5 to 30 letters, numbers and underscores, where capitals count. An ending that is taken cannot be had, unless it already opens this same link, as it does when the step runs again.
- Show a preview first (`preview_page`, true/false): Make v.gd links instead of is.gd ones. v.gd is is.gd's sister service: its links show people where they lead and let them choose to go on, rather than sending them straight there, which suits links sent to people who do not know you. The two keep separate links. Default: `false`.
- Count visits (`count_visits`, true/false): Keep count of how often the link is opened, on a statistics page that anyone with the link can see. A link that counts visits is a new one every time, even for a link shortened before, and uses twice as much of is.gd's hourly limit. Default: `false`.

**Outputs**

- `code` (text): The end of the short link, after is.gd/ or v.gd/, e.g. AG3Hwv. Capitals count.
- `original_url` (text): The long link, as it was sent. An address typed without https:// comes back with it added, so this is exactly what the short link opens.
- `preview_url` (text): The short link's preview page, which shows where it goes without going there: the short link with a dash on the end, e.g. https://is.gd/AG3Hwv-.
- `service` (text): 'is.gd', whose links open their destination straight away, or 'v.gd', whose links show a preview page first.
- `short_url` (text): The short link, e.g. https://is.gd/AG3Hwv, or https://v.gd/lcmljb for a link that shows a preview first. Paste this wherever the long one would have gone.
- `stats_url` (text): The page counting the link's visits, e.g. https://is.gd/stats.php?url=AG3Hwv, when Count visits was on; otherwise null.

**Example output**

```json
{
  "code": "AG3Hwv",
  "original_url": "https://example.com/",
  "preview_url": "https://is.gd/AG3Hwv-",
  "service": "is.gd",
  "short_url": "https://is.gd/AG3Hwv",
  "stats_url": null
}
```

### Shorten several links

Shorten a whole list of links in one step, up to 25, and get one result for each, in the order you gave them. A link is.gd will not take is reported beside the rest with the reason instead of stopping the run, and an is.gd or v.gd link already in the list is kept as it is. No API key required.

**Inputs**

- Links (`urls`, list, required): The links to shorten: 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 is.gd limits how many links Lodol can make an hour.
- Show a preview first (`preview_page`, true/false): Make v.gd links instead of is.gd ones. v.gd is is.gd's sister service: its links show people where they lead and let them choose to go on, rather than sending them straight there, which suits links sent to people who do not know you. The two keep separate links. Default: `false`.

**Outputs**

- `already_short_count` (number): How many were already is.gd or v.gd links and were left as they were.
- `count` (number): How many links were handled in total.
- `failed_count` (number): How many could not be shortened. Branch on this to catch a bad link before a message goes out.
- `links` (list): One entry per link you gave, in the same order.
- `shortened_count` (number): How many of them were shortened.

**Example output**

```json
{
  "already_short_count": 1,
  "count": 3,
  "failed_count": 0,
  "links": [
    {
      "already_short": false,
      "error": null,
      "original_url": "https://example.com/",
      "short_url": "https://is.gd/AG3Hwv",
      "shortened": true
    },
    {
      "already_short": false,
      "error": null,
      "original_url": "https://en.wikipedia.org/wiki/URL_shortening",
      "short_url": "https://is.gd/WEK2bc",
      "shortened": true
    },
    {
      "already_short": true,
      "error": null,
      "original_url": "https://is.gd/dsUwVY",
      "short_url": "https://is.gd/dsUwVY",
      "shortened": false
    }
  ],
  "shortened_count": 2
}
```

### Shorten the links in a message

Hand over a message and get it back with every link in it replaced by a short one and nothing else touched, with its length counted so the next step can check it still fits a text message. A link that cannot be shortened is left where it is, so a message never goes out with a hole in it. No API key required.

**Inputs**

- Message (`text`, text, required): The message to shorten the links in, up to 25 different links. Everything that is not a link comes back untouched, line breaks included, so this can be a whole text message, post or email body.
- Show a preview first (`preview_page`, true/false): Make v.gd links instead of is.gd ones. v.gd is is.gd's sister service: its links show people where they lead and let them choose to go on, rather than sending them straight there, which suits links sent to people who do not know you. The two keep separate links. Default: `false`.

**Outputs**

- `already_short_count` (number): How many were already is.gd or v.gd links and were left as they were.
- `character_count` (number): How long the message is now. A text message fits in 160 characters, which is usually why the links were shortened.
- `count` (number): How many links were handled in total.
- `failed_count` (number): How many could not be shortened. Branch on this to catch a bad link before a message goes out.
- `links` (list): One entry per link found in the message, in the order they appear. A link written twice appears once.
- `shortened_count` (number): How many of them were shortened.
- `text` (text): The message, with each link swapped for its short one and every other character exactly as it was.

**Example output**

```json
{
  "already_short_count": 0,
  "character_count": 46,
  "count": 1,
  "failed_count": 0,
  "links": [
    {
      "already_short": false,
      "error": null,
      "original_url": "https://en.wikipedia.org/wiki/URL_shortening",
      "short_url": "https://is.gd/WEK2bc",
      "shortened": true
    }
  ],
  "shortened_count": 1,
  "text": "Read about short links at https://is.gd/WEK2bc"
}
```
