URL Shortener Expander avatar

URL Shortener Expander

Pricing

Pay per event

Go to Apify Store
URL Shortener Expander

URL Shortener Expander

This actor takes any list of shortened or redirecting URLs and follows each redirect step by step to reveal the final destination URL. It returns the complete redirect chain, redirect count, final status code, and final domain. Use it for link analysis, security verification, or marketing...

Pricing

Pay per event

Rating

0.0

(0)

Developer

Stas Persiianenko

Stas Persiianenko

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

a day ago

Last modified

Categories

Share

Expand shortened URLs (bit.ly, t.co, tinyurl.com, etc.) to reveal the final destination URL and full redirect chain.

What does URL Shortener Expander do?

This actor takes any list of shortened or redirecting URLs and follows each redirect step by step to reveal the final destination URL. It returns the complete redirect chain, redirect count, final status code, and final domain. Use it for link analysis, security verification, or marketing attribution whenever you need to see where a short link actually leads. It works with all major URL shorteners and any custom short domain that uses HTTP redirects.

Use cases

  • Security analysts -- check where shortened links actually lead before clicking to detect phishing, malware, or suspicious destinations
  • Marketing teams -- trace redirect chains to understand traffic flow and verify that campaign attribution links work correctly
  • Link auditors -- verify that old shortened links still resolve correctly and reach the intended destination pages
  • Compliance officers -- uncover suspicious final destinations hidden behind short URLs in regulated communications and emails
  • SEO specialists -- check redirect chains for unnecessary hops that cause link equity loss and slow down page discovery
  • Threat intelligence teams -- bulk-expand URLs from threat feeds to identify malicious infrastructure behind short links

Why use URL Shortener Expander?

  • Batch processing -- expand hundreds of shortened URLs in a single run instead of clicking them one by one
  • Full redirect chain -- see every hop in the redirect sequence, not just the final destination
  • Multi-service support -- works with bit.ly, t.co, tinyurl.com, goo.gl, ow.ly, and any other URL shortener or custom short domain
  • Timing data -- measures how long expansion takes so you can identify slow redirect chains that hurt user experience
  • Final domain extraction -- the finalDomain field lets you quickly group and filter results by destination domain
  • Structured JSON output -- consistent schema with original URL, final URL, chain, and domain ready for analysis
  • Pay-per-event pricing -- you only pay for the URLs you expand, starting at $0.001 per URL

Input parameters

ParameterTypeRequiredDefaultDescription
urlsarrayYes--List of shortened URLs to expand (bit.ly, t.co, tinyurl.com, etc.)

You can mix shortened URLs from different services in the same batch. Non-shortened URLs are also accepted and will simply return the original URL with zero redirects.

Input example

{
"urls": [
"https://bit.ly/3ABC123",
"https://tinyurl.com/example",
"https://google.com"
]
}

Output example

Each result includes the original shortened URL, the final destination URL, the full redirect chain, redirect count, final status code, and the destination domain.

{
"originalUrl": "https://bit.ly/3ABC123",
"finalUrl": "https://www.example.com/landing-page?utm_source=bitly",
"redirectChain": [
"https://bit.ly/3ABC123",
"https://www.example.com/landing-page?utm_source=bitly"
],
"redirectCount": 1,
"finalStatusCode": 200,
"finalDomain": "www.example.com",
"expandTimeMs": 450,
"error": null,
"expandedAt": "2026-03-01T12:00:00.000Z"
}

How much does it cost?

URL Shortener Expander uses Apify's pay-per-event pricing model. You are only charged for what you actually use -- no monthly fees, no subscriptions.

EventPriceDescription
Start$0.035One-time per run
URL expanded$0.001Per URL processed

Cost examples:

  • Expanding 10 URLs: $0.035 + (10 x $0.001) = $0.045
  • Expanding 50 URLs: $0.035 + (50 x $0.001) = $0.085
  • Expanding 100 URLs: $0.035 + (100 x $0.001) = $0.135
  • Expanding 1,000 URLs: $0.035 + (1,000 x $0.001) = $1.035

Using the Apify API

You can call URL Shortener Expander programmatically from any language using the Apify API. The actor slug is automation-lab/url-shortener-expander. Below are ready-to-use examples for the two most common languages.

Node.js

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_TOKEN' });
const run = await client.actor('automation-lab/url-shortener-expander').call({
urls: ['https://bit.ly/3ABC123', 'https://tinyurl.com/example'],
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);

Python

from apify_client import ApifyClient
client = ApifyClient('YOUR_TOKEN')
run = client.actor('automation-lab/url-shortener-expander').call(run_input={
'urls': ['https://bit.ly/3ABC123', 'https://tinyurl.com/example'],
})
items = client.dataset(run['defaultDatasetId']).list_items().items
print(items)

Integrations

URL Shortener Expander integrates with the major automation and data platforms through the Apify ecosystem:

  • Make (formerly Integromat) -- automatically expand shortened URLs from incoming data feeds and route results to security tools.
  • Zapier -- create Zaps that expand links from emails, forms, or databases and flag suspicious destinations.
  • Google Sheets -- export results for link auditing, reporting, and maintaining a registry of expanded URLs.
  • Slack -- send alerts to a security channel when an expanded URL leads to a suspicious or blacklisted domain.
  • Webhooks -- trigger downstream security checks or link validation in your own backend systems.
  • n8n -- orchestrate runs from n8n workflows or any platform that supports HTTP requests and the Apify REST API.

Tips and best practices

  • Include non-shortened URLs too -- the actor works with any URL; non-redirecting links simply return the original URL as the final destination with zero redirects.
  • Check redirect counts -- a high redirectCount (3+) may indicate tracking chains or misconfigured redirects that slow down users.
  • Use for email link safety -- expand all shortened URLs from inbound emails before clicking to protect against phishing and social engineering.
  • Monitor affiliate links -- periodically expand your affiliate links to confirm they still reach the intended merchant pages and have not been hijacked.
  • Pair with URL Parser -- after expanding, run the final URLs through URL Parser to extract domains, query parameters, and UTM tags for deeper analysis.

FAQ

What URL shorteners are supported? The actor works with any URL shortener service, including bit.ly, t.co, tinyurl.com, goo.gl, ow.ly, is.gd, rebrand.ly, and custom short domains. It simply follows HTTP redirects regardless of the service.

What happens if a shortened URL is expired or broken? The actor reports whatever the shortener returns. If the short URL no longer resolves, the error field will contain details about the failure (e.g., connection timeout or 404 status). Other URLs in the batch are still processed normally.

Does the actor visit the final destination page? The actor follows redirects via HTTP HEAD/GET requests but does not render the page in a browser. It captures the final URL and status code without executing any JavaScript on the destination page.

Can I export results to CSV? Yes. Apify datasets support export in JSON, CSV, Excel, XML, and other formats. After the run completes, download results from the Apify Console or use the API to export in your preferred format.

What is the maximum number of redirects followed? The actor follows up to 20 redirects per URL. If the chain exceeds this limit, it stops and reports the last URL reached along with an error indicating the maximum redirect count was exceeded.

Can I expand URLs that require authentication? No. The actor follows redirects as an unauthenticated client. If a redirect chain passes through a login wall, the actor will report the login page as the final destination rather than the content behind it.