Skip to content

Node JS - CLI and web server tool for download tiktok media without watermark with scraping method. build with express JS, bootstrap5, jquery .etc

License

Notifications You must be signed in to change notification settings

motebaya/tiktok-js

Repository files navigation

Tiktok-JS

Tiktok downloader tool

nodejs tiktok express bootstrap express Scraper License: MIT total stars GitHub forks

NodeJS CLI and web server tool for downloading TikTok media such as images slideshow, music, and videos (without watermark) using scraping methods.

Features:

  • Available for CLI & web server.
  • Asynchronous & concurrency download.
  • API rate limiter with express-rate-limit
  • More than 10 server are available for downloading .
  • Support media music, avatar, cover music, thumbnail and etc.

Features list:

the list feaures media supported

Name Host Images Video Music Videos[slideshow]
Aweme api-h2.tiktokv.com
Musicaldown musicaldown.com
Savetik savetik.co
Snaptik snaptik.app
SnaptikPro snaptik.pro
Ssstik ssstik.io
Tikcdn tikcdn.app
Tikmate tikmate.online
Tiktokdownloadr tiktokdownloadr.com
Tikwm tikwm.com
Ttdownloader ttdownloader.com

Important

Some servers support rendering image slide show to video, but sometimes it may not work due to issues with the server itself (which are beyond my control). the same applies to other potential issues.

Install:

git clone https://github.com/motebaya/tiktokJs-downloader
cd tiktok-js
npm i

Usage (CLI):

 $ node cli
 usage: cli.js [-h] [-u] [-s] [-t] [-S] [-d] [-l] [-V]

	TIktok CLI downloader
 © Copyright: @github.com/motebaya - 2023

optional arguments:
  -h, --help      show this help message and exit
  -u , --url      tiktok video url
  -s , --server   choose server list: [aweme, musicaldown, savetik, snaptik, snaptikpro, ssstik, tikcdn, tikmate, tiktokdownloadr, tikwm, ttdownloader]
  -t , --type     choose existing media type: [image, video, music]

additional:
  -S , --search   search username/account using puppeteer by suplied query string. min:1, max:100
  -d , --dump     dump bulk user videos using puppeteer by suplied username. min: 35, max: 1000
  -l , --limit    limit arg number
  -V, --verbose   debug mode on
  • -u, --url: tiktok video url.
  • -s, --server: sever method.
  • -t, --type: media type to download.
  • -V, --verbose: enable debug mode.
  • -S, --search: dump tiktok username by search query (puppeteer)
  • -d, --dump: dump video id from tiktok user feeds (puppeteer)
  • -l, --limit: limit dump for user search and userfeed.

Note

downloaded media in CLI will be saved in current directory with name tiktok-downloader-output see in downloader.js and it might take a bit longer when using aweme server, cause the API has been updated

Setup Web Server:

  • Run on local server:
 ❯ npm run dev
> tiktok-js@3.1.0 dev
> nodemon src/index.js
[nodemon] 3.0.1
[nodemon] reading config ./package.json
[nodemon] to restart at any time, enter `rs`
[nodemon] or send SIGHUP to 1755830 to restart
[nodemon] ignoring: **/test/** **/trash/**
[nodemon] watching path(s): *.*
[nodemon] watching extensions: js
[nodemon] starting `node src/index.js`
[nodemon] forking
[nodemon] child pid: 1755843
[nodemon] watching 60 files
app listening on port 3000
# local address: http://localhost:3000
  • Deploying to vercel with Vercel CLI, for the first time you need to login first with your vercel account.
❯ vercel --prod
Vercel CLI 33.0.1
? Set up and deploy “./tiktok-js”? [Y/n] y
? Which scope do you want to deploy to? username
? Link to existing project? [y/N] n
? What’s your project’s name? tiktokjs-downloader
? In which directory is your code located? ./ (just enter)
🔗  Linked to username/tiktokjs-downloader (created .vercel and added it to .gitignore)
🔍  Inspect: https://vercel.com/username/tiktokjs-downloader/<unique> [7s]
✅  Production: https://tiktokjs-downloader-<unique>-username.vercel.app [7s]

Demo:

  • CLI:

    downloading all image slideshow with aweme server (verbose on)

    demo

    downloading video with aweme server (verbose on)

    demo2

    downloading music from image slideshow (verbose on)

    demo2

  • Web:

    https://tiktokjs-downloader.vercel.app/

Warning

The latest demo website was deployed on Apr 23, 2024 with rate limit 10x (same as server count) API hit every 24 Hours, and it's maybe not always updated or redeployed to follow the latest update!!. you can deploy /test it self by following Setup web server!.

License

This project is licensed under the MIT License.