How to scrape TikTok data

Remember when vertical videos were considered nonsense? Well, meet Instagram Reels, YouTube Shorts, and Facebook Stories - they all ended up emulating the success of one little app, TikTok. So how do you scrape it?

Content

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?

Scrape TikTok data with TikTok Scraper

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 ๐Ÿ“น๐Ÿ”ด

Video tutorial on how to scrape TikTok with our TikTok Scraper

โ“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.

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

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.

Sign up for a free account using your email, Gmail, or GitHub
Sign up for a free account using your email, Gmail, or GitHub

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.
Step 2. Find the hashtag on TikTok web app, then copypaste it
Step 2. Find the hashtag on TikTok web app, then copypaste it

๐Ÿ‘จโ€๐Ÿณ 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.
Find the username on TikTok web app, then copypaste it 
Find the username on TikTok web app, then copypaste it 

๐Ÿ“ผ 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.
Find the video on TikTok web app, then copypaste its URL
Find the video on TikTok web app, then copypaste its URL

๐Ÿ” 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.
Type in your search queries and choose the search section (top, by video or by profile)
Type in your search queries and choose the search section (top, by video or by profile)

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.

Step 3. The TikTok scraper is fetching the data 
Step 3. The TikTok scraper is fetching the data 

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.

download tiktok data

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.

collect tiktok data

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.

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

โ“ FAQ

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.

๐Ÿ’ธ Need more predictable pricing when scraping TikTok?

For the most predictable pricing, you might want to try TikTok Data Extractor which can scrape 1,000 results for $4.00.

๐Ÿ‘€ 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 many Actors available in Apify Store. As with the other Actors, you can use this scraper using an API or scheduler. So basically, you can consider it your own personal TikTok API. You can call it using an API 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.

โŒจ๏ธ 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 Ukraine
Read how scraping social media serves as potential evidence of war crimes in Ukraine - a mission of one NGO.

๐Ÿ› 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.

Infographics on how to use data from TikTok
Just a few ways how to use data scraped from TikTok


Natasha Lekh
Natasha Lekh
Crafting content that charms both readers and Googleโ€™s algorithms: readmes, blogs, and SEO secrets.

Get started now

Step up your web scraping and automation