Gen-Endpoint
Back to API List

URL Shortener API

Utilities
6 Endpoints

Create, manage, and get stats for shortened URLs. Includes a redirector endpoint.

Internal API - Hosted by this App
API Endpoints & Usage
Explore and interact with the available endpoints for the URL Shortener API. These API routes are live!
POST

/api/shorten

Create a new shortened URL. Custom alias (shortCode) and expiration are optional.

Try it out
GET

/api/stats/{shortCode}

Get statistics for a shortened URL. Replace {shortCode} with an actual short code.

Try it out

Replace placeholders (e.g., {userId}) with actual values in the path above. You can also add/edit query parameters (e.g., ?key=value).

GET

/api/links

List all shortened URLs. Supports optional `userId` query parameter for filtering.

Try it out

You can add or change query parameters in the path above (e.g., ?name=User).

GET

/api/links/{linkId}

Get details for a specific short link by its internal ID. Replace {linkId} with an actual link ID.

Try it out

Replace placeholders (e.g., {userId}) with actual values in the path above. You can also add/edit query parameters (e.g., ?key=value).

DELETE

/api/links/{linkId}

Delete a specific short link by its internal ID. Replace {linkId} with an actual link ID.

Try it out

Replace placeholders (e.g., {userId}) with actual values in the path above.

GET

/s/{shortCode}

Redirector endpoint. Accessing this path with a valid shortCode redirects to the original URL and increments the click count. This is not a JSON API but the core functionality.

Try it out

Replace placeholders (e.g., {userId}) with actual values in the path above. You can also add/edit query parameters (e.g., ?key=value).

    URL Shortener API - Free Public API | Gen-Endpoint