Usage
A link API with one call. This page is the reference.
Usage
Agent Link API: a free URL shortener. No sign-up and no API token.
Make a link. The answer is JSON and the short link is in "shorturl":
https://www.agentlinkapi.com/api/v2/links?long_url=https://example.com/a/long/address
From a shell:
curl -G https://www.agentlinkapi.com/api/v2/links --data-urlencode 'long_url=https://example.com/page?a=1&b=2'
curl https://www.agentlinkapi.com/api/v2/links -d 'long_url=https://example.com/a/long/address'
Pick the short name yourself, 1 to 64 letters, digits, - or _:
https://www.agentlinkapi.com/api/v2/links?custom_alias=my-name&long_url=https://example.com/a/long/address
As one line of text:
https://www.agentlinkapi.com/api/v2/links?format=text&long_url=https://example.com/a/long/address
Follow a link, or see where it leads without going there:
https://www.agentlinkapi.com/<code> redirects
https://www.agentlinkapi.com/<code>+ the address as text
https://www.agentlinkapi.com/<code>.json the address and when the link was made
Put long_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.