TinyURL API

⭐ Beginner's Pick Url Shorteners / API Key Intermediate HTTPS
Varies by plan (check documentation)

Overview

TinyURL lets you shorten long URLs into compact links using a simple REST API. Just send your long URL and get back a short tinyurl.com link you can share anywhere. It requires an API key but the free tier is generous enough for most small projects.

💡

Beginner Tip

Start by getting a free API key from tinyurl.com/app/dev — the basic plan lets you shorten thousands of URLs per month. Always store shortened URLs you create, since regenerating the same short link for the same long URL is not guaranteed.

Available Data

shortened URL
original URL
click count
creation date
Use case: Integrate shorten long urls data into web and mobile applications

Example Response

JSON Response
{
  "id": "abc123",
  "short_url": "https://short.ly/abc123",
  "long_url": "https://example.com/very/long/url/path",
  "clicks": 1542,
  "created_at": "2025-01-10T14:30:00Z"
}

Field Reference

data.tiny_url The shortened TinyURL link ready to share.
data.url The original long URL that was shortened.
data.alias The custom alias portion of the TinyURL (after tinyurl.com/).
data.domain The domain used for the short link (e.g., tinyurl.com).
code HTTP status code of the response (0 means success).

Implementation Example

const url = "https://tinyurl.com/app/dev";
// Replace headers or query params with the values required by this API.
const response = await fetch(url, {
  headers: {
  "X-API-Key": "YOUR_API_KEY"
  }
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

Common Errors & Troubleshooting

401 Unauthorized Missing or invalid API key in the Authorization header.
Make sure you pass the header as "Authorization: Bearer YOUR_API_KEY" using the token from your TinyURL dashboard.
422 Unprocessable Entity The URL you submitted is malformed or empty.
Ensure the URL is properly formatted and URL-encoded, starting with http:// or https://.
429 Too Many Requests You have exceeded your plan's rate limit.
Add a delay between requests or upgrade your plan. The free tier allows a limited number of API calls per day.

Matrix Score Breakdown

🌐 Reachability 30/30
⚡ Speed 15/20
🔒 Security 15/15
🛠 Developer XP 9/20
✓ Reliability 10/15

Partially tested on Apr 5, 2026

Technical Specifications

Auth API Key
HTTPS REQUIRED
CORS NO
Category Url Shorteners
Difficulty Intermediate
Verified: 2026-04-04

Similar APIs

View All →