N8N

n8n scrape tiktok

Do you want to extract information about a TikTok account, its followers, likes, or posts without having to write any code? I’ll show you how to do it step by step with Apify and n8n in this guide. You’ll have a completely automated process at the end that collects, filters, and saves TikTok account data and postings in Google Sheets.

Whether you want to track competitors, research affiliate campaigns, or analyze high-performing TikTok content, this setup has you covered.

 

 

Before we start, if you are looking for help with a n8n project, we are taking on customers. Head over to our n8n Automation Engineer page.

Step 1 : Set Up Your Apify Account

Apify provides a TikTok Actor that handles the scraping for us.

  1. Go to Apify and create a free account.

  2. Navigate to Settings → API Integrations.(Click on Here to go directly)

  3. Copy your Apify API Key.

  4. You’ll use this key later inside n8n to connect Apify to your workflow.

Cost Note: Apify charges $4 per 1,000 results. However, if you have a paid Apify account, you get $40 in free credits monthly.

Step 2 : Choose the TikTok Actor

  • Go to Apify ConsoleActors.

  • Search for TikTok Scraper and open it.

  • Copy the Actor URL — you’ll need it when setting up your workflow.

This Actor lets you:

  • Scrape TikTok account information

  • Get a list of posts

  • Filter posts by date, likes, shares, or comments

Step 3: Build Your Workflow in n8n

We’ll now connect Apify to n8n so that the scraping operation runs Automatically.

a) Start with a Form Submission

We’ll begin with a form node in n8n.

In the Form Element:

  • Enter any user name in the “Field Name”
  • Example placeholder: @apifyoffice.

This way, you can enter any TikTok username, and the workflow will scrape its data dynamically.

Click on the form submission to see this popup.

b) Configure the Apify Actor Node

  • In n8n, add the Apify Actor node.

  • Paste your API Key from Step 1.

  • Insert your TikTok Actor URL.

Set Input Parameters

  • Use the JSON input format from the actor’s(Tiktok) example template.

  • Replace the hardcoded username with the form username variable.

  • Optional filters to save cost and get relevant results:

    • Oldest post date → Set to 365 days to scrape posts from the last year.

    • Max posts per profile → Limit the number of results.

    • Profile video sorting → Choose latest, popular, or oldest.

Click on the form submission to see this popup.

Process the Data

The Apify Actor returns TikTok data in JSON format. Now, we’ll split the data into two outputs:

  • Account Information

  • Post Data

a) Extract Account Information

For this, we add an “Edit fields Node” and also the “Remove Duplicates Node”.

For each TikTok profile, grab these fields:

  • Profile URL

  • Bio

  • Followers (fans)

  • Following

  • Total hearts

  • Total videos

Then, remove duplicates:

  • Since all posts from the same account return identical account info, use a Remove Duplicates node.

  • Set the comparison field to Profile URL.

Click on the Edit Fields Node.

Click on the Remove Duplicate Node.

b) Extract Post Information

For each post, grab these fields:

  • Post URL

  • Video description

  • Likes

  • Shares

  • Comments

  • Plays

  • Hashtags

Pro Tip: Hashtags are returned as an array by default. Convert them into a string using a simple JSON map and join function.

If you only want top-performing TikTok posts, add a Filter Node:

For example:

  • Likes > 1,000

  • Comments ≥ 10

  • Shares ≥ 5

Make sure to convert these fields into numbers before applying filters to avoid issues with string comparisons.

Click on the Filter to open up this popup

Step 5 : Save Data to Google Sheets

Finally, we’ll send the data into two Google Sheets tabs:

  • Account Information Tab

    • Columns: URL | Bio | Followers | Following | Hearts | Videos

  • Posts Tab

    • Columns: URL | Description | Likes | Shares | Comments | Plays | Hashtags

Steps:

  1. Add a Google Sheets node in n8n.

  2. Select Append Row as the operation.

  3. Map the fields from the Apify JSON response to the Google Sheets columns.

Full Flow

Step 7 : Automate the Workflow

You can set up a schedule in n8n to run this workflow automatically:

  • Daily → Monitor competitors

  • Weekly → Research trending videos

  • On-Demand → Trigger manually whenever needed

Summary

Using Apify + n8n, you can scrape TikTok data at scale — without writing a single line of code.

  •  Automate data collection

  •  Filter high-performing content

  •  Store data neatly in Google Sheets

  •  Use advanced analytics later

With this setup, you’ll be able to track accounts, analyze content, and make data-driven TikTok marketing decisions.

 

Thank you for reading this article. Make sure to check out our other n8n content on the website. If you need any help with n8n workflows we are taking on customers so reach out!

Leave a Reply

Your email address will not be published. Required fields are marked *