TikTok Social Listening API - The difference between scraping keywords and hashtags

6 May 2024
Francesco Cognolato
Founder

In the ever-evolving landscape of social media, staying attuned to audience sentiments, trends, and behaviors is paramount for businesses and marketers. TikTok, the rapidly growing video-sharing platform, has become a hub of creativity, entertainment, and marketing opportunities.

EnsembleData, a social media data scraping provider, offers several TikTok social listening APIs, therefore it’s crucial to understand its capabilities to leverage its full potential. Dive into our TikTok Social Listening Scraping API, a game-changer in the landscape of market research and audience analysis.

A user on TikTok has only two ways for searching for a video from text:

  • Search Hashtag : Search for videos containing a hashtag in the video caption

  • Search Keyword : Search for videos related to a given keyword

For TikTok Social Listening, we advise to use a combination of these two APIs with different parameters for scraping as many mentions as possible from TikTok. Both the APIs scrape data in real-time.


TikTok Search Hashtag API

This API fetches posts from https://www.tiktok.com/tag/magic (or the corresponding hashtag search section on the TikTok mobile app).

Here, TikTok shows a maximum of 5000-6000 videos containing the hashtag on their caption. Please note that, although TikTok might have millions of videos for a hashtag, TikTok never responds with all of the videos, but only a subset, because they do NOT want to show all their videos on the search functionality.

tiktok hashtag search page
Screenshot of the TikTok hashtag search UI.

EnsembleData offers two version of this API:


TikTok Hashtag Search API - Summary

  • TikTok has its internal algorithm to decide which posts to return as results and display in the search hashtag section
  • It fetches videos from https://www.tiktok.com/tag/magic (or its mobile version section)
  • It fetches videos containing the given hashtag in the caption
  • A maximum of 5-6K posts can be fetched
  • It does NOT have a time filter parameter
  • The posts shown can be from any time period (from a few days to years)

TikTok Search Keyword API

Only in the TikTok mobile app, there’s a TikTok search keyword section which allows a user to find videos related to a keyword and run some filters such as time and sorting.

tiktok keyword search
Screenshot of the TikTok keyword search UI with the filters.

EnsembleData offers two version of this API:


We advise to use the Full Keyword Search because we internally run multiple requests for fetching as many posts as possible.

Both Keyword Search APIs provide the option to send requests from a specific country (country codes are ISO A-2), which can be useful as the videos shown on the TikTok mobile app for the same keyword might change according to the country where the request is sent from.

Moreover, both APIs have a parameter called “match_exactly” which filters out videos not containing the exact keyword in the caption.

TikTok Keyword Search API Summary

  • TikTok has its internal algorithm to decide which posts to return as results and display in the search keyword section
  • It scrapes videos from the keyword search section on the TikTok mobile app
  • It fetches videos related to a keyword (TikTok matches the keyword with the video caption, author name etc.)
  • It does have a time filter parameter (posts from 1 day, 7 days, 30 days, 90 days, 180 days, overall)
  • Depending on the time filter parameter, a number between 20 and 500 posts per keyword can be scraped from TikTok
  • The API is country dependent

Conclusion

EnsembleData’s TikTok Social Listening Scraping API offers a powerful suite of tools for extracting valuable insights from TikTok’s vast content ecosystem. Whether tracking trending topics, analyzing audience sentiments, or monitoring competitor performance, these APIs provide businesses and content creators with the data-driven intelligence needed to make informed decisions and drive success in the digital age. With advanced filtering options, real-time results, and support for featured categories, EnsembleData empowers users to unlock the full potential of social listening on TikTok and stay ahead in an ever-evolving online landscape.