Short URL Resolver & Scraper avatar

Short URL Resolver & Scraper

Pricing

Pay per event

Go to Apify Store
Short URL Resolver & Scraper

Short URL Resolver & Scraper

Trace redirect chains and expand short URLs without executing browser scripts. Extract complete hop histories, identify infinite loops, and verify HTTP status.

Pricing

Pay per event

Rating

0.0

(0)

Developer

太郎 山田

太郎 山田

Maintained by Community

Actor stats

0

Bookmarked

6

Total users

2

Monthly active users

6 days ago

Last modified

Share

🔗 URL Unshortener

Trace redirect chains and safely unshorten obfuscated links without risking execution in a standard web browser. Scraping the web often yields datasets filled with tinyurl, bit.ly, or custom short links that mask the true destination. Processing these blindly can lead your crawlers into infinite redirect loops or expose your systems to malicious payloads. This resolver acts as a hardened proxy, systematically expanding shortened URLs to extract the final destination link while safely discarding any executable scripts. Developers and data engineers use this tool to sanitize massive URL lists, schedule automated link-checking workflows, and validate data integrity before loading it into downstream databases. By running this extraction process, you gain deep visibility into the exact path a URL takes. The results explicitly detail every intermediate hop, logging the exact HTTP status codes (like 301, 302, or 404) encountered along the way. You can seamlessly identify broken links, detect insecure HTTP downgrades, and flag toxic domains. Ensure your scraped contact details and website lists contain only clean, verified, and direct endpoints.

Store Quickstart

Start with the Quickstart template (3 demo shortened URLs). For bulk processing, use Bulk Resolve (1,000 URLs, concurrency 20).

Key Features

  • 🔓 Expand all shorteners — Works with bit.ly, t.co, goo.gl, tinyurl, ow.ly, buff.ly, and more
  • 🔗 Full redirect chain — Every hop logged with URL + status code
  • 🔄 Loop detection — Identifies infinite redirect loops and cyclic redirects
  • 🔒 HTTPS downgrade detection — Flags URLs where https redirects to http
  • Bulk processing — Up to 1,000 URLs per run with 1-20 concurrency
  • 📊 Hop count stats — Total hops per URL for ad network / tracker analysis

Use Cases

WhoWhy
Ad fraud analystsDetect cloaking by tracing redirect chains in ad URLs
Security teamsResolve phishing links without clicking to identify payloads
Social media analystsExpand t.co links from X/Twitter datasets for attribution
SEO auditorsVerify outbound shortened links resolve to intended destinations
Journalism/OSINTInvestigate URL patterns in misinformation campaigns

Input

FieldTypeDefaultDescription
urlsstring[](required)Shortened URLs to resolve (max 1000)
maxRedirectsinteger10Max redirect hops (1-20)
concurrencyinteger10Parallel requests (1-20)

Input Example

{
"urls": ["https://bit.ly/3abcdef", "https://t.co/xyz", "https://goo.gl/abc123"],
"maxRedirects": 10,
"concurrency": 10
}

Input Examples

Example: Resolve single short URL

{
"urls": [
"https://bit.ly/abc"
]
}

Example: Bulk batch with safety advisory

{
"urls": [
"https://bit.ly/x1",
"https://t.co/abc",
"https://tinyurl.com/y3"
],
"includeSafetyAdvisory": true
}

Example: Phishing detection workflow

{
"urls": [
"https://bit.ly/suspicious"
],
"maxRedirectChain": 10,
"recordIntermediateRedirects": true,
"abortOnLoop": true
}

Output

FieldTypeDescription
originalUrlstringThe short URL provided as input
finalUrlstringThe final destination URL after all redirects
redirectChainstring[]Full chain of intermediate URLs
totalHopsintegerNumber of redirects followed
hasLoopbooleanTrue if a redirect loop was detected
isHttpsDowngradebooleanTrue if any HTTPS→HTTP downgrade occurred
statusCodeintegerFinal HTTP status code
errorstringnull

Output Example

{
"originalUrl": "https://bit.ly/3abcdef",
"chain": [
{"url": "https://bit.ly/3abcdef", "statusCode": 301},
{"url": "https://example.com/landing", "statusCode": 200}
],
"finalUrl": "https://example.com/landing",
"totalHops": 2,
"hasLoop": false,
"isHttpsDowngrade": false
}

API Usage

Run this actor programmatically using the Apify API. Replace YOUR_API_TOKEN with your token from Apify Console → Settings → Integrations.

cURL

curl -X POST "https://api.apify.com/v2/acts/taroyamada~url-shortener-resolver/run-sync-get-dataset-items?token=YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "urls": ["https://bit.ly/3abcdef", "https://t.co/xyz", "https://goo.gl/abc123"], "maxRedirects": 10, "concurrency": 10 }'

Python

from apify_client import ApifyClient
client = ApifyClient("YOUR_API_TOKEN")
run = client.actor("taroyamada/url-shortener-resolver").call(run_input={
"urls": ["https://bit.ly/3abcdef", "https://t.co/xyz", "https://goo.gl/abc123"],
"maxRedirects": 10,
"concurrency": 10
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
print(item)

JavaScript / Node.js

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_API_TOKEN' });
const run = await client.actor('taroyamada/url-shortener-resolver').call({
"urls": ["https://bit.ly/3abcdef", "https://t.co/xyz", "https://goo.gl/abc123"],
"maxRedirects": 10,
"concurrency": 10
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);

Tips & Limitations

  • Detect malicious URL chains by checking hasLoop and isHttpsDowngrade flags.
  • Default maxRedirects: 10 is safe for legitimate shorteners. Increase only if needed.
  • Use this before clicking any unknown short link in security-sensitive workflows.
  • Combine with Meta Tag Analyzer to inspect the destination page metadata.

FAQ

What if the short URL is dead?

The chain shows the final status code (e.g., 404). hasLoop will be false; finalUrl will be the last URL reached.

Can it handle JavaScript redirects?

No — this is HTTP-level only. JS-based redirects (meta refresh, window.location) require a browser.

Is bit.ly rate-limited?

bit.ly may rate-limit aggressive requests. Use concurrency ≤ 10 for safety on shortener-heavy batches.

Will this follow tracking parameters?

Yes. The full URL including UTM tags is preserved at each hop.

Which shorteners are supported?

Any HTTP-based redirect — bit.ly, t.co, tinyurl, goo.gl, lnkd.in, custom shorteners. No special integration needed.

Will it click through tracking pixels?

It follows server-side HTTP redirects only, not JavaScript or meta-refresh redirects.

URL/Link Tools cluster — explore related Apify tools:

Cost

Pay Per Event:

  • actor-start: $0.01 (flat fee per run)
  • dataset-item: $0.002 per output item

Example: 1,000 items = $0.01 + (1,000 × $0.002) = $2.01

No subscription required — you only pay for what you use.

⭐ Was this helpful?

If this actor saved you time, please leave a ★ rating on Apify Store. It takes 10 seconds, helps other developers discover it, and keeps updates free.

Bug report or feature request? Open an issue on the Issues tab of this actor.