Skip to content
    • Pricing
    • Developers
    API Documentation

    Overview

    • Introduction
    • Getting Started

    Concepts

    • Authentication
    • Rate Limiting
    • Request & Response Format

    Endpoints

    • POST /v2/shorten
    • POST /v2/shorten/batch
    • GET /v2/qr/:shortCode
    • GET /v2/stats/:shortCode

    Reference

    • Error Codes
    Back to Plung
    GET/v2/stats/:shortCode

    Retrieves click analytics and metadata for a specific shortened URL with API key authentication, including the original destination, total click count, timestamps, and any configured expiration or click limits.

    Requires API key: This endpoint requires authentication via the Authorization header with a Bearer token. See the Authentication page for details.
    Behavior equivalence: This endpoint preserves the legacy stats behavior, but requires authentication and provides higher per-key rate limits (1000 req/60s vs 10 req/60s).

    Request Headers

    ParameterTypeRequiredDescription
    AuthorizationstringRequiredYour API key as a Bearer token in the Authorization header. Returns a 401 error if missing, invalid, or revoked.

    Path Parameters

    ParameterTypeRequiredDescription
    shortCodestringRequiredThe unique short code generated when the URL was shortened (e.g. "abc12345"). Returns a 404 error if no URL exists with this code.

    Request Examples

    bash
    curl -H "Authorization: Bearer your_api_key_here" \
      https://api.plung.co/v2/stats/abc12345

    Success Response

    Status: 200 OK

    json
    {
      "shortCode": "abc12345",
      "url": "https://example.com/my-very-long-url",
      "clickCount": 142,
      "createdAt": "2026-02-28T02:30:00.000Z",
      "lastAccessed": "2026-02-28T14:22:10.000Z",
      "expiresAt": "2026-03-07T02:30:00.000Z",
      "maxClicks": 500
    }
    The lastAccessed, expiresAt, and maxClicks fields return null when the link has never been clicked, has no expiration, or has no click limit configured, respectively.

    Error Responses

    StatusCauseMessage
    401Missing API key"API key required. Pass your key as: Authorization: Bearer <your-key>"
    401Invalid or inactive API key"Invalid or inactive API key."
    404No URL found with this short code"Short URL not found"
    429Rate limit exceeded"Rate limit exceeded. Try again in the next minute."
    PreviousGET /v2/qr/:shortCodeNextError Codes

    Product

    • About Us
    • Blog
    • Developers

    Features

    • URL Shortening
    • Custom Aliases
    • QR Codes
    • Password Protection
    • Link Analytics
    • Link Expiration

    Legal

    • Privacy Policy
    • Cookies Policy
    • Terms of Service
    • Acceptable Use Policy

    Support

    • Contact Us
    • Report Abuse

    © 2026 Plung

    All Rights Reserved