Welcome to the HIVE API

We provide an API system that you can use to shorten links from your own applications and save them in your account in the process. You can also use the API to fetch data about a link, provided that you have the permission to do so. You can find out more information below.

Registering for an API Key

As before, an API key is required for requests to be processed by the system. Once a user registers, an API key is automatically created for this user. The API key must attached to request via the

Your API Key

						     Log in to see your API key						    						

parameter (see full example below).

To send a request, the user must use the following format where the variables




are required. To request a custom alias, simply add


at the end.

Parameter Type Input Example Description
api string Log in to view Authorization
url string https://google.com Original link
custom* string google Custom Alias
password* string secretpw Password Access
description* string hello world Description
type* string direct , frame , splash Redirection type
* optional Public API key: spublic

Full example:

						  GET https://hiveam.com/api?api=APIKEY&url=THELONGLINKTOBESHORTENED&custom=CUSTOMALIAS

Server response

As before, the response will encoded in JSON format (default). This is done to facilitate cross-language usage. The first element of the response will always tell if an error has occurred (error: 1) or not (error: 0). The second element will change with respect to the first element. If there is an error, the second element will be named "msg" which contains the source of error, otherwise it will be named "short" which contains the short link. (See below for an example)

						// No errors
						// An error has occurred
						  "msg":"Please enter a valid email"

Using plain text format

You can request the response to be in plain text by just adding


at the end of your request. This will return just


instead of the JSON response. Note that if an error occurs, it will not output anything.

Users can easily request the long link from a short link. This doesn't require any API key and is free to all users. To unshorten a link, use this format


Using the API in PHP

To use the API in your PHP application, you have to send a GET request through




Both are reliable methods. You can see a sample code below using

						  // Using JSON Response
						  $res= @json_decode(file_get_contents($api_url),TRUE);
						    echo $res["msg"];
						    echo $res["short"];
						  // Using Plain Text Response
						  $res= @file_get_contents($api_url);
						    echo $res;