APIs for Short Links

Short Link API

The Short Link API allows you to create Short Links from your applications. You can use the API in the form of a RESTful API over HTTP or using an Android or iOS app with the libraries.


Javascript API

To use the Javascript API you'll first need to include the Google API client. The value of the onload parameter is a callback function you'll need to create.

<script src="https://apis.google.com/js/client.js?onload=init"></script>

The callback function will load the Short Link API.

var ROOT = 'https://1-dot-api.lnkr.co.za';
gapi.client.load('shortlink', 'v1', function() {
  // The API is loaded, you can now use it 
}, ROOT);

To create a Short Link, use the create method.

gapi.client.shortlink.create(req).execute(function(resp) {
  // req is the input
  // resp is the output

Android and iOS API

Data API

You can get the data behind the stats page as JSON.

Short Link creation statistics

Short Link use statistics

Short Link data statistics