tiktok-scraper-ultimate

This is a TikTok scraper that helps you extract video data. You can give it a list of TikTok URLs (like videos, user profiles, or hashtags) or just a list of keywords to search for. One of the best features is that you get direct video URLs without the w

Documentation

n8n Node - Apify TikTok Scraper

This is an n8n community node that helps you extract TikTok video data directly within your workflows. You can provide it with a list of TikTok URLs (like videos, user profiles, or hashtags) or just a list of keywords to search for.

One of the best features is that you get direct video URLs without the watermark. You also don't need to pay for proxies, which saves you money.

Apify is a platform for building, deploying, and publishing web automation tools called Actors, while n8n is a fair-code licensed workflow automation platform that connects various services and APIs.


Table of Contents


Features

  • Flexible Scraping: Scrape data using a list of URLs (supports Video, User, Hashtag, Music, and Search links).
  • Keyword Search: Search for new videos using a list of keywords.
  • Advanced Filtering: Filter searches by date (like "This Week" or "This Month") or by a specific 2-letter country/region code.
  • Sorting Options: Sort search results by "Most Liked," "Most Recent," or "Relevance."
  • Proxy-Free: Runs without needing separate proxies.
  • Custom Formatting: (Advanced) Use your own JavaScript code to reformat the output data.
  • Public Data Only: Safely extracts only publicly available data.
  • n8n Native: Seamlessly integrate the scraped results into your n8n pipelines, databases, or AI agents.

Installation

Follow the installation steps in n8n:

  1. Go to Settings > Community Nodes.
  2. Select Install.
  3. Enter n8n-nodes-apify-tiktok-scraper (or the specific npm package name you published).
  4. Agree to the risks of installing community nodes and click Install.

To install n8n community nodes in Docker environments, you can also run:

npm install n8n-nodes-apify-tiktok-scraper

Credentials

To use this node, you need an Apify API Token:

  1. Sign in to your Apify account.
  2. Go to Settings > Integrations.
  3. Copy your personal API token.
  4. In n8n, add a new credential for Apify API, and paste your token.

Node Parameters

Here is a breakdown of the settings you can configure directly in the n8n node interface.

Parameter Type Description
startUrls Array (of strings) Paste the TikTok URLs you want to scrape. You can mix video links, user profiles (@user), hashtag pages, etc.
maxItems Number The maximum number of results you want to get back. (Default is 1000).
keywords Array (of strings) (Optional) A list of search terms. Use this to run new searches instead of scraping specific URLs.
dateRange String (Search only) A time filter for your keyword search (e.g., "WEEK," "MONTH"). Default is "ALL_TIME".
location String (Search only) A 2-letter country code (like "US" or "GB") to get results from that region. Default is "US".
sortType String (Search only) How to sort your search results. Options are "RELEVANCE" (Default), "MOST_LIKED," or "MOST_RECENT."
customMapFunction String (Advanced) Lets you write a bit of JavaScript code to change the output data for every single item.
includeSearchKeywords Boolean (Advanced) If you check this, the final results will include a field showing which keyword was used to find that item.

Input Examples

Here are a couple of ways to configure the node parameters depending on your use case:

1. Scraping a list of different URLs

{
  "startUrls": [
    "[https://www.tiktok.com/@billieeilish/video/7050551461734042926](https://www.tiktok.com/@billieeilish/video/7050551461734042926)",
    "[https://www.tiktok.com/@gordonramsayofficial](https://www.tiktok.com/@gordonramsayofficial)",
    "[https://www.tiktok.com/search?q=Recipes](https://www.tiktok.com/search?q=Recipes)",
    "[https://www.tiktok.com/tag/duet](https://www.tiktok.com/tag/duet)"
  ],
  "maxItems": 1000
}

2. Running a new keyword search

{
  "keywords": [
    "Artificial Intelligence",
    "podcast"
  ],
  "maxItems": 500,
  "dateRange": "WEEK",
  "location": "GB",
  "sortType": "MOST_LIKED"
}

Output Examples

The node outputs an array of JSON objects containing highly detailed metadata about each TikTok video, including author info, music details, and direct video URLs.

Click to expand full JSON output example
[
  {
    "added_sound_music_info": {
      "album": "",
      "artists": [],
      "audition_duration": 54,
      "author": "VTV Giai Tri Official",
      "author_deleted": false,
      "author_position": null,
      "avatar_medium": {
        "height": 720,
        "uri": "tos-alisg-avt-0068/e58bf19abf1c1badb25233ebb772283d",
        "url_list": [
          "[https://p16-sign-sg.tiktokcdn.com/aweme/720x720/tos-alisg-avt-0068/e58bf19abf1c1badb25233ebb772283d.webp?x-expires=1683439200&x-signature=Nq4qV8EaKGCuXuy1BNauD7klTH0%3D](https://p16-sign-sg.tiktokcdn.com/aweme/720x720/tos-alisg-avt-0068/e58bf19abf1c1badb25233ebb772283d.webp?x-expires=1683439200&x-signature=Nq4qV8EaKGCuXuy1BNauD7klTH0%3D)"
        ],
        "width": 720
      },
      "id": 7229168247013182210,
      "is_original_sound": true,
      "owner_handle": "vtvgiaitriofficial",
      "owner_nickname": "VTV Giai Tri Official",
      "play_url": {
        "url_list": [
          "[https://sf16-ies-music-sg.tiktokcdn.com/obj/tiktok-obj/7229168238650166018.mp3](https://sf16-ies-music-sg.tiktokcdn.com/obj/tiktok-obj/7229168238650166018.mp3)"
        ]
      },
      "title": "original sound - vtvgiaitriofficial",
      "video_duration": 54
    },
    "author": {
      "avatar_larger": {
        "url_list": [
          "[https://p16-sign-sg.tiktokcdn.com/aweme/1080x1080/tos-alisg-avt-0068/e58bf19abf1c1badb25233ebb772283d.webp?x-expires=1683439200&x-signature=y9%2Fv5Fnzgc6JHvd%2Fu7gW2Pvz6L4%3D](https://p16-sign-sg.tiktokcdn.com/aweme/1080x1080/tos-alisg-avt-0068/e58bf19abf1c1badb25233ebb772283d.webp?x-expires=1683439200&x-signature=y9%2Fv5Fnzgc6JHvd%2Fu7gW2Pvz6L4%3D)"
        ]
      },
      "nickname": "VTV Giai Tri Official",
      "region": "VN",
      "signature": "Mời các bạn tải ứng dụng VTV GiảiTrí để xem trọn bộ phim hay độc quyền",
      "uid": "6812490744957256705",
      "unique_id": "vtvgiaitriofficial",
      "youtube_channel_title": "VTV Giải Trí Official"
    },
    "aweme_id": "7229167805625847041",
    "create_time": 1683171893,
    "desc": "Cô chủ trọ cho thuê căn phòng hết nước chấm thật #Cuocdoivandepsao",
    "desc_language": "vi",
    "statistics": {
      "aweme_id": "7229167805625847041",
      "collect_count": 743,
      "comment_count": 183,
      "digg_count": 25006,
      "download_count": 0,
      "forward_count": 0,
      "play_count": 585709,
      "share_count": 492
    },
    "video": {
      "download_addr": {
        "url_list": [
          "[https://api16-normal-useast5.us.tiktokv.com/aweme/v1/play/?video_id=v10025g50000ch9ik0jc77ub16qqnnjg&line=0&watermark=1&logo_name=tiktok&source=CHALLENGE_AWEME&file_id=4cc18e0ff955435b9d5053115ce43db9](https://api16-normal-useast5.us.tiktokv.com/aweme/v1/play/?video_id=v10025g50000ch9ik0jc77ub16qqnnjg&line=0&watermark=1&logo_name=tiktok&source=CHALLENGE_AWEME&file_id=4cc18e0ff955435b9d5053115ce43db9)"
        ]
      },
      "duration": 54635,
      "has_watermark": true,
      "height": 1024,
      "play_addr": {
        "url_list": [
          "[https://api16-normal-useast5.us.tiktokv.com/aweme/v1/play/?video_id=v10025g50000ch9ik0jc77ub16qqnnjg&line=0&is_play_url=1&source=PackSourceEnum_CHALLENGE_AWEME&file_id=2eb4abf9ef5d4ad9b2baae36fe2dfe97](https://api16-normal-useast5.us.tiktokv.com/aweme/v1/play/?video_id=v10025g50000ch9ik0jc77ub16qqnnjg&line=0&is_play_url=1&source=PackSourceEnum_CHALLENGE_AWEME&file_id=2eb4abf9ef5d4ad9b2baae36fe2dfe97)"
        ]
      },
      "width": 576
    }
  }
]

Note: The actual output contains significantly more data fields for each item.


Limitations

  • This scraper only gets public data. It cannot access private accounts or data that isn't public.
  • It doesn't currently support pagination (clicking "Next Page" on a profile or search). It only scrapes the initial list of videos loaded.
  • You must use the scraper in a way that respects TikTok's terms of use.

Ethical Use and Data Practices

We designed this tool to be fair and responsible.

  • It does not require a login. This means it only accesses data that is already public for everyone to see, just like a normal visitor.
  • The tool only scrapes publicly available information and does not collect sensitive personal data or anything behind a login wall.
  • Because this runs on Apify (an EU-based company), it is designed to follow EU data rules (like GDPR).
  • The scraper also runs gently to make sure it doesn't overload TikTok's servers.

For more on this topic, Apify wrote a good article about the legality of web scraping: Is web scraping legal?

Support & Updates

This node wraps an actively developed Apify actor. We keep it updated to fix any bugs and make sure it keeps working as TikTok changes. It's built to be light on memory, so you can scrape a lot of data efficiently.

If you run into any trouble or have questions:

  • Apify Actor Issues: File an issue under the "Issues" tab on the Actor page or ask the community on the Apify Discord server.
  • n8n Node Issues: Check the n8n Community Forum.

Get Started

Start scraping Twitter data today! This Actor provides a powerful, flexible, and cost-effective solution for all your
Twitter data extraction needs.

🎹️ Fast TikTok API 📹️ TikTok Trend API 🔍️ TikTok Search API
🧛️ TikTok User API 🧛️ TikTok User Info API #️ TikTok Hashtag API
🛍️ TikTok Shop API 👤️ TikTok Followers API ⚡️ TikTok Scraper (pay-per-result)
💬 TikTok Comment API 🎶 TikTok Music API 🎶 TikTok Music Trend API
🎶 Tiktok Scraper Ultimate (pay-per-event) 💬 TikTok Comment API (Pay per event)

Discussion