srs.li

YA SRSLY! IT SHORTENS URLS!

API

srs.li provides a simple REST interface for your bot-building pleasure

Create

Simply make a GET request to http://srs.li/api/create?plaintext&url=http://www.example.com/ and you'll get your shortened URL as plain text back. The 'plaintext' parameter just has to be present, it's value is ignored.

If everything was alright, you get a HTTP 200. If not, well... shit happens. The response body should explain what went wrong.

Reverse Lookup

Another API method is doing reverse lookup, that is giving it the short url and getting the long one back. To do that, tell your HTTP client to GET http://srs.li/api/reverselookup/ID (replace ID with the link id, the stuff after the slash after the hostname).

Again, if everything was alright, you get a HTTP 200. If the link id was not found, you'd get a HTTP 404.