JavaScript is not enabled in your browser.

If you can not enable JavaScript in your browser, using our basic version, By clicking here.

So you've enabled JavaScript?

Click here

Not sure how to enable JavaScript?

Click here
ico menu

API the urlcort.com


Shorten URL


Requires authentication credentials of an application to perform this action.

Parameters sent

  1. PASS APPPASS APPYour application
  2. URL TypeThere are 3 types of URL you can configure:
    • Open URL{Optionopen}The open URL, can be accessed from any domain.
    • Private URL{Optionprivate}Private URL, just follow the link may come from the domain if you configure.
      • URL of where it came
    • URL password{Optionpassword}URL with password, can only follow the link by entering the correct password.
      • Password entry
  3. Custom nameYou can define a custom name. If the name sent is not available, an error message will be returned.
  4. E-mailEnter your email address, where we will notify you every time a new click is performed. (Only for users with paid account)
  5. Compression TypeThere are 2 types of compression that can set:
    • Normal compression{Optionnormal}URL shortened with normal compression
    • Best Compression{Optionbest}Our algorithm tries to obtain the shortest URL available. (Only for users with paid account)
  6. Other valuesHere you must submit the following values ​​as appropriate:
    • URL of where it cameIf "Type URL" option is selected {private}
    • Password entryIf "Type URL" option is selected {password}
    • nullIf "Type URL" option is selected {open}
  7. Response FormatThere are 3 types of response formats:
    • Optión 1{json}Option by default . Returns data in json format
    • Optión 2{xml}Returns data in XML format
    • Optión 3{txt}Returns data in text format
  8. Long URLIt is the long URL you send it to shorten
Additional notes

  • In Type (URL), only 3 definite values ​​(open, private and password) are accepted, other values ​​are rejected.
  • It sent the (custom name), you have up to 25 characters.
  • He sent the email must be valid.
  • In (compression type), only two defined values ​​(normal, best), other values ​​are accepted will be rejected.
  • All submitted URL (URL long URL where it comes from) should beURL not encoded.
  • The URL must be valid URL, no spaces, spaces at the beginning or end of the same, starting with http, https or ftp.

Shipping Route

GET
http://urlcort.com/api/v1/shorten/pass_app=[1]/tip=[2]/personalized=[3]/email=[4]/compression=[5]/others=[6]/format=[7]/url_large=[8]

[1]PASS APPYour application
[2]URL Type
[3]Custom name
[4]E-mail
[5]Compression Type
[6]URL of where it comes from or password income, depending on the type of URL
[7]Response Format
[8]Long URL

To send data without content or if the parameter (e-mail), which is valid only for paid accounts, you can send parameters with the names "s / c" or "null", both are valid.

POST
http://urlcort.com/api/v1/shorten

Data returned by the API

idUnique ID within urlCort.com

shortenedAbbreviated name or custom characters

short_urlURL shortened

long_urlOriginal URL. The URL may vary due to the coding performed, but the URL still linking to the original URL.

tipURL Type

dateDate of establishment of the short URL

Examples:

He sent:

GET
http://urlcort.com/api/v1/shorten/pass_app=PASS APP/tip=password/personalized=url%20cort/email=null/compression=normal/others=myPassword/format=json/url_large=http:

Answer:

json

{
  "response_code":"C1",
  "response_text":"OK",
  "data":{
      "id":"12872",
      "shortened":"url%20cort",
      "short_url":"http://urlcort.com/url%20cort",
      "long_url":"http://www.urlcort.com",
      "tip":"password"
      "date ":"13-02-2014 17:2:53"
  }
}

xml

<?xml version="1.0"encoding="utf-8"?>
<urlcort>
    <response_code>C1</response_code>
    <response_text>OK</response_text>
    <data>
        <id>12872</id>
        <shortened>url%20cort</shortened>
        <short_url>http://urlcort.com/url%20cort</short_url>
        <long_url>http:
        <tip>password</tip>
        <date>13-02-2014 17:2:53</date>
    </data>
</urlcort>

txt

http://urlcort.com/url%20cort

API Response

C1Answer of success

E0Missing data - missing value in brackets is marked.

E1Invalid Format - The format should be json, xml or txt

E2The PASS APP is invalid - please place a PPP PASS application you find yourself created

E3Long URL overrides - Check that the long URL is valid

E4Invalid Type - Check it (open, private or password)

E5The custom name is already in use or has exceeded25Maximum characters.

E6Beam entered an email, but no accounts with payment account.

E7The email is invalid - please send a valid email.

E8Compression overridden - Check it (normal or best)

E9You have sent the "best" option but you do not have payment account.

E10URL overrides - check the URL of where it comes from, is valid.

E11Max Connections - were permitted simultaneous connections exceeded

E12PASS APP suspended - You have exceeded the maximum allowable limit . You must regenerate the credentials for your application.