cleanuri.com exposes its data via an Application Programming Interface (API), so developers can interact in a programmatic way with application.
This document is the official reference for that functionality.
Given a long URL, returns a short link.
- url - a long URL to be shortened (example: http://google.com/).
- Long URLs should be URL-encoded. You can not include a longUrl in the request that has &, ?, #, or other reserved parameters without first encoding it.
- Long URLs should not contain spaces: any longUrl with spaces will be rejected. All spaces should be either percent encoded %20 or plus encoded +. Note that tabs, newlines and trailing spaces are all indications of errors. Please remember to strip leading and trailing whitespace from any user input before shortening.
- result_url - short link
- error - information about the error, if it occurred
curl -XPOST -d 'url=https%3A%2F%2Fgoogle.com%2F' 'https://cleanuri.com/api/v1/shorten'
2 requests per second (per IP).