VOOZH about

URL: https://apify.com/trinityhades/tiktok-url-expander

โ‡ฑ Tiktok Url Expander ยท Apify


Pricing

$10.00 / 1,000 urls

Go to Apify Store

Follows redirects for one or many shortened TikTok (or any) URLs and returns the final resolved URL plus redirect chain.

Pricing

$10.00 / 1,000 urls

Rating

5.0

(2)

Developer

๐Ÿ‘ Trinity

Trinity

Maintained by Community

Actor stats

2

Bookmarked

198

Total users

5

Monthly active users

18 days ago

Last modified

Share

TikTok (and generic) URL Expander

Expand shortened or redirecting URLs (especially TikTok short links like https://vm.tiktok.com/...) and obtain the final resolved URL together with the full redirect chain.

Each processed URL becomes one dataset item containing:

{
"originalUrl":"https://vm.tiktok.com/example/",
"finalUrl":"https://www.tiktok.com/@user/video/1234567890",
"redirectChain":["https://www.tiktok.com/?_r=1","https://www.tiktok.com/@user/video/1234567890"],
"totalRedirects":2,
"durationMillis":742
}

An OUTPUT record in the key-value store includes a summary with the dataset ID and count.

Included features

  • Apify SDK for Actor runtime helpers
  • Input schema supporting single URL (url) or multiple URLs (urlsText as newline-separated)
  • Dataset output for structured results
  • Manual redirect handling (HEAD first, GET fallback) to log every hop
  • Configurable maxRedirects, timeoutMillis, optional custom userAgent

How it works

  1. Reads url or urlsText from input.
  2. For each URL performs a HEAD request with redirects disabled.
  3. On 3xx + Location: resolve to absolute URL, append to chain, repeat.
  4. If HEAD not allowed / errors (405 / 501 etc.), retries with GET.
  5. Stops when non-redirect status or maxRedirects hit.
  6. Stores result object and logs progress.

Input schema

Either url OR urlsText must be provided.

FieldTypeRequiredDefaultDescription
urlstringconditional-Single URL to expand
urlsTextstringconditional-Multiple URLs to expand (one per line)
maxRedirectsintegerno10Safety cap on redirect depth
timeoutMillisintegerno15000Per-request timeout in ms
userAgentstringnodesktop UAOverride User-Agent

Example (single URL)

{"url":"https://vm.tiktok.com/example1/"}

Example (multiple URLs)

{
"urlsText":"https://vm.tiktok.com/example1/\nhttps://vm.tiktok.com/example2/",
"maxRedirects":10,
"timeoutMillis":15000
}

Output

Dataset (default) items: one per input URL.

Retrieve via API:

https://api.apify.com/v2/datasets/<DATASET_ID>/items?format=json

Key-value store: OUTPUT summary object.

Local development

Install dependencies:

$npminstall

Run in dev (TypeScript on-the-fly):

$npm run start:dev

Build & run production JS:

$npm run build &&npm run start:prod

Deploy to Apify

Login (if needed) then push:

apify login
apify push

Documentation reference

You might also like

URL Shortener Expander

automation-lab/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...

๐Ÿ‘ User avatar

Stas Persiianenko

15

Redirect Chain Analyzer

automation-lab/redirect-chain-analyzer

This actor follows HTTP redirects step-by-step and reports the full chain for any list of URLs. It also tests HTTP-to-HTTPS and www/non-www variants to verify canonical redirects are properly configured. Use it for SEO migration audits, redirect debugging, or monitoring redirect health.

๐Ÿ‘ User avatar

Stas Persiianenko

7

TikTok Scraper

rupom888/tiktok-scraper

Related articles

How to scrape TikTok data
Read more