Skip to main content
The Shorturlx REST API lets you create shortened URLs programmatically from any application or script.

Base URL

https://www.shorturlx.xyz/api

Response format

All responses are returned as JSON. Successful responses use HTTP 200; errors use the appropriate 4xx or 5xx status code with an error field in the body.

Available endpoints

The API exposes one public REST endpoint:
MethodPathDescription
POST/api/shortenCreate a shortened URL

Authentication

API keys are optional but required for custom slugs. Authenticated requests also receive a higher rate limit. Include your key as a Bearer token in the Authorization header:
Authorization: Bearer YOUR_API_KEY
See Authentication for instructions on obtaining and using an API key.

Rate limiting

Requests are rate-limited per API key (authenticated) or IP address (unauthenticated):
TypeLimit
Authenticated100 requests per 10 minutes
Unauthenticated10 requests per 10 minutes
Rate limit information is returned in every response as HTTP headers. See Rate limits for details.

Explore the API

Authentication

Obtain an API key and authenticate your requests.

Rate limits

Understand request limits and rate limit headers.

POST /api/shorten

Reference for the URL shortening endpoint.

Code examples

Ready-to-use examples in cURL, JavaScript, and Python.

Build docs developers (and LLMs) love