URL Shortener & Link Analytics API
Short links with custom aliases, expiry & click limits, full click analytics (countries, referrers, devices), bulk shortening, link expander and malware screeni
Get a free API key on RapidAPI Try it in the playgroundURL Shortener & Link Analytics API
Short links that just work — fast redirects from Cloudflare's global edge, and the analytics you need.
🔗 Short links
- Shorten any http/https URL, optionally with a custom alias, title, expiry date and click limit
- Bulk: up to 50 links per call
- Edit the destination, extend or remove expiry, disable / re-enable, or delete — with your RapidAPI account or the
manage_token - A ready QR code URL for every link
📊 Analytics
Clicks per day, countries, referrers, devices, browsers and operating systems, last-click time — for any period up to a year. List all links you created.
🛡️ Safety
Every destination is checked against Cloudflare's malware & phishing intelligence; IP-literal, local and chained-shortener links are refused; abusive links are disabled after reports.
🔍 Link expander
Resolve any short or redirecting URL (bit.ly, t.co, tinyurl…) to its final destination with the full redirect chain and a safety flag.
Use cases: marketing campaigns & SMS · social posts · QR codes · newsletters · affiliate links · click tracking · link safety checks
Keywords: url shortener api, link shortener, short url, custom short links, link analytics, click tracking, bitly alternative, url expander, unshorten url, qr code links
Endpoints (9)
| Endpoint | What it returns |
|---|---|
POST/shorten | Shorten a URL Create a short link. JSON body (or query params): url (required), alias, title, expires_at (ISO) or expires_in_hours, max_clicks. Returns the short URL, a QR code URL and a manage_token. |
POST/bulk | Bulk shorten Shorten up to 50 URLs in one call: {"urls": ["https://…", {"url": "https://…", "alias": "promo"}]}. Each item reports success or the reason it was rejected. |
GET/link | Link details Destination, status (active / expired / disabled / limit reached), clicks and dates of a short link. |
GET/stats | Click analytics Clicks per day plus top countries, referrers, devices, browsers and operating systems. Owner only (same RapidAPI account, or manage_token). |
GET/links | My links All links created with your RapidAPI account, newest first. |
POST/update | Update a link Change destination, title, expiry, click limit, or disable/enable (active=false/true). Owner only. |
GET/expand | Expand / unshorten a URL Follow redirects of any short link (bit.ly, t.co, tinyurl…) and return the final URL, the redirect chain and a malware/phishing flag. |
POST/report | Report abuse Report a short link used for spam, phishing or malware. Links are disabled automatically after repeated reports. |
POST/delete | Delete a link Permanently delete a short link and its statistics. Owner only. |
Quick start
Subscribe on RapidAPI (free plan available), copy your key, and call POST /shorten:
curl --request POST \
--url 'https://url-shortener-link-analytics-api1.p.rapidapi.com/shorten' \
--header 'x-rapidapi-host: url-shortener-link-analytics-api1.p.rapidapi.com' \
--header 'x-rapidapi-key: YOUR_RAPIDAPI_KEY' \
--header 'content-type: application/json' \
--data '{"url": "https://developers.cloudflare.com/workers/", "title": "Workers docs", "expires_in_hours": 720}'import requests
url = "https://url-shortener-link-analytics-api1.p.rapidapi.com/shorten"
headers = {
"x-rapidapi-host": "url-shortener-link-analytics-api1.p.rapidapi.com",
"x-rapidapi-key": "YOUR_RAPIDAPI_KEY",
}
payload = {"url": "https://developers.cloudflare.com/workers/", "title": "Workers docs", "expires_in_hours": 720}
resp = requests.post(url, json=payload, headers=headers)
print(resp.json())const res = await fetch("https://url-shortener-link-analytics-api1.p.rapidapi.com/shorten", {
method: "POST",
headers: {
"x-rapidapi-host": "url-shortener-link-analytics-api1.p.rapidapi.com",
"x-rapidapi-key": "YOUR_RAPIDAPI_KEY",
"content-type": "application/json"
},
body: JSON.stringify({"url": "https://developers.cloudflare.com/workers/", "title": "Workers docs", "expires_in_hours": 720})
});
console.log(await res.json());
Example response
{
"code": "LlmTmQv",
"short_url": "https://t-go.rahadata.workers.dev/LlmTmQv",
"url": "https://developers.cloudflare.com/workers/",
"title": "Workers docs",
"created_at": "2026-11-21T21:39:57.000Z",
"expires_at": "2026-12-21T21:39:57.000Z",
"max_clicks": null,
"clicks": 0,
"last_click_at": null,
"active": true,
"status": "active",
"manage_token": "FnQ8LG6RSnptxBurXFfvl25S",
"qr_code": "https://api.qrserver.com/v1/create-qr-code/?size=300x300&data=https%3A%2F%2Ft-go.rahadata.workers.dev%2FLlmTmQv"
}
Guides
Start free. Every plan includes all endpoints; upgrade only when you need more requests. Runs on Cloudflare's global network for low latency worldwide.
Subscribe on RapidAPIRelated APIs
Domain & IP Lookup API
WHOIS/RDAP, domain availability, DNS records, SSL certificates, subdomain finder, IP geolocation with ASN & abuse contacts, ASN lookup.
ToolsFake Data Generator API - Mock & Test Data
Generate realistic fake data for testing: persons, addresses, companies, products, cards & IBANs, internet data, lorem ipsum, custom schemas, CSV.
ToolsPackage Registry API - npm, PyPI, crates, gems
One API for npm, PyPI, crates.io & RubyGems: package details, versions, dependencies, download stats, search, comparison and security advisories.
ToolsPassword Security API - Breach & Strength
Check if a password was leaked in data breaches (900M+ pwned passwords), score its strength, generate secure passwords & passphrases, hash text.
ToolsQR Code & Barcode Generator API
Generate QR codes (URL, Wi-Fi, vCard, email, SMS, event…) and 30 barcode types (Code128, EAN-13, UPC, DataMatrix, PDF417…) as PNG or SVG.
ToolsWorld Time & Timezone API
Current time in any timezone or city, timezone conversion, DST transitions, time difference, meeting planner and business-day calculator.