An API for lengthening shortened URLs, cleaning off tracking cruft, and tidying up Amazon links. The opposite of a URL shortener.
https://stretchlink.cc/api/1/?url=XXX
Key (synonym) | default | description |
---|---|---|
url | (required) | The URL to process |
clean | false | Remove known tracking elements |
include_title | false | Get the page title |
output (format) | text | Output format, can be text or json |
tidy_amazon (tidy) | false | Minimize Amazon product links |
(If output’s value starts with j
, JSON will be output, m
will output Markdown, and any other value will output a plain text link.)
$ curl https://stretchlink.cc/api/1/?url=https://is.gd/u2nJyq&output=json&include_title=true
Returns:
{
"original_url":"https://is.gd/u2nJyq",
"expanded_url":"https://www.popclip.app/extensions/x/6pa6yt",
"title":"Shorten Link — PopClip Extensions"
}
All url query parameters except for title
can be shortened to a single letter, and
booleans accept 1
/0
, true
/false
, or yes
/no
(case insensitive1):
curl https://stretchlink.cc/api/1?u=https://amzn.to/41FKQGN&t=1&c=1&o=text => https://www.amazon.com/dp/B0DGHTCKB1
API version: 1.0.18, last updated: 2024-12-21 14:19
include_title=true
to include title in JSON and Markdown outputoutput=markdown
optionThis is ideal for Apple Shortcuts as you can just use a boolean variable value directly in the URL, which will output Yes
or No
. ↩︎