API Directory › 🔧 Utilities & Media › TinyURL
API KeyHTTPSCORS

TinyURL API

Shorten long URLs programmatically via a simple API.

Auth
API Key
HTTPS
Yes
CORS
Yes
Open TinyURL docs ↗

What it does

TinyURL’s API shortens long URLs, with support for custom aliases, branded domains, link editing, and expiry. A legacy no-auth endpoint still works for basic one-off shortening; the modern JSON API needs a free token.

Base URL

https://api.tinyurl.com

Authentication

The modern API needs a free API token: Authorization: Bearer YOUR_TOKEN on JSON requests to /create, /change, etc. The legacy endpoint https://tinyurl.com/api-create.php?url={long_url} is a keyless GET that returns the short URL as plain text.

Code examples

curl (legacy, no auth)
curl -s "https://tinyurl.com/api-create.php?url=https://larzos.com/apis/"
# https://tinyurl.com/xxxxxxx
curl (modern JSON API)
curl -s -X POST https://api.tinyurl.com/create \
  -H "Authorization: Bearer $TINYURL_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://larzos.com/apis/","domain":"tinyurl.com"}'

Rate limits & quotas

Free plan on the modern API: roughly 600 requests/minute and a monthly creation cap in the low thousands, plus a limit on how many active links you can manage. Over the limit returns HTTP 429. The legacy endpoint is best-effort with its own abuse throttling and no analytics.

Key response fields

data.tiny_urlThe shortened URL (modern API)
data.alias / data.domainThe slug and domain used
data.urlThe original long URL
code / errors[]Non-zero code and an errors array on failure
(legacy)Plain-text short URL, or an Error string

Common errors

401Missing or invalid Bearer token on the modern API.
422Invalid URL, or a requested alias that is taken/reserved.
429Rate or monthly limit exceeded.
(legacy 'Error')The legacy endpoint returns the literal text Error for a bad or blocked URL.

When to use it (and alternatives)

Use the legacy endpoint for a quick, throwaway short link with zero setup. Use the modern token API when you need custom aliases, link management or analytics. For a fully keyless modern option, is.gd.

FAQ

Does the old api-create.php still work?

Yes, for now — it is a keyless GET that returns a plain-text short URL. It has no analytics, no custom aliases and its own abuse throttling. TinyURL steers new integrations to the token API.

Can I use my own domain?

Branded domains are a paid feature. On free, domain is tinyurl.com (or a couple of TinyURL-owned alternates).

How do I edit where a short link points?

The modern API’s /change endpoint updates the destination of a link you own — handy for campaign links. The legacy endpoint can’t do this.

New to APIs?

Short guides for working with this API — and any other.

🛠️ Handy LarzOS tools

Free tools to help you work with this API.

QR GeneratorImage Compressor

Related Utilities & Media APIs

← Back

More Utilities & Media APIs · All 196 APIs