🔗 URL Unshortener API
Pricing
Pay per event
🔗 URL Unshortener API
Extract and resolve shortened URLs into full redirect chains. Detect infinite loops and HTTPS downgrades using this API tool.
Pricing
Pay per event
Rating
0.0
(0)
Developer
太郎 山田
Actor stats
0
Bookmarked
3
Total users
2
Monthly active users
12 hours ago
Last modified
Categories
Share
🔗 URL Unshortener
Expand bit.ly, t.co, goo.gl, and any shortened URL. Trace full redirect chains, detect loops and HTTPS downgrades.
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
| Who | Why |
|---|---|
| Ad fraud analysts | Detect cloaking by tracing redirect chains in ad URLs |
| Security teams | Resolve phishing links without clicking to identify payloads |
| Social media analysts | Expand t.co links from X/Twitter datasets for attribution |
| SEO auditors | Verify outbound shortened links resolve to intended destinations |
| Journalism/OSINT | Investigate URL patterns in misinformation campaigns |
Input
| Field | Type | Default | Description |
|---|---|---|---|
| urls | string[] | (required) | Shortened URLs to resolve (max 1000) |
| maxRedirects | integer | 10 | Max redirect hops (1-20) |
| concurrency | integer | 10 | Parallel requests (1-20) |
Input Example
{"urls": ["https://bit.ly/3abcdef", "https://t.co/xyz", "https://goo.gl/abc123"],"maxRedirects": 10,"concurrency": 10}
Output
| Field | Type | Description |
|---|---|---|
originalUrl | string | The short URL provided as input |
finalUrl | string | The final destination URL after all redirects |
redirectChain | string[] | Full chain of intermediate URLs |
totalHops | integer | Number of redirects followed |
hasLoop | boolean | True if a redirect loop was detected |
isHttpsDowngrade | boolean | True if any HTTPS→HTTP downgrade occurred |
statusCode | integer | Final HTTP status code |
error | string | null |
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 ApifyClientclient = 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
hasLoopandisHttpsDowngradeflags. - Default
maxRedirects: 10is 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.
Related Actors
URL/Link Tools cluster — explore related Apify tools:
- 🔗 URL Health Checker — Bulk-check HTTP status codes, redirects, SSL validity, and response times for thousands of URLs.
- 🔗 Broken Link Checker — Crawl websites to find broken links, 404 errors, and dead URLs.
- 🏷️ Meta Tag Analyzer — Analyze meta tags, Open Graph, Twitter Cards, JSON-LD, and hreflang for any URL.
- 📚 Wayback Machine Checker — Check if URLs are archived on the Wayback Machine and find closest snapshots by date.
- Sitemap Analyzer API | sitemap.xml SEO Audit — Analyze sitemap.
- Schema.org Validator API | JSON-LD + Microdata — Validate JSON-LD and Microdata across multiple pages, score markup quality, and flag missing or malformed Schema.
- Site Governance Monitor | Robots, Sitemap & Schema — Recurring robots.
- RDAP Domain Monitor API | Ownership + Expiry — Monitor domain registration data via RDAP and track expiry, registrar, nameserver, and ownership changes in structured rows.
- Domain Security Audit API | SSL Expiry, DMARC, Domain Expiry — Summary-first portfolio monitor for SSL expiry, DMARC/SPF/DKIM, domain expiry/ownership, and security headers with remediation-ready outputs.
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.