Stay tuned! Big things to come.

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 (docs), 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 will never return all of the videos, but just a subset.

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

EnsembleData offers this API in two versions:

  • Search Hashtag (docs) : API Pagination and the cursor have to be managed by the client accessing the API.
  • Full Search Hashtag (docs) : API Pagination and the cursor are automatically managed by us internally.

Tiktok Search Hashtag API - Summary

  • Tiktok has its internal algorithm to decide the posts returned as results and displayed 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 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 this API in two versions:

  • Search Keyword (docs) : API Pagination and the cursor have to be managed by the client accessing the API.
  • Full Search Keyword (docs) : API Pagination and the cursor are automatically managed by us internally.

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

Both Search Keyword APIs have the possibility to send requests from a specific country (country codes are ISO A-2) because 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 keyword in the caption.

Tiktok Search Keyword API - Summary

  • Tiktok has its internal algorithm to decide the posts returned as results and displayed 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 or other similarities)
  • 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.