GET
/
analytics
/
click-details
/
:shortUrlId
Click Details
curl --request GET \
  --url https://jmpy.me/api/v1/analytics/click-details/:shortUrlId \
  --header 'Authorization: Bearer <token>'
{
  "data": [
    {
      "id": "<string>",
      "short_code": "<string>",
      "original_url": "<string>",
      "clicked_at": "<string>",
      "ip_address": "<string>",
      "user_agent": "<string>",
      "referrer": "<string>",
      "country": "<string>",
      "city": "<string>",
      "device_type": "<string>",
      "browser": "<string>",
      "os": "<string>"
    }
  ],
  "pagination": {
    "limit": 123,
    "offset": 123,
    "total": 123
  }
}
Get detailed click records with timestamps, IP addresses, user agents, referrers, and geographic information.
The shortUrlId parameter is optional. If omitted, returns click details for all your URLs.

Path Parameters

shortUrlId
string
Short URL identifier. Accepts:
  • UUID: 550e8400-e29b-41d4-a716-446655440000
  • Short code: abc123
  • Custom alias: my-custom-link
If omitted, returns clicks for all your URLs.

Query Parameters

limit
integer
default:100
Maximum number of click records to return (max 1000).
offset
integer
default:0
Number of records to skip for pagination.
urlType
string
Filter by link structure style. Options: standard, branded, subdomain.
campaignId
string
Filter by Campaign UUID or name. Pass none for links with no campaign.
brandedDomain
string
Filter by one or more comma-separated branded domains.
subdomain
string
Filter by one or more comma-separated subdomains.
isDynamic
boolean
Filter clicks on dynamic vs static links.
isPasswordProtected
boolean
Filter clicks on password/passcode-protected links.
hasUtm
boolean
Filter clicks by whether the link has Google Analytics UTM parameters.
isExpiring
boolean
Filter clicks on links that have configured expiration dates/time limits.
customAlias
boolean
Filter clicks on links that use a custom short alias instead of a randomly generated one.
tags
string
Filter clicks by a comma-separated list of tags.
clickInsights
string
default:"all"
Filter by interaction type. Options: all, clicks_only, scans_only.
isUnique
boolean
Filter unique click events.
country
string
Filter clicks by country name (e.g. Pakistan, United States).
countryCode
string
Filter clicks by ISO country code (e.g. pk, us). Supports alias country_code.
region
string
Filter clicks by region name (e.g. Sindh, California).
city
string
Filter clicks by city name (e.g. Karachi, New York).
deviceType
string
Filter clicks by device type. Options: desktop, mobile, tablet. Supports alias device_type.
browser
string
Filter clicks by browser (e.g. chrome, firefox, safari).
os
string
Filter clicks by OS (e.g. windows, macos, android, ios).
utmSource
string
Filter clicks by UTM Source. Supports alias utm_source.
utmMedium
string
Filter clicks by UTM Medium. Supports alias utm_medium.
utmCampaign
string
Filter clicks by UTM Campaign. Supports alias utm_campaign.
utmTerm
string
Filter clicks by UTM Term. Supports alias utm_term.
utmContent
string
Filter clicks by UTM Content. Supports alias utm_content.
referrer
string
Filter clicks by referrer URL.
referrerDomain
string
Filter clicks by referrer domain (e.g. t.co, facebook.com). Supports alias referrer_domain.

Response

data
array
Array of click records.
pagination
object
Pagination information.

Request Examples

# Get clicks for a specific URL by UUID
curl -X GET "https://jmpy.me/api/v1/analytics/click-details/550e8400-e29b-41d4-a716-446655440000?limit=50" \
  -H "Authorization: Bearer YOUR_API_KEY"

# Get clicks for a URL by short code
curl -X GET "https://jmpy.me/api/v1/analytics/click-details/abc123?limit=100&offset=0" \
  -H "Authorization: Bearer YOUR_API_KEY"

# Get clicks for a URL by custom alias
curl -X GET "https://jmpy.me/api/v1/analytics/click-details/my-promo-link" \
  -H "Authorization: Bearer YOUR_API_KEY"

# Get all clicks (no shortUrlId)
curl -X GET "https://jmpy.me/api/v1/analytics/click-details?limit=50&offset=0" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response Examples

{
  "success": true,
  "data": {
    "data": [
      {
        "id": "click-uuid-1",
        "short_code": "abc123",
        "original_url": "https://example.com/page",
        "clicked_at": "2024-01-15T14:32:00Z",
        "ip_address": "192.168.xxx.xxx",
        "user_agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 17_0...",
        "referrer": "https://twitter.com",
        "country": "US",
        "city": "New York",
        "device_type": "mobile",
        "browser": "Safari",
        "os": "iOS"
      },
      {
        "id": "click-uuid-2",
        "short_code": "abc123",
        "original_url": "https://example.com/page",
        "clicked_at": "2024-01-15T14:28:00Z",
        "ip_address": "10.0.xxx.xxx",
        "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64)...",
        "referrer": "https://google.com",
        "country": "UK",
        "city": "London",
        "device_type": "desktop",
        "browser": "Chrome",
        "os": "Windows"
      }
    ],
    "pagination": {
      "limit": 100,
      "offset": 0,
      "total": 2
    }
  }
}

Use Cases

Fetch all clicks and export them for analysis in spreadsheet software.
async function exportClicksToCSV(shortUrlId) {
  let allClicks = [];
  let offset = 0;
  const limit = 1000;
  
  // Paginate through all clicks
  while (true) {
    const response = await fetch(
      `https://jmpy.me/api/v1/analytics/click-details/${shortUrlId}?limit=${limit}&offset=${offset}`,
      { headers: { 'Authorization': 'Bearer YOUR_API_KEY' } }
    );
    const { data } = await response.json();
    
    allClicks = allClicks.concat(data.data);
    
    if (data.data.length < limit) break;
    offset += limit;
  }
  
  // Convert to CSV
  const headers = 'clicked_at,country,city,device_type,browser,os,referrer';
  const rows = allClicks.map(c => 
    `${c.clicked_at},${c.country},${c.city},${c.device_type},${c.browser},${c.os},${c.referrer}`
  );
  
  return [headers, ...rows].join('\n');
}
Poll for new clicks and display them in real-time.
async function monitorClicks(shortUrlId, onNewClick) {
  let lastClickId = null;
  
  setInterval(async () => {
    const response = await fetch(
      `https://jmpy.me/api/v1/analytics/click-details/${shortUrlId}?limit=10`,
      { headers: { 'Authorization': 'Bearer YOUR_API_KEY' } }
    );
    const { data } = await response.json();
    
    const clicks = data.data;
    if (clicks.length > 0 && clicks[0].id !== lastClickId) {
      // New clicks detected
      const newClicks = lastClickId 
        ? clicks.slice(0, clicks.findIndex(c => c.id === lastClickId))
        : clicks;
      
      newClicks.forEach(click => onNewClick(click));
      lastClickId = clicks[0].id;
    }
  }, 5000); // Poll every 5 seconds
}
Group clicks by country and calculate percentages.
import requests
from collections import Counter

def analyze_by_country(short_url_id):
    response = requests.get(
        f'https://jmpy.me/api/v1/analytics/click-details/{short_url_id}',
        headers={'Authorization': 'Bearer YOUR_API_KEY'},
        params={'limit': 1000}
    )
    
    clicks = response.json()['data']['data']
    countries = Counter(click['country'] for click in clicks)
    total = len(clicks)
    
    for country, count in countries.most_common():
        percentage = (count / total) * 100
        print(f"{country}: {count} clicks ({percentage:.1f}%)")

Analytics Overview

Get aggregated statistics for all your URLs

Location Analytics

Get geographic breakdown of clicks

Device Analytics

Get device and browser breakdown

Referrer Analytics

Get traffic source analysis