Features
- Generate or get existing short URLs, with sequential or custom keyword
- Get statistics about your links: top clicked links, least clicked links, newest links
- Output format: JSON, XML, or simple raw text
The Easy Way
- "The simplest way to use ou.gd is an HTTP GET: http://ou.gd/api.php?format=simple&action=shorturl&url=[YOURURL] which will return a text string http://ou.gd/[SHORTURL]
Usage
You need to send parameters to http://ou.gd/api.php either via GET or POST. These parameters are:
- The requested
action: "shorturl" (get short URL for a link), "expand" (get long URL of a shorturl), "url-stats" (get stats about one short URL) or "stats" (get stats about your links) - With action = "shorturl" :
- the
urlto shorten - optional
keywordfor custom short URLs - output
format: either "json", "xml" or "simple"
- the
- With action = "expand" :
- the
shorturlto expand (can be either 'abc' or 'http://site/abc') - output
format: either "json", "xml" or "simple"
- the
- With action = "url-stats" :
- the
shorturlfor which to get stats (can be either 'abc' or 'http://site/abc') - output
format: either "json" or "xml"
- the
- With action = "stats" :
- the
filter: either "top", "bottom" , "rand" or "last" - the
limit(maximum number of links to return) - output
format: either "json" or "xml"
- the
Sample return
<result> <url> <id>62019439011</id> <keyword>shorter</keyword> <url>http://somereallylongurlyouneedtoshrink.com/</url> <date>2009-06-23 18:08:07</date> </url> <status>success</status> <message>http://somereallylongurlyouneedtoshrink.com/ (ID: shorter) added to database</message> <shorturl>http://ou.gd/shorter</shorturl> </result>
