How to scrape and collect data from TikTok?

TikTok Data Scraper API

TikTok Data Scraper API

Scraping and collecting data from TikTok is a great idea. With more than 800 million users in the world, the popularity of TikTok has exploded in just a few years and became the most downloaded app in the world.

It is among the youngest that the application appeals the most, they are the ones who return to it the most frequently, who spend the most time there and who interact the most.

The content and trends of the app are a gold mine for brands and their marketing strategy.
Collecting and analyzing this data is a great way to learn about the consumption habits and needs of young users.

To take advantage of TikTok, ScrapingBot developed a TikTok scraper to scrape and collect public data from TikTok profiles and TikTok hashtags. Retrieve the data you want in JSON, without any blocking!

You want to scrape TikTok profiles, hashtags, and more?

What data you can collect with our TikTok Scraper?

TikTok profiles

Profile name, influencer ID, biography, private profile, verified profile, bio link, profile picture URL, ID, nickname, avatar, number of followers, number of following, hearts, number of videos, top videos (ID, description, avatar, number of share, number of plays, thumbnail, username, video informations, music informations)

TikTok hashtags

Type, ID, title, description, profile picture, status, video count, view count, top videos data (ID, description, create time, digg count, share count, comment count, play count, URL, username, influencer ID, video related data, music informations)

How to start scraping TikTok ?

ScrapingBot is here to help you scrape TikTok profiles and hashtags as easily and efficiently as possible.

Start scraping TikTok in 3 steps:

1. Create an account

Want to start scraping TikTok right now? No problem, ScrapingBot offers FREE ACCESS with 100 credits per month to get started. No payment information required, and no any engagement.

If you already have an account, just log in.

2. Configure your scraping

Once your account has been created, go to Documentation, to the “Data Scraper API” section to be able to start scraping what you want.

Setting up the endpoint is a two-step process with two API calls. It’s a little longer than usual because social networks have many protections to avoid robots and get scraped. These two calls make it possible to recover the data without being blocked.

Step 1 : Get your Response ID

First, you must make a first POST request to get the ResponseID which will be used later. To do this, you must enter the following parameters in the body, then run a first API call:

  • scraper (“tiktokProfile” to scrape TikTok profiles, or “tiktokHashtag” to scrape TikTok hashtag results)
    • If you chose tiktokProfile as a scraper:
      • url Add the URL of the TikTok profile you want to scrape
    • If you chose tiktokHashtag as a scraper:
      • hashtag Enter the hashtag you want to retrieve search results data from

Here is the Request Endpoint:

Step 2 : Configure your second request

Now that you have your responseId, you will be able to configure a GET request to ask for the response.

Here is the Response Endpoint:

Complete the Response Endpoint with these parameters:

  • responseId
    Insert here the Response ID that you had with the POST API call
  • scraper
    You must fill in the same as that used previously for the POST API call (tiktokProfile” or tiktokHashtag)

When it’s ready, execute the API call. The result you will get will tell you if the scraping is ready to use or not.
If it’s not, you will get this pending message:

{status: "pending", message: "Scraping is not finished for this request, try again in a few"}

In this case, you have to try again until it’s ready.

3. Let's scraping!

Your web scraping setup is now ready to use! You can start collecting data from TikTok Profiles and Hashtags.

NB: If you need more help, a sample code to execute the call to this API is available in the documentation right here (“Data Scraper API” section).