API documentation

Everything you submit here is recorded and kept. We store every request and response, including every URL you shorten and every visit to a short link, your IP address, approximate location, and network/browser fingerprints. By using shrink.site, you understand and agree to this. Data notice →

Free URL shortener with custom short links and a simple API. Shorten a long URL without signing up.

Base URL: https://shrink.site. Public access with no accounts, API keys or application rate limits. All APIs support cross-origin requests. Use the OpenAPI specification for machine-readable request and response schemas.

Send POST bodies as JSON or URL-encoded form data unless an endpoint specifies a raw body. Errors return JSON with error.code and error.message. See the usage notes for request bounds and usage notes.

GET /api/links

Shorten a URL.

url query · required
Public HTTP(S) destination.
alias query
Optional case-sensitive custom alias. Used aliases cannot be reused.
format query
Response format. Default: "json". Allowed: json, text.

POST /api/links

Shorten a URL.

url body · required
Public HTTP(S) destination.
alias body
Optional case-sensitive custom alias. Used aliases cannot be reused.
format body
Response format. Default: "json". Allowed: json, text.

GET /s

da.gd-style plain-text short URL.

url query · required
Public HTTP(S) destination.
alias query
Optional case-sensitive custom alias. Used aliases cannot be reused.
format query
Response format. Default: "json". Allowed: json, text.

POST /s

da.gd-style plain-text short URL.

url body · required
Public HTTP(S) destination.
alias body
Optional case-sensitive custom alias. Used aliases cannot be reused.
format body
Response format. Default: "json". Allowed: json, text.

GET /{id}

302 redirect to destination; supports HEAD.

id path · required
Short link ID or alias.

GET /api/links/{id}

Inspect the destination without redirecting.

id path · required
Short link ID or alias.

GET /docs

Server-rendered HTML API reference.

GET /robots.txt

Crawler access rules and sitemap location.

GET /sitemap.xml

Public documentation sitemap.

GET /health

Worker liveness (does not probe external dependencies).

GET /llms.txt

Plain-text agent usage guide.