How to scrape data from TikTok (2024)

Hey, we're Apify. You can build, deploy, share, and monitor your scrapers on the Apify platform. Check us out.

TikTok grew out of a space for teenagers to show off their dance moves and lip sync. Now a major infotainment platform for Gen Z, millennials, and beyond, it is no longer just a "Chinese app" but a place for new trends, authentic dialogue, and advanced search. TikTok's growing popularity is only making it more interesting to users from other social media platforms, celebrities, researchers, brands, tech giants, and even the FBI! 👮 So can we download that data?

In this short tutorial, we’ll show you how to scrape TikTok videos in 4 simple steps and 3 different ways, no coding required. No time for reading? We get it, head over to the YouTube tutorial 📹🔴

❓Why extract TikTok data?

Before we start, here’s a couple of things you should know about this app and its users:

🚀 TikTok moves fast. In 2022, TikTok became the most downloaded app in the world, with 3.5+ BLN total downloads. Mic drop.

🙋‍♀️ Its audience is young and active. Nearly half of TikTok users are under 30. And they really love the app, spending an average of 52 min/day on the platform. If you consider that most of the videos do not exceed a minute, that's a lot of videos. 83% of TikTok users have posted a video at least once.

🔎 Visual search is a competition to Google. In July 2022, SVP of search at Google admitted that “almost 40% of young people, when they are looking for a place for lunch, they don’t go to Google Maps or Search, they go to TikTok or Instagram.”

▶️ Faster video content is a competition to YouTube. It goes further: a study has shown kids aged 4-15 spend an average of 80 min/day on this app, making TikTok the biggest competitor to YouTube for kids.

🧙‍♀️ Setting trends and influencing other media. If you see an interesting Instagram Reel, YouTube Short, or Facebook Story - it's very likely just an old TikTok video.

👀 More and more brands are joining TikTok. Uncharted territory or "tabula rasa for marketing campaigns" no more. In 2022, numerous brands were cautiously registering on the platform, learning its ways, and succeeding.

🥾 Step-by-step guide to scraping TikTok

You'll need a tool that is easy enough to use but complicated enough to scrape a website with a structure like TikTok's. It’s a tall order.

Cue our TikTok Scraper, which scrapes data from hashtags, user profiles, and separate videos in a structured format. You can download that TikTok data onto your computer and plug it into your existing workflow, projects, spreadsheets, and applications. Here's how you can do that:

Step 1. Go to TikTok Scraper and click Try for free

Find the TikTok Scraper page (which will look like this) and click the Try for free button. You’ll be redirected from our website to the Apify Console.

How to scrape data from TikTok (2)

If you don’t have an Apify account yet, sign up using your email, Gmail, or GitHub account. No credit card strings attached; you'll have a free trial.

How to scrape data from TikTok (3)

Step 2. Indicate TikTok video, profile or hashtag to scrape

Now that you're in your workspace, it's time to decide: what data you want to extract? Choose your starting point:

  • section 1 – hashtags #️⃣
  • section 2 – profiles 👨‍🍳
  • section 3 – specific videos 📼
  • section 4 – search 🔍

#️⃣ How to scrape data from TikTok hashtags?

Type in or copy-paste one or more TikTok hashtags that interest you. You will be able to scrape all videos posted with this hashtag and their details.

#️⃣

Hashtags data will include (to each scraped video of this hashtag): caption, timestamp, country of creation, ad status, music details, video format details, video URL, number of comments, plays, shares, likes, as well as author's name, nickname, verified status, link in bio, total number of fans, hearts, videos, likes, popularity of hashtag, etc.

How to scrape data from TikTok (4)

👨‍🍳 How to scrape data from TikTok profiles?

Alternatively, you can also scrape not just hashtags, but TikTok videos uploaded by a specific user. Think of a user profile page you want to scrape; let’s say, Gordon Ramsay’s and Jamie Oliver's tiktoks. So just add their usernames into the fields. If in doubt, you can always check their handles with the app.

👨‍🍳

Profile data will include (to each scraped video of this profile): caption, timestamp, country of creation, ad status, music details, video format details, video URL, number of comments, plays, shares, saves, likes, as well as author's name, nickname, verified status, link in bio, total number of fans, hearts, videos, likes, etc.

How to scrape data from TikTok (5)

📼 How to scrape data from specific TikTok videos?

You can scrape data from specific TikTok videos by simply adding their URLs.

📼

Video data will include: caption, creation timestamp, number of likes, shares, plays, comments, video duration, URL, and author's username.

How to scrape data from TikTok (6)

🔍 How to scrape TikTok search results?

You can scrape TikTok search by simply typing in or pasting queries and choosing the search section (top, by video or by profile).

🔍

Search data will include: caption, creation timestamp, author metadata, music and video metadata, video URL, number of likes, shares, plays, comments, saves, included hashtags, mentions, isPinned and isSlideshow.

How to scrape data from TikTok (7)

Three final remarks before we start extracting data:

✅ in each section, you can add as many fields as you want or paste a prepared list into Bulk edit field

✅ you can fill several sections at once or keep it to one

✅ you can set how many results you want in Max results field. It counts results per field, so if you set it to 20 and add 3 hashtags (for instance), you'll get 60 results in total.

Step 3. Click Start ▶️

Once you are all set, click the Start button. Notice that the status will change to Running, so wait for the scraper's run to finish. It will be just a few minutes before you see the status switch to Succeeded.

How to scrape data from TikTok (8)

Step 4. View and collect your data

After the run has finished, you can preview scraped data in the Output table or in a new tab. You can preview the data by format before downloading any of it.

How to scrape data from TikTok (9)

You can also preview the data by category: by posts, authors, videos, overview table, or all results. This categorization will help you see clearly through very large datasets and complex search queries.

How to scrape data from TikTok (10)

To export the data, click on Export X results button or go to the Storage tab. Storage contains your scraped data in many formats, including HTML table, JSON, CSV, Excel, XML, and RSS feed. There you can download it in a format that suits your needs. You can also export all the data you're seeing or only a part of it: by category or even specific fields.

How to scrape data from TikTok (11)

How to scrape data from TikTok (12)

And that's kind of it. But wait, there's more!

❓ FAQ

👩‍⚖️ Is it legal to scrape TikTok?

Just like with any other Apify data extraction tools, web scraping publicly available data on any website, including TikTok, is legal. But it’s still important to take several regulations into account, such as the GDPR and CCPA, as these protect personal data. Here you can learn more about the legality of web scraping and scraping ethically.

👀 Can I use TikTok API instead?

Unfortunately, as is the case for most social media platforms, TikTok does not offer an official API to let you extract data at scale. This TikTok web scraper is one of manyActorsavailable inApify Store. As with the other Actors, you can use this scraper using anAPIorscheduler. So basically, you can consider it your own personal TikTok API. You can call it using anAPI Client in Python, JavaScript, and curl. You can also use available API Endpoints to get the scraped Instagram data to where you need it.

🤖 Can I use AI to scrape TikTok?

AI is currently unable to scrape websites directly, but it can help generate code for scraping TikTok if you prompt it with the target elements you want to scrape. Note that the code may not be functional, and website structure and design changes may impact the targeted elements and attributes.

💸 Is there a free TikTok Scraper?

If you simply want to give scraping a try and extract concrete TikTok data, try our super-fast free TikTok Scraper 🔗. Compared to the more powerful TikTok Scraper 🔗, it has a longer trial period. And although the free version delivers fewer results, it is very fast and has low consumption. This whole tutorial applies to both scrapers.

Free TikTok Scraper · ApifyFree TikTok scraper to extract data about videos, users, and channels based on hashtags. Scrape TikTok information such as URLs, likes, and more.ApifyClockworks

⌨️ Can I export TikTok comments?

Yes. Use TikTok Comments Scraper 🔗 to that end. It extracts full comment text, username, timestamp, number of replies, number of likes, etc. You can explore other dedicated TikTok crawlers we have in Store.

#️⃣ Want to scrape TikTok comments or hashtags?

If you want to scrape specific TikTok data, you can use one of the dedicated scrapers below, each built particularly for the relevant TikTok data scraping case, whether it's hashtags, comments, sounds, or all data at once:

🕹 Tiktok Video Scraper 🧑‍🍳 TikTok Profile Scraper 🎙 TikTok Comments Scraper 📢 TikTok Ads Scraper
🎼 Tiktok Sound Scraper 👁 TikTok Video Scraper #️⃣ TikTok Hashtag Scraper

🧪 How can I use TikTok data?

TikTok is a perfect place to collect data for social studies, research, and fun:

  • Use it as a base for online research, social listening experiments as well as a reliable and fast source of survey data
  • Spread awareness about social issues and caritative causes
  • Monitor, flag unverified content, and stop the spread of inaccurate information with high public value
  • Follow trends and predict emerging opportunities and influences
  • Scan the market for authentic product reviews
  • Detect coordinated efforts in spreading disinformation, such as in this tool used by journalists to analyze the events of the Russo-Ukrainian war.
Using web scraping to collect social media evidence of war crimes in UkraineRead how scraping social media serves as potential evidence of war crimes in Ukraine - a mission of one NGO.Apify BlogNatasha Lekh

🛍 How to use data extracted from TikTok for marketing?

TikTok is the most dynamic environment to learn about the young generation. In general, TikTok is very responsive to promotional efforts, with 61% of TikTok users admitting they are likely to watch ads. However, TikTok marketing campaigns have to be especially intricate, involving the right causes and authentic engagement. With scraped TikTok data you can:

  • do market research for planning and analyzing campaigns
  • promote your own channel
  • collaborate with an influencer

The best thing about TikTok is that it's a huge flexible social media platform with user-generated content, authentic engagement, and community-building at its core. All this points to piles of social data you can scrape, learn from and adjust your research and analysis strategies accordingly.

How to scrape data from TikTok (17)
How to scrape data from TikTok (2024)
Top Articles
Latest Posts
Article information

Author: Van Hayes

Last Updated:

Views: 6303

Rating: 4.6 / 5 (66 voted)

Reviews: 81% of readers found this page helpful

Author information

Name: Van Hayes

Birthday: 1994-06-07

Address: 2004 Kling Rapid, New Destiny, MT 64658-2367

Phone: +512425013758

Job: National Farming Director

Hobby: Reading, Polo, Genealogy, amateur radio, Scouting, Stand-up comedy, Cryptography

Introduction: My name is Van Hayes, I am a thankful, friendly, smiling, calm, powerful, fine, enthusiastic person who loves writing and wants to share my knowledge and understanding with you.