Ape URL has a simple API so that developers of other applications can use the service owever they need, without having to come and visit ApeURL.com. The API is accessed via passing values in the POST array, and the result is in JSON or XML format.
The api functions are accessed by http://apeurl.com/api/{method}/
Find details of each of the available methods below.
| Paramater | Required | Description |
|---|---|---|
| long_url | Yes | The encoded URL of the URL you wish to shorten. |
| custom_key | No | If provided, will try to create the Ape URL using the custom key instead of an automatically generated one. |
Returns a JSON array.
Structure
{
error : [
code: '',
info: ''
],
ape_url : ''
}
If any errors exist, then ape_url will remain empty. The errors array will give ALL errors that occurred, so you will need to loop through them. The code allows a shorter way of programs to distinguish between errors, optionally there is also an info node that gives a text readout of the error type. The contents of info may change for each error, so do not rely on its contents in your programs.
If the process was a success, ape_url will contain the new shortened URL, of the form http://apeurl.com/8sj OR http://apeurl.com/-customKey depending of if you used a custom key. Custom key URL's will always have a hyphen prefixing the custom key part so that Ape URL can distinguish between the two types.
| Code | Description |
|---|---|
| 101 | No Long URL was supplied |
| 102 | The supplied URL wasn't valid. |
| 103 | That custom key wasn't available |
| 104 | The custom key can only be alphanumeric (a-z, A-Z, 0-9) |
Coming Soon
Coming Soon
Coming Soon