API - pra.la : simplifiyng ways

PRA.LA API Documentation

Description

The point of this document, is clarify how works PRA.LA API for create short URLs.

API URL

To make calls, is mandatory use the URL:

http://pra.la/api

Parameters

The following parameters are accept:

  • url: Contain the long URL that will be shortned.
  • custom (optional): Contain the custom URL name.
  • format (optional): The return format from calling, the accept values are: "plain" e "xml". The default is plain.
  • user (optional): The username, used for tracking proposes.
  • key (optional): To track the URLs is mandatory use the username and the key.

Samples

Simple call

http://pra.la/api?url=http://www.THE_URL.com

Return (text plain)

http://pra.la/URL_ID

Call with XML return

http://pra.la/api?url=http://www.THE_URL.com&format=xml

Return (xml)

<?xml version="1.0" encoding="UTF-8" ?> 
<prala>
  <original>http://www.THE_URL.com.br/</original> 
  <shortened>http://pra.la/00017</shortened> 
  <short>00017</short>
</prala>

Custom URL call

http://pra.la/api?url=http://www.THE_URL.com&custom=MY_URL

Return

http://pra.la/MY_URL

Tracked call

http://pra.la/api?url=http://www.THE_URL.com&user=MY_USERNAME&key=MY_KEY

Return (added on your account)

http://pra.la/URL_ID

Code Samples

  • ASP.Net

    Download here a ASP.Net sample
    Development by Gabriel Froes

  • ASP 3 (Classic)

    Download here a ASP.Net sample
    Development by Gabriel Froes

  • PHP

    Soon

  • Ruby on Rails

    Soon

  • Pearl

    Soon

Doubts, suggestions or contributions

If you have any doubt, suggestion or contributions related to PRA.LA API, contact us by e-mail api@pra.la.