URLs are the foundation of how apps and platforms connect users to content. When you need to shorten, brand, and track those links at scale, a URL shortener API gives you the tools to do it programmatically without sacrificing control.
URL shortener APIs also help you manage links in bulk, generate QR codes, and track performance with detailed analytics, all while keeping your brand front and center. This guide breaks down how to choose the right URL shortener API for your tech stack and reviews the 8 best options developers are using right now, plus a few free endpoints you can call without an API key.
Key takeaways
- A URL shortener API lets your app create, update, and track short links with HTTP requests instead of a dashboard, and most return JSON.
- Rebrandly is the best overall URL shortener API, with branded domains, routing rules, click data you can stream to your own systems, and a high-volume API for SMS-scale link creation.
- Free no-key endpoints like is.gd, CleanURI, and TinyURL's legacy api-create.php work for scripts and prototypes, but you can't edit those links, track them properly, or put them on your own domain.
- Before you pick an API, check its rate limits, how it authenticates, whether it supports custom domains, and how you get click data out of it.
- Google's URL Shortener API is gone, and goo.gl links with no recent activity stopped working in August 2025.
What is a URL shortener API?
A URL shortener API (sometimes called a link shortener API) is a set of endpoints that lets you create, manage, and track shortened links programmatically. Instead of manually copying and pasting links into a shortening service, you build link shortening directly into your application through HTTP requests.
With a URL shortener API, you can:
- Create branded short links using your custom domain
- Update destinations for existing shortened links
- Generate thousands of links in bulk
- Pull click analytics and performance data
- Create scannable QR codes linked to your shortened URLs
- Send clicks to different destinations based on country, device, or language
APIs typically return structured responses in JSON format, which makes shortened links easy to use in mobile apps, web tools, and automated campaigns. That's why they're so common in high-volume environments like CRMs, SMS platforms, and link-in-bio tools that need scalable link creation.
How does a URL shortener API work?
Most URL shortener APIs follow the same basic pattern. Your app sends an authenticated request with the long URL, and the API sends back the short link along with an ID you can use later.
Here's what that looks like from your app's side:
- You authenticate with an API key or token, usually sent in a request header
- You send a POST request with the destination URL and any options, like the domain or the back half of the link (Rebrandly's API calls it a slashtag)
- The API returns a JSON object with the short URL, the link's ID, and details like when it was created
- You use that ID later to change the destination, add routing rules, or pull click data
Every provider also caps how many requests you can make in a given window. When you go over, most APIs return a 429 status code, and your code should wait and retry instead of hammering the endpoint.
Outgrowing your link shortener?
Rebrandly gives you more flexibility, better support, and enterprise-grade security and compliance. See how we compare.
See pricingHow to choose the right URL shortener API
URL shortener APIs vary widely in capability, and a solution that works for a personal project won't hold up for enterprise campaign automation. The right choice depends on your technical requirements and your business goals.
It helps to look at it in layers: the technical foundation, the features, and the business side.
Technical requirements for a reliable URL shortener API
Start with the technical foundation. It decides whether the API fits your existing stack and keeps up as your volume grows.
Before you commit, find out:
- How many calls you can make per minute, and whether there's a separate bulk or high-volume option when you need more
- Whether it authenticates with API keys, OAuth, or tokens
- How good the documentation is, including quick-start guides, code examples, an OpenAPI spec, and SDKs for the languages your team uses
- Whether it returns consistent JSON and clear status codes, including rate-limit headers that tell you when to retry
- What uptime the provider commits to (look for 99.9% or higher and a public status page)
- Whether it can push click data to you through webhooks or a data stream, or if you'll have to keep polling for stats
A solid technical backbone keeps the experience consistent for your team and your audience.
Feature requirements for a successful URL shortener API
Once you've confirmed the API fits your stack, look at what it can actually do for your team. These features decide whether it's the right toolkit for the job.
Look for:
- Custom domains and branded links, which help people trust what they're clicking
- Analytics and click tracking, with real-time data and UTM support
- Bulk link creation for large campaigns like bulk SMS
- The ability to update destinations, set expirations, and add retargeting pixels after a link is live
- QR code generation for links that need to work on screens, slides, and printed materials
- Traffic routing that sends clicks to different destinations by country, device, language, or time of day
- Conversion tracking that connects a link to the sign-ups or purchases it led to
Features are only half of it, though. The API also has to fit your budget and your compliance requirements.
Pricing and business factors that impact your URL shortener API
Even the best API won't help if it doesn't fit your budget or your security team's checklist. These business considerations set you up for long-term use.
Check:
- How far the free plan goes, and whether you can test with real volume before upgrading
- Whether pricing is based on links, API calls, features, or a flat rate
- Security and compliance, like SOC 2, Type II, GDPR, and HIPAA for regulated industries
- What kind of support you get when an integration breaks
URL shortener APIs at a glance
Most URL shortener APIs look alike on paper, which makes picking one harder than it should be. Here's a quick snapshot of the 8 APIs in this list.
| API | Best for | Authentication | Standout API feature |
|---|---|---|---|
| Rebrandly | Best overall URL shortener API | API key or OAuth 2.0 | High-volume API, routing rules, and Clickstream |
| Bitly | Teams that want a familiar name | Bearer token | SDKs for Android and iOS |
| Short.io | Bulk imports | API key | Up to 1,000 links in one request |
| TinyURL | Quick links with little setup | Bearer token | Legacy endpoint that works without a key |
| T.LY | Developer-friendly analytics | Bearer token | Webhooks you can manage through the API |
| BL.INK | Enterprise link governance | Access and refresh tokens | UTM templates and redirect types on create |
| Cuttly | Simple link management | API key in the query string | Separate API for team workspaces |
| YOURLS | Self-hosting | Username and password, or signature token | Open source, runs on your own server |
If you're comparing full link shortener apps rather than their APIs, our roundup of the best URL shorteners covers those.
The 8 best URL shortener APIs in 2026
Rebrandly is the best overall URL shortener API, followed by Bitly, Short.io, TinyURL, T.LY, BL.INK, Cuttly, and YOURLS for more specific needs.
1. Rebrandly API: Best overall URL shortener API
Pros:
- Branded short links on your own domains, with routing, retargeting, and QR codes built in
- API access that scales from 100 calls a minute on the free plan up to 100,000 calls a second on Enterprise
- A separate high-volume API for SMS and campaign-scale link creation
- Click data you can pull through the API or stream to a webhook or Amazon S3
- SOC 2, Type II, HIPAA, and GDPR compliance
Cons:
- Advanced features require a paid plan
Rebrandly is a link intelligence platform, and thousands of developers trust its API for branded domains, real-time analytics, traffic routing, link retargeting, and secure, compliant infrastructure. With 99.99% uptime and capacity for up to 100,000 links per second, Rebrandly is built for mission-critical link infrastructure.
The standard Rebrandly API is a REST API at api.rebrandly.com. You authenticate with an API key in the apikey header, or with OAuth 2.0 if you're building an app that acts on behalf of other Rebrandly users.
How many calls you can make depends on your plan. Rebrandly's pricing page lists API access at 100 calls a minute on the free plan, 300 on Essentials, 600 on Professional, and 1,000 on Growth, with Enterprise going up to 100,000 calls a second.
Beyond creating links, the API covers most of what a link team does day to day. With Rebrandly, you can:
- Add up to 10 routing rules per link that send clicks to different destinations by country, language, device, browser, operating system, or time
- Organize links with tags and workspaces, and attach retargeting scripts
- Stream every click to your own endpoint or an Amazon S3 bucket with Clickstream
- Connect clicks to the sign-ups and purchases they led to with conversion tracking
- Generate QR codes for your short links
- Keep your click data with unlimited retention
Rebrandly also has an official Python SDK, an OpenAPI spec, and code examples in cURL, Node.js, Python, PHP, and C#. You'll find all of it in the Rebrandly developer documentation.
2. Bitly API: Best for teams that want a familiar name
Pros:
- One of the best-known names in link shortening
- SDKs for Android and iOS, plus an npm package and an OpenAPI spec
Cons:
- The free plan includes 5 links and 1,000 API requests a month
- Custom domains require a paid plan
Bitly is a longtime leader in link shortening, with strong brand recognition and solid analytics on paid plans. Its API uses Bearer tokens, and you create links with a POST request to the /v4/shorten endpoint.
Every Bitly plan has a monthly cap on API requests on top of its per-minute and per-hour limits, and you'll get a 429 error when you hit either one. Read our detailed Bitly API review for more on the API, or our full Bitly review for the rest of the product.
3. Short.io API: Best for bulk imports
Pros:
- A bulk endpoint that creates up to 1,000 links in a single request
- Supports multiple custom domains
- Code samples in Python, Node.js, and Ruby
Cons:
- The free plan caps you at 1,000 links total
- Statistics endpoints are limited to 10 requests a minute
Short.io is a full-featured shortener with real-time tracking and team collaboration tools. Its API uses a secret API key, and Short.io's help center lists a limit of 50 requests per second for creating single links.
The bulk endpoint is where Short.io stands out. You can send up to 1,000 links in one request (with a limit of 5 requests every 10 seconds), which is handy when you're importing a big list of URLs at once.
Our Short.io review goes deeper on the rest of the product.
4. TinyURL API: Best for quick links with little setup
Pros:
- API access on the free plan
- A legacy endpoint that shortens links without a key
Cons:
- Minimal analytics and tracking
- Using your own domain requires a paid plan
TinyURL is one of the oldest shorteners around, and it's had a simple API for years. The current API lives at api.tinyurl.com and uses a Bearer token you create in your account settings.
The free plan includes about 600 API calls a month, according to our TinyURL API review. TinyURL also still supports its older api-create.php endpoint, which shortens a URL without any key at all (we cover it in the free API section below).
5. T.LY API: Best for developer-friendly analytics
Pros:
- Analytics endpoints for visits, countries, cities, referrers, platforms, and browsers
- Webhooks you can create, test, and resend through the API
Cons:
- Webhooks aren't available on every plan
- No official SDK, only code samples in JavaScript, PHP, and Python
T.LY is a modern API with developer-friendly features and clear documentation. You authenticate with a Bearer token tied to a team, and T.LY's API docs list limits of 1,000 link-creation requests a minute and 500 a minute for other endpoints.
T.LY also keeps rate limits separate from your monthly link allowance, which can trip people up. If you run out of monthly links, waiting a minute won't help, and you can check where you stand with its usage endpoint.
6. BL.INK API: Best for enterprise link governance
Pros:
- Click breakdowns by country, region, city, device, and referrer, for single links or whole domains
- UTM templates, archive dates, and 301 or 307 redirects you can set when you create a link
Cons:
- Access tokens expire every 24 hours
- Analytics endpoints aren't available on every plan
BL.INK is a branded link platform aimed at larger organizations (Loftware acquired it in April 2025), and its v4 REST API reflects that. You get an access token by sending your credentials or a refresh token to the /access_token endpoint, then pass it as a Bearer token.
BL.INK's API reference caps you at 5 connections per second per IP address, and requests over that limit get an HTTP 503 (or a 533 or 544) error.
Most APIs use a 429 for that. It's worth checking for all of these codes in your retry logic.
7. Cuttly API: Best for simple link management
Pros:
- QR codes included on the free plan
- Supports branded domains through the API
Cons:
- Low rate limits on smaller plans (3 calls a minute on the free plan)
- The API key goes in the query string instead of a header
Cuttly is an all-in-one link management tool with QR generation and link categorization. Its Regular API covers individual accounts, and a separate Team API handles shared workspaces.
Rate limits are the main thing to watch with Cuttly, and Cuttly's developer guide lists 3 calls per minute on the free plan, scaling up to 360 calls per minute on its largest plan. That's fine for testing, but the free tier won't keep up with production traffic.
8. YOURLS API: Best for self-hosting
Pros:
- Fully customizable and open source
- No external service dependency
Cons:
- Requires server setup and technical expertise
- Ongoing maintenance overhead
YOURLS (short for Your Own URL Shortener) is a self-hosted PHP application that gives you complete control over your links and data. Its API runs through a single yourls-api.php file on your server, with actions to shorten a URL, expand a short link, and pull stats.
You can authenticate with a username and password, or with a secret signature token that keeps your credentials out of requests. The YOURLS API documentation covers both, including a token that expires after a set time.
Free URL shortener APIs that don't need a key
is.gd, CleanURI, spoo.me, and TinyURL's legacy endpoint let you shorten a URL with a single request and no API key. They're handy when you need a short link from a script, a bot, or a quick prototype, and signing up for anything feels like overkill.
These are the ones that are still documented in 2026:
| Service | How to call it | Documented limit |
|---|---|---|
| is.gd | GET is.gd/create.php?format=simple&url=YOUR_URL | 200 links an hour per IP |
| CleanURI | POST to cleanuri.com/api/v1/shorten with a url field | 2 requests a second per IP |
| TinyURL (legacy) | GET tinyurl.com/api-create.php?url=YOUR_URL | Not published |
| spoo.me | POST to its v1 shorten endpoint, anonymously or with a key | Lower limits without a key |
Here's what an is.gd call looks like:
curl "https://is.gd/create.php?format=simple&url=https://www.example.com/very/long/page"That returns the short link as plain text, which is about as simple as an API gets. Most of these endpoints take the long URL as a query parameter or form field, which means you'll want to URL-encode it first.
The trade-off is everything else. With a no-key endpoint:
- You can't change where a link points after you create it
- You get no analytics, or only basic click counts
- Links use the service's domain instead of yours
- Limits apply per IP address, and services can block traffic that looks like heavy automation
- There's no uptime commitment, and free services do shut down (Google's goo.gl is the best-known example)
So no-key APIs are a good fit for internal tools, personal scripts, and prototypes. Once a link goes in front of customers, you'll want your own domain, editable destinations, and real click data, which is where an authenticated API like Rebrandly's comes in.
Quick start: Getting started with the Rebrandly API
Setting up the Rebrandly URL shortener API takes a few minutes. Here's the whole process:
- Get your API key. Sign in to Rebrandly, go to Settings > API keys, and create a new key. Treat it like a password and keep it out of your code repository.
- Add authentication to your requests. Send the key in an apikey header, along with Content-Type: application/json.
- Make your first request. Send a POST request to https://api.rebrandly.com/v1/links with a destination URL. You can also pass a domain and a slashtag (the back half of the link) to control how it looks.
- Handle the response. Rebrandly returns JSON with the link's id and shortUrl. Store the id if you'll want to update the link or pull its click data later.
If you leave out the domain, Rebrandly uses your default domain and generates a random slashtag.
Create a branded link with cURL
The fastest way to test your key is a single cURL request from your terminal:
curl -X POST https://api.rebrandly.com/v1/links \
-H "apikey: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"destination": "https://www.example.com/spring-sale",
"title": "Spring sale"
}'Create a branded link with Python
In Python, the same request takes a few lines with the requests library:
import requests
response = requests.post(
"https://api.rebrandly.com/v1/links",
headers={"apikey": "YOUR_API_KEY", "Content-Type": "application/json"},
json={"destination": "https://www.example.com/spring-sale", "title": "Spring sale"},
)
link = response.json()
print(f"https://{link['shortUrl']}")If you'd rather not write requests by hand, the official rebrandly-official package wraps the API for Python.
Create a branded link with Node.js
Node.js 18 and later include fetch. You don't need any extra packages:
const response = await fetch("https://api.rebrandly.com/v1/links", {
method: "POST",
headers: {
apikey: "YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({ destination: "https://www.example.com/spring-sale", title: "Spring sale" }),
});
const link = await response.json();
console.log(`https://${link.shortUrl}`);The developer documentation also has PHP and C# versions of these examples, plus the full API reference.
How to create short links at high volume
Most APIs create one link per request, which works fine until you need a unique link in every text message of a million-person campaign. That's the job Rebrandly's high-volume API handles.
You send a PUT request to enterprise-api.rebrandly.com with up to 25 links at a time. Each link carries a time to live (TTL) between 1 hour and 90 days, and Rebrandly deletes it automatically when that window ends.
A few things work differently from the standard API:
- High-volume links don't appear in your dashboard, which means you'll need to store the IDs the API returns
- Every response includes rate-limit headers that tell you how many requests you have left and when the limit resets
- Your link volume is set by your plan, and Enterprise plans can raise the rate limit
Wonder Cave, a text messaging technology company, uses Rebrandly to generate unique branded links with custom domains for its customers' campaigns. Today 97% of its campaigns include Rebrandly links, and its customers have seen a 60% increase in click-through rates.
Its CTO and co-founder, Vinnie Rossi, says Rebrandly can create "more than a million links in a minute." If you're planning an SMS program, our guide to high-volume link management goes deeper.
Can AI agents create short links through an API?
Yes, and it's one of the newer ways teams use a URL shortener API. AI assistants and agents can call link APIs directly, or connect through an MCP (Model Context Protocol) server, which turns an API into tools the assistant knows how to use.
Rebrandly's MCP server works with Claude, Gemini, GitHub Copilot, and other clients. Once it's connected, you can ask your assistant to create a branded link, change a destination, or break down last week's clicks by country and device without writing any code.
In Claude, you add Rebrandly from the connectors directory and sign in with your normal Rebrandly login. Other clients connect with an API key.
Should you build your own URL shortener or use an API?
For most teams, a hosted URL shortener API is faster and cheaper than building and running your own. A basic shortener is a classic system design exercise, and a weekend project can get you a working redirect, but production takes a lot more.
A production shortener has to handle:
- Fast redirects for every click, anywhere in the world, without downtime
- Abuse and phishing detection that keeps your domain off blocklists
- Click analytics, bot filtering, and data retention
- Custom domains with SSL certificates
- Security reviews and compliance (SOC 2, GDPR, HIPAA) if you sell to larger companies
That's a lot of infrastructure to own for something that isn't your core product. We wrote about the hidden work in more detail in why building a link shortener at scale is harder than it looks.
YOURLS is the middle ground if you want control without building from scratch. Otherwise, a hosted API gets you to production faster and keeps the maintenance on someone else's plate.
The best URL shortener API is the one you won't outgrow
If you need a URL shortener API that covers scalability, custom domains, analytics, QR codes, and compliance, Rebrandly is the best overall choice. It balances power and ease of use for professional deployment at scale.
Other good options, depending on your goals:
- Use YOURLS for total control in a self-hosted environment
- Try is.gd for quick, no-key links in scripts and prototypes
- Look at Short.io if bulk imports are your main use case
A URL shortener API connects your users with content through every click, scan, and share. It's worth picking one that can handle where your app is headed.
Ready to experience the power of Rebrandly's API? Start your free trial today and see how easy it is to create, manage, and track branded short links at scale.
Frequently asked questions
Is the Google URL Shortener API still available?
No. Google stopped accepting new links in 2019, and Google's developer blog confirmed that goo.gl links that showed no activity in late 2024 stopped working on August 25, 2025.
Actively used goo.gl links were preserved, but there's no way to create new ones.
Do URL shortener APIs charge for API access?
Most include some free API access and charge as you need more volume. Rebrandly, Bitly, and TinyURL all include API access on their free plans, and self-hosted YOURLS only costs whatever you pay for hosting.
What's the difference between a URL shortener API and a web app?
A web app is built for people creating links by hand, one at a time or from a CSV. An API lets your app, CRM, or messaging platform create and update links on its own the moment it needs them (if you only need a few links, our guide on how to shorten a link covers the manual options).
Can I use my own domain with a URL shortener API?
Yes, with most providers. You connect the domain in your account first, then pass it in each request (with Rebrandly, that's the domain field).
Free no-key APIs always use the service's own domain.
Can I expand a short URL with an API?
Yes. Most providers let you look up a link you created to see where it goes, and Rebrandly returns the full link object, including the destination, when you request a link by its ID.
is.gd also has a public lookup endpoint for its own links.
Which programming languages work with a URL shortener API?
URL shortener APIs are REST APIs that send and receive JSON, which means any language that can make an HTTP request will work. That includes PHP, Python, Node.js, Ruby, Java, Go, and C#, and some providers add SDKs on top, like Rebrandly's official Python SDK and Bitly's Android and iOS SDKs.



