Shorten.REST API Documentation
shorten · Developer Tools
## Introduction The Shorten.rest API allows you to programmatically create short URLs (an 'alias') for longer URL (a 'destination'). Each alias you create can be used to redirect the end user (person clicking on the link) to one or more destination URLs A default destination is always set and specific destinations can be set to redirect the end user to preferred destinations based on the user's geographical location (country) and device Operating System. In order to
Authentication
Sample Requests
Get detailed information for a single alias by providing its alias and domain name
Hover any highlighted part to learn what it does
curl -X GET "https://api.apis.guru/v2/specs/shorten.rest/1.0.0/aliases?aliasName=example&domainName=short.fyi"
import requests
params = {
"aliasName": "example",
"domainName": "short.fyi"
}
response = requests.get(
"https://api.apis.guru/v2/specs/shorten.rest/1.0.0/aliases",
params=params,
)
print(response.json())const url = new URL('https://api.apis.guru/v2/specs/shorten.rest/1.0.0/aliases');
url.searchParams.set('aliasName', 'example');
url.searchParams.set('domainName', 'short.fyi');
const response = await fetch(url);
const data = await response.json();
console.log(data);package main
import (
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
baseURL, _ := url.Parse("https://api.apis.guru/v2/specs/shorten.rest/1.0.0/aliases")
q := baseURL.Query()
q.Set("aliasName", "example")
q.Set("domainName", "short.fyi")
baseURL.RawQuery = q.Encode()
targetURL := baseURL.String()
req, _ := http.NewRequest("GET", targetURL, nil)
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("https://api.apis.guru/v2/specs/shorten.rest/1.0.0/aliases")
uri.query = URI.encode_www_form({
"aliasName" => "example",
"domainName" => "short.fyi"
})
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Get.new(uri)
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://api.apis.guru/v2/specs/shorten.rest/1.0.0/aliases?" . http_build_query([
"aliasName" => "example",
"domainName" => "short.fyi"
]);
$opts = ["http" => [
"method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));Retrieve the raw click data for your account. Clicks are retrieved by creation date in descending order. If there are more results than the limit for the request the response will return you a value in lastId property you can specify it in the continueFrom query parameter to get the next batch of
Hover any highlighted part to learn what it does
curl -X GET "https://api.apis.guru/v2/specs/shorten.rest/1.0.0/clicks?limit=1000&continueFrom=example"
import requests
params = {
"limit": "1000",
"continueFrom": "example"
}
response = requests.get(
"https://api.apis.guru/v2/specs/shorten.rest/1.0.0/clicks",
params=params,
)
print(response.json())const url = new URL('https://api.apis.guru/v2/specs/shorten.rest/1.0.0/clicks');
url.searchParams.set('limit', '1000');
url.searchParams.set('continueFrom', 'example');
const response = await fetch(url);
const data = await response.json();
console.log(data);package main
import (
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
baseURL, _ := url.Parse("https://api.apis.guru/v2/specs/shorten.rest/1.0.0/clicks")
q := baseURL.Query()
q.Set("limit", "1000")
q.Set("continueFrom", "example")
baseURL.RawQuery = q.Encode()
targetURL := baseURL.String()
req, _ := http.NewRequest("GET", targetURL, nil)
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("https://api.apis.guru/v2/specs/shorten.rest/1.0.0/clicks")
uri.query = URI.encode_www_form({
"limit" => "1000",
"continueFrom" => "example"
})
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Get.new(uri)
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://api.apis.guru/v2/specs/shorten.rest/1.0.0/clicks?" . http_build_query([
"limit" => "1000",
"continueFrom" => "example"
]);
$opts = ["http" => [
"method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));Obtain a list of all alias names associated with your account and given domain. Result array is in descending order by creation date. If no domain is specified you will receive a list of all the alias names you have created using the Short.fyi domain. If there are more results than the limit f
Hover any highlighted part to learn what it does
curl -X GET "https://api.apis.guru/v2/specs/shorten.rest/1.0.0/aliases/all?limit=1000&domainName=short.fyi&continueFrom=example"
import requests
params = {
"limit": "1000",
"domainName": "short.fyi",
"continueFrom": "example"
}
response = requests.get(
"https://api.apis.guru/v2/specs/shorten.rest/1.0.0/aliases/all",
params=params,
)
print(response.json())const url = new URL('https://api.apis.guru/v2/specs/shorten.rest/1.0.0/aliases/all');
url.searchParams.set('limit', '1000');
url.searchParams.set('domainName', 'short.fyi');
url.searchParams.set('continueFrom', 'example');
const response = await fetch(url);
const data = await response.json();
console.log(data);package main
import (
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
baseURL, _ := url.Parse("https://api.apis.guru/v2/specs/shorten.rest/1.0.0/aliases/all")
q := baseURL.Query()
q.Set("limit", "1000")
q.Set("domainName", "short.fyi")
q.Set("continueFrom", "example")
baseURL.RawQuery = q.Encode()
targetURL := baseURL.String()
req, _ := http.NewRequest("GET", targetURL, nil)
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("https://api.apis.guru/v2/specs/shorten.rest/1.0.0/aliases/all")
uri.query = URI.encode_www_form({
"limit" => "1000",
"domainName" => "short.fyi",
"continueFrom" => "example"
})
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Get.new(uri)
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://api.apis.guru/v2/specs/shorten.rest/1.0.0/aliases/all?" . http_build_query([
"limit" => "1000",
"domainName" => "short.fyi",
"continueFrom" => "example"
]);
$opts = ["http" => [
"method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));Postman Setup Guide
- See official documentation for authentication and setup.
What can you build with Shorten.REST API Documentation?
Shorten.REST API Documentation is a Developer Tools API. Developers commonly use developer tools APIs for:
- automating code review and quality checks
- integrating CI/CD pipelines and build systems
- managing feature flags and A/B tests
- monitoring errors and application performance
- generating and validating test data
No authentication required. This API is open — no signup or key needed. Ideal for quick prototypes and public-facing features. Shorten.REST API Documentation is free to use, making it a low-risk choice to experiment with.
New to APIs? Read our beginner's guide · Learn about API keys · What is REST?