an open link shortener

Open Link Shortener Public

openlinkshortenerfix typo5 hours ago
approute the short names3 weeks ago
docsusage, as written for scripts3 weeks ago
testsround trip, odd addresses2 months ago
.gitignoreignore the editor droppings1 year ago
LICENSEMIT, like everything else here1 year ago
README.mdfix typo5 hours ago

README.md

Open Link Shortener

buildunknown licenseMIT costfree

The README is the home page.

Make a short link

Leave empty and we pick one. The same address always gives the same short link.

Usage

Most callers are scripts. A plain GET is all it takes.

Open Link Shortener: a free URL shortener. No sign-up and no API token.

Make a link. The answer is the short link on one line:

    https://www.openlinkshortener.com/api/create?url=https://example.com/a/long/address

From a shell:

    curl -G https://www.openlinkshortener.com/api/create --data-urlencode 'url=https://example.com/page?a=1&b=2'
    curl https://www.openlinkshortener.com/api/create -d 'url=https://example.com/a/long/address'

Pick the short name yourself, 1 to 64 letters, digits, - or _:

    https://www.openlinkshortener.com/api/create?alias=my-name&url=https://example.com/a/long/address

As JSON:

    https://www.openlinkshortener.com/api/create?format=json&url=https://example.com/a/long/address
    curl https://www.openlinkshortener.com/api/create -H 'Accept: application/json' -d 'url=https://example.com/page'

Follow a link, or see where it leads without going there:

    https://www.openlinkshortener.com/<code>         redirects
    https://www.openlinkshortener.com/<code>+        the address as text
    https://www.openlinkshortener.com/<code>.json    the address and when the link was made

Put url last, or percent-encode it: an address written out as it is
runs to the end of the line, with its own ? and & in it.

The same address gives the same short link every time, unless you name
it yourself. A name that is taken answers 409. Links do not expire.

Add + to any short link to see where it leads. Free, no sign-up, no API key, links do not expire.