Get a list of all short URLs created by the authenticated user with support for pagination, filtering, and sorting.
Query Parameters
Page number for pagination.
Number of items per page (max 100).
sort
string
default: "created_at"
Field to sort by. Options: created_at, clicks, name, short_code.
Search term to filter by name, short code, or original URL.
Filter by source (e.g. api, dashboard).
Filter by URL type: standard, subdomain, branded. See Domains API for domain management.
Filter URLs created after this date (ISO 8601).
Filter URLs created before this date (ISO 8601).
Whether to include generated QR codes for each URL in the list. When enabled, a qr_code field containing the image data and qr_content containing the tracking URL will be added to each URL object.
The format of the returned QR codes: image (base64 PNG) or json (metadata).
Response
Contains the short URLs and pagination info. Array of short URL objects.
Pagination metadata. Show pagination properties
Top-level pagination metadata (duplicate of data.pagination for convenience).
Request Examples
cURL
Node.js
TypeScript
Python
PHP
Go
Java
Basic List
Sort by Clicks
Filter by Campaign
Filter by URL Type
Date Range
Search
curl -X GET "https://jmpy.me/api/v1/short-urls?page=1&limit=20" \
-H "Authorization: Bearer YOUR_API_KEY"
curl -X GET "https://jmpy.me/api/v1/short-urls?sort=clicks&order=desc&limit=10" \
-H "Authorization: Bearer YOUR_API_KEY"
# Get URLs for a specific campaign
# See: /api-reference/campaigns/list to find campaign IDs
curl -X GET "https://jmpy.me/api/v1/short-urls?campaign_id=550e8400-e29b-41d4-a716-446655440000" \
-H "Authorization: Bearer YOUR_API_KEY"
# Get only branded domain URLs
# See: /api-reference/domains/list-branded
curl -X GET "https://jmpy.me/api/v1/short-urls?url_type=branded" \
-H "Authorization: Bearer YOUR_API_KEY"
# Get URLs created in the last month
curl -X GET "https://jmpy.me/api/v1/short-urls?start_date=2024-01-01T00:00:00Z&end_date=2024-01-31T23:59:59Z" \
-H "Authorization: Bearer YOUR_API_KEY"
# Search by name, short code, or destination URL
curl -X GET "https://jmpy.me/api/v1/short-urls?search=marketing" \
-H "Authorization: Bearer YOUR_API_KEY"
const fetch = require ( 'node-fetch' );
// Build query parameters
const params = new URLSearchParams ({
page: 1 ,
limit: 20 ,
sort: 'clicks' ,
order: 'desc'
});
const response = await fetch ( `https://jmpy.me/api/v1/short-urls? ${ params } ` , {
headers: {
'Authorization' : 'Bearer YOUR_API_KEY'
}
});
const { data , meta } = await response . json ();
console . log ( `Showing ${ data . length } of ${ meta . total } URLs` );
data . forEach ( url => {
console . log ( ` ${ url . short_url } - ${ url . clicks } clicks` );
});
import axios from 'axios' ;
interface ShortUrl {
id : string ;
short_code : string ;
short_url : string ;
original_url : string ;
click_count : number ;
channel : string ;
source : string ;
}
interface Pagination {
page : number ;
limit : number ;
total : number ;
}
interface ListResponse {
success : boolean ;
data : {
shortUrls : ShortUrl [];
pagination : Pagination ;
};
pagination : Pagination ;
}
const params = {
page: 1 ,
limit: 20 ,
sort: 'clicks' ,
order: 'desc' ,
url_type: 'branded' // Filter by branded domains
};
const response = await axios . get < ListResponse >(
'https://jmpy.me/api/v1/short-urls' ,
{
headers: { 'Authorization' : 'Bearer YOUR_API_KEY' },
params
}
);
const { data } = response . data ;
console . log ( `Page ${ data . pagination . page } - ${ data . shortUrls . length } items` );
import requests
params = {
"page" : 1 ,
"limit" : 20 ,
"sort" : "clicks" ,
"order" : "desc"
}
response = requests.get(
"https://jmpy.me/api/v1/short-urls" ,
headers = { "Authorization" : "Bearer YOUR_API_KEY" },
params = params
)
result = response.json()
urls = result[ "data" ][ "shortUrls" ]
pagination = result[ "data" ][ "pagination" ]
print ( f "Showing { len (urls) } of { pagination[ 'total' ] } URLs" )
for url in urls:
print ( f " { url[ 'short_url' ] } - { url[ 'click_count' ] } clicks" )
<? php
$client = new GuzzleHttp\ Client ();
$response = $client -> request ( 'GET' , 'https://jmpy.me/api/v1/short-urls' , [
'headers' => [
'Authorization' => 'Bearer YOUR_API_KEY'
],
'query' => [
'page' => 1 ,
'limit' => 20 ,
'sort' => 'clicks' ,
'order' => 'desc'
]
]);
$result = json_decode ( $response -> getBody (), true );
$urls = $result [ 'data' ][ 'shortUrls' ];
$pagination = $result [ 'data' ][ 'pagination' ];
echo "Showing " . count ( $urls ) . " of " . $pagination [ 'total' ] . " URLs \n " ;
foreach ( $urls as $url ) {
echo $url [ 'short_url' ] . " - " . $url [ 'click_count' ] . " clicks \n " ;
}
?>
package main
import (
" encoding/json "
" fmt "
" io "
" net/http "
" net/url "
)
type ShortUrl struct {
ShortUrl string `json:"short_url"`
ClickCount int `json:"click_count"`
}
type Pagination struct {
Page int `json:"page"`
Limit int `json:"limit"`
Total int `json:"total"`
}
type Data struct {
ShortUrls [] ShortUrl `json:"shortUrls"`
Pagination Pagination `json:"pagination"`
}
type Response struct {
Data Data `json:"data"`
}
func main () {
baseURL := "https://jmpy.me/api/v1/short-urls"
params := url . Values {}
params . Set ( "page" , "1" )
params . Set ( "limit" , "20" )
params . Set ( "sort" , "clicks" )
params . Set ( "order" , "desc" )
req , _ := http . NewRequest ( "GET" , baseURL + "?" + params . Encode (), nil )
req . Header . Add ( "Authorization" , "Bearer YOUR_API_KEY" )
resp , _ := http . DefaultClient . Do ( req )
defer resp . Body . Close ()
body , _ := io . ReadAll ( resp . Body )
var result Response
json . Unmarshal ( body , & result )
fmt . Printf ( "Total URLs: %d \n " , result . Data . Pagination . Total )
}
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.URI;
import java.net.http.HttpResponse;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
String baseUrl = "https://jmpy.me/api/v1/short-urls" ;
String params = String . format ( "?page=%d&limit=%d&sort=%s&order=%s" ,
1 , 20 , "clicks" , "desc" );
HttpClient client = HttpClient . newHttpClient ();
HttpRequest request = HttpRequest . newBuilder ()
. uri ( URI . create (baseUrl + params))
. header ( "Authorization" , "Bearer YOUR_API_KEY" )
. GET ()
. build ();
HttpResponse < String > response = client . send (request, HttpResponse . BodyHandlers . ofString ());
System . out . println ( response . body ());
Response Examples
200 Success
200 Empty Result
401 Unauthorized
{
"success" : true ,
"data" : {
"shortUrls" : [
{
"id" : "550e8400-e29b-41d4-a716-446655440000" ,
"short_code" : "abc123" ,
"short_url" : "https://jmpy.me/abc123" ,
"original_url" : "https://example.com/page1" ,
"name" : "Landing Page" ,
"channel" : "api" ,
"source" : "URL_SHORTENER" ,
"custom_alias" : null ,
"click_count" : 1542 ,
"tracking_enabled" : true ,
"created_at" : "2024-01-15T10:30:00.000Z" ,
"expires_at" : null
},
{
"id" : "550e8400-e29b-41d4-a716-446655440001" ,
"short_code" : "def456" ,
"short_url" : "https://jmpy.me/def456" ,
"original_url" : "https://example.com/page2" ,
"name" : "Blog Post" ,
"channel" : "api" ,
"source" : "URL_SHORTENER" ,
"custom_alias" : null ,
"click_count" : 823 ,
"tracking_enabled" : true ,
"created_at" : "2024-01-14T09:15:00.000Z" ,
"expires_at" : null
}
],
"pagination" : {
"page" : 1 ,
"limit" : 20 ,
"total" : 47
}
},
"timestamp" : "2024-01-15T10:30:00.000Z" ,
"pagination" : {
"page" : 1 ,
"limit" : 20 ,
"total" : 47
}
}
{
"success" : true ,
"data" : {
"shortUrls" : [],
"pagination" : {
"page" : 1 ,
"limit" : 20 ,
"total" : 0
}
},
"timestamp" : "2024-01-15T10:30:00.000Z" ,
"pagination" : {
"page" : 1 ,
"limit" : 20 ,
"total" : 0
}
}
{
"success" : false ,
"error" : {
"code" : "UNAUTHORIZED" ,
"message" : "Invalid or missing API key"
}
}
Use Cases
Paginate Through All Links
Iterate through all your short URLs: async function getAllUrls () {
let page = 1 ;
let allUrls = [];
let hasMore = true ;
while ( hasMore ) {
const response = await fetch (
`https://jmpy.me/api/v1/short-urls?page= ${ page } &limit=100` ,
{ headers: { 'Authorization' : 'Bearer YOUR_API_KEY' } }
);
const result = await response . json ();
const { shortUrls , pagination } = result . data ;
allUrls = allUrls . concat ( shortUrls );
hasMore = allUrls . length < pagination . total ;
page ++ ;
}
console . log ( `Total URLs fetched: ${ allUrls . length } ` );
return allUrls ;
}
Get all URLs associated with a specific campaign: import requests
# First, find your campaign ID
# See: /api-reference/campaigns/list
CAMPAIGN_ID = "550e8400-e29b-41d4-a716-446655440000"
response = requests.get(
"https://jmpy.me/api/v1/short-urls" ,
headers = { "Authorization" : "Bearer YOUR_API_KEY" },
params = {
"campaign_id" : CAMPAIGN_ID ,
"sort" : "clicks" ,
"order" : "desc"
}
)
urls = response.json()[ "data" ][ "shortUrls" ]
total_clicks = sum (url[ "click_count" ] for url in urls)
print ( f "Campaign has { len (urls) } URLs with { total_clicks } total clicks" )
Find Top Performing Links
Get all branded domain URLs: # Get branded URLs
curl -X GET "https://jmpy.me/api/v1/short-urls?url_type=branded" \
-H "Authorization: Bearer YOUR_API_KEY"
# Get subdomain URLs
curl -X GET "https://jmpy.me/api/v1/short-urls?url_type=subdomain" \
-H "Authorization: Bearer YOUR_API_KEY"
# Get standard jmpy.me URLs
curl -X GET "https://jmpy.me/api/v1/short-urls?url_type=standard" \
-H "Authorization: Bearer YOUR_API_KEY"
See Domains API to manage your domains.
Combine search with filters for precise results: import requests
from datetime import datetime, timedelta
# Search for marketing links created in the last 30 days
end_date = datetime.utcnow()
start_date = end_date - timedelta( days = 30 )
response = requests.get(
"https://jmpy.me/api/v1/short-urls" ,
headers = { "Authorization" : "Bearer YOUR_API_KEY" },
params = {
"search" : "marketing" ,
"start_date" : start_date.isoformat() + "Z" ,
"end_date" : end_date.isoformat() + "Z" ,
"status" : "active"
}
)
urls = response.json()[ "data" ][ "shortUrls" ]
print ( f "Found { len (urls) } active marketing links from the last 30 days" )
Create Short URL Create a new short URL
Get Short URL View details for a specific URL
List Campaigns Find campaign IDs for filtering
List Domains View your branded domains
Analytics Overview View aggregate analytics
Delete Short URL Remove short URLs