lnk.co logo
  • LNK.CO API

This document describes the reqired format of Linkbee API URLs and lists of available parameters. The Linkbee API returns a JSON-formatted string in response to a URL. Several functionalities can be generated, including quick link, cash link, and statistic. Authentication might be needed for certain functions.



URL Format

Linkbee API URLs must be in the following format:

http://lnk.co/api.php?task=<name of function>&<parameter_1=value>&<parameter_2=value>


Parameters are seperated using the ampersand (&) character. You can specify parameters in any order. For example, the folling JSON-formatted string was returned in response to the URL below:


{"error":0,"msg":"","hits":"4"}

http://lnk.co/api.php?task=hits&user=john&pass=_Mì·ZkeÖ]§Ï


Where:

  • http://lnk.co/api.php? is the API location
  • task=hits is the requested function
  • & seperates parameters
  • user=john&pass=_Mì·ZkeÖ]§Ï is the username and password for authentication


JSON String Format


The JSON-fomartted string will be returned in the following format:

{"error":"value","msg":"value","requested function":"value"}


Where:

  • "error":"value" is the error code. 1 if an error occured and 0 otherwise.
  • "msg":"value" is the error message. None for a successful operation.
  • "requested function":"value" is the result of interest. Available requested functions are: quicken, shorten, hits.


Functions and Required Parameters


  • quicken - Create A Quick Link

  • Example: http://lnk.co/api.php?task=quicken&url=urlencode('http://www.jokeroo.com')


    Required:

    • url: a valid URL to be shorten. URL must be encoded.


  • shorten - Create A Cash Link

  • Example: http://lnk.co/api.php?task=shorten&url=urlencode('http://www.jokeroo.com')&user=YOUR-USERNAME&pass=urlencode(md5('YOUR-PASSWORD', true))&ad=1&cat=9


    Required:

    • url: valid url to be shorten. URL must be encoded.
    • user: a Linkbee account's username.
    • pass: passoword for the specified account. It must be in form of urlencode of MD5 hash string raw binary format. i.e: urlencode(md5('YOUR-PASSWORD', true))

    Optional:

    If unspecified, default options will be assigned as Interstitial for Ad type and Unrelated for Catergory.


    • Ad Type:
      • 0 - Interstitial
      • 1 - Banner
      • 2 - None

    • Catergory:
      • 3 - Entertainment
      • 4 - Financial
      • 5 - Games
      • 6 - News
      • 7 - Politics
      • 7 - Politics
      • 8 - Sports
      • 9 - Travel
      • 10 - Unrelated / Other
      • 11 - Technology
      • 12 - Adult Related
      • 13 - File Sharing
      • 11 - Photo / People


  • hits - Get Number Of Hits for A Link

  • Example: http://lnk.co/api.php?task=hits&user=john&pass=urlencode(md5('YOUR-PASSWORD', true))&url=http://lnk.co/F0QN7


    Required:

    • link: A Linkbee link or hash.
    • user: a Linkbee account's username.
    • pass: password for the specified account. It must be in MD5 hash string raw binary format. Note: it also needs to be encoded for URL query.