YOURLSGET(1) YOURLS GET API YOURLSGET(1)

NAME

yourlsget - shorten a URL with one GET

SYNOPSIS

url:
-n name: (optional)

DESCRIPTION

YOURLSGET(1): a GET request in, a short link out.

It is free. There is no sign-up, no account and no API key. Links do not expire. The same address always gives the same short link.

Append + to a short link to see where it leads.

Works from scripts with a plain GET. Nothing else is needed.

YOURLS GET API: a YOURLS you can call without a signature. No account and no API key.

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

    https://www.yourlsgetapi.com/yourls-api.php?action=shorturl&format=simple&url=https%3A%2F%2Fexample.com%2Fa%2Flong%2Faddress

From a shell:

    curl -G https://www.yourlsgetapi.com/yourls-api.php -d action=shorturl -d format=simple --data-urlencode 'url=https://example.com/page?a=1&b=2'
    curl https://www.yourlsgetapi.com/yourls-api.php -d action=shorturl -d format=simple -d 'url=https://example.com/a/long/address'

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

    https://www.yourlsgetapi.com/yourls-api.php?action=shorturl&format=simple&keyword=my-name&url=https%3A%2F%2Fexample.com%2Fa%2Flong%2Faddress

See where a link leads:

    https://www.yourlsgetapi.com/yourls-api.php?action=expand&format=simple&shorturl=<keyword>
    https://www.yourlsgetapi.com/<keyword>+

Follow one:

    https://www.yourlsgetapi.com/<keyword>

format is json, xml, jsonp (with callback) or simple; xml when it is left out.
Percent-encode url, or put it last: 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. Links do not expire.

OPTIONS

-n name The short name to use instead of a generated one.

format=html Send back a page rather than the bare link.

SEE ALSO

curl(1), wget(1), shorturl(7), yourls-get(3), rfc2616(7)

BUGS

Probably.

AUTHOR

Not recorded.


2002-03-14 YOURLSGET(1) 2002-03-14