Skip to Content

Analytics Summary

Get aggregated analytics across all your links — total clicks, top-performing links, and click trends over time.

GET /api/v1/analytics/summary

Authentication

Required.

Query Parameters

ParameterTypeRequiredDescription
startstringNoStart date (ISO 8601) for click trends
endstringNoEnd date (ISO 8601) for click trends

Response

FieldTypeDescription
total_linksnumberTotal number of links you own
active_linksnumberNumber of currently active links
total_clicksnumberSum of all clicks across all links
clicks_over_timearrayDaily click counts (filtered by date range if provided)
top_linksarrayYour top 5 links by total clicks

Examples

curl "https://snipurl.click/api/v1/analytics/summary" \ -H "Authorization: Bearer snip_live_your_key_here"
# With date range curl "https://snipurl.click/api/v1/analytics/summary?start=2025-06-01T00:00:00Z&end=2025-06-24T23:59:59Z" \ -H "Authorization: Bearer snip_live_your_key_here"
const response = await fetch( 'https://snipurl.click/api/v1/analytics/summary', { headers: { 'Authorization': 'Bearer snip_live_your_key_here' } } ); const { data } = await response.json(); console.log(`${data.total_links} links, ${data.total_clicks} total clicks`); console.log(`Top link: ${data.top_links[0]?.short_code}`);
import requests response = requests.get( 'https://snipurl.click/api/v1/analytics/summary', headers={'Authorization': 'Bearer snip_live_your_key_here'}, ) data = response.json()['data'] print(f"{data['total_links']} links, {data['total_clicks']} total clicks")

Response (200 OK):

{ "success": true, "data": { "total_links": 47, "active_links": 42, "total_clicks": 8934, "clicks_over_time": [ {"date": "2025-06-20", "count": 124}, {"date": "2025-06-21", "count": 156}, {"date": "2025-06-22", "count": 89}, {"date": "2025-06-23", "count": 201}, {"date": "2025-06-24", "count": 178} ], "top_links": [ { "id": "550e8400-e29b-41d4-a716-446655440000", "short_code": "a8Kx2m", "original_url": "https://example.com/popular-post", "title": "My Viral Post", "clicks_count": 2341 }, { "id": "7c9e6679-7425-40de-944b-e07fc1f90ae7", "short_code": "launch", "original_url": "https://producthunt.com/posts/my-app", "title": "Product Hunt Launch", "clicks_count": 1876 }, { "id": "a87ff679-a2f3-e710-ab34-946655440001", "short_code": "docs", "original_url": "https://docs.myapp.com", "title": "Documentation", "clicks_count": 1205 } ] } }

Use Cases

  • Dashboard widgets: Display overall account health and trends
  • Reporting: Generate weekly/monthly performance reports
  • Monitoring: Track whether link traffic is increasing or declining
Last updated on