How to Collect Data from TikTok (Tutorial)

How to Collect Data from TikTok (Tutorial)

How to scrape videos posted or liked by a user, snowball a large user list from seed accounts, and collect trending videos all with a simple API.

As The Information put it, TikTok has “taken off like a rocket ship in the U.S. and around the world, creating a new mobile video experience that has left YouTube and Facebook scrambling to keep up.”

Just looking at U.S. users over the age of 18, TikTok went from 22.2 million unique visitors in January, to 39.2 million in April, according to Comscore data provided to Adweek.

The platform is more than just a cool new app: as recent events have shown, its algorithms spread videos that can have real-world consequences. To name a few prominent examples,

In short, TikTok and its driving algorithms now have a sizeable real-world influence, especially considering that a typical user spends almost an hour per day watching videos on the platform. With this in mind, it is important to understand what TikTok shows to millions of eyeballs every day, and to do that, we will need some data.

Below, I have included code for how to collect TikTok data in a variety of ways. I tried to keep it general and helpful for most use cases, but you will probably need to tweak it depending on what you are doing. The remainder of this post covers how to do the following:

  1. 👤 Collect videos posted by a user
  2. ❤️ Collect videos liked by a user
  3. ⛄️ Snowball a list of users
  4. 📈 Collect trending videos

(A couple notes for the nerds: if you plan to make more than a few dozen requests, I suggest setting up a proxy. I have not yet tested it, but the API I demo here should integrate with your proxy quite easily. Second, if you want to track popularity over time, you will want to add timestamps to the statistics.)

tik-tok api python web-scraping data-science

What is Geek Coin

What is GeekCash, Geek Token

Best Visual Studio Code Themes of 2021

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Data Science With Python Training | Python Data Science Course | Intellipaat

🔵 Intellipaat Data Science with Python course: this Data Science With Python Training video, you...

Basic Data Types in Python | Python Web Development For Beginners

In the programming world, Data types play an important role. Each Variable is stored in different data types and responsible for various functions. Python had two different objects, and They are mutable and immutable objects.

How To Build A Data Science Career In 2021

In Conversation With Dr Suman Sanyal, NIIT University,he shares his insights on how universities can contribute to this highly promising sector and what aspirants can do to build a successful data science career.

Data Science with Python Certification Training in Chennai

Enroll in our Data Science with Python training in Chennai. Best Data Science with Python Training courses in Chennai for 100% Job Placements Support.

Python for Data Science | Data Science With Python | Python Data Science Tutorial

🔥Intellipaat Python for Data Science Course: this python for data science video you will learn e...