Skip to contents

traktok (development version)

  • new tt_slideshow_hidden() collects metadata, images and music of slideshows (photo posts), for which TikTok does not include data in the page source. It opens each post in a headless browser (needs the chromote package) and captures the post data the site requests itself (#23).
  • tt_videos_hidden() (and tt_videos()) now recognise slideshows among the URLs and gained the argument slideshows: after all other posts are collected, it asks whether to collect the slideshows with tt_slideshow_hidden() ("ask", the default in interactive sessions), does so directly (TRUE) or leaves their rows empty with a warning (FALSE). Slideshow rows are marked with is_slides = TRUE either way.
  • tt_videos_hidden() (and tt_videos()) now also return the video_is_ad column, which tt_search_hidden() already had.
  • auth_check() (and all functions that use it internally) now warns when the authentication cookies (tt_chain_token, sessionid, sid_guard) have expired. Browser-based functions like tt_search_hidden() silently discard expired cookies and ran logged out, even though auth_check() reported success.
  • fixed tt_search_hidden() failing to set cookies in the browser session with recent versions of cookiemonster.
  • after a captcha is solved manually, the updated cookies are now stored, so that later requests are less likely to hit another captcha.
  • tt_search_api() no longer limits searches to 30 days: longer time spans are automatically split into consecutive 30 day windows (the maximum the API allows per request) and the results are combined. max_pages applies per window. The returned object (and last_query()) now also carries start_date and end_date attributes of the last queried window, so that interrupted searches can be picked back up. tt_user_videos_api() uses this internally now.
  • last_query() now always attaches the search_id and cursor attributes (previously they were dropped when the cached videos could be parsed).
  • the cursor attribute of tt_search_api() results now reflects the last page received (it was one page behind when max_pages > 1).
  • tt_search_api() (and tt_user_videos_api()) now request and parse all fields of the video object listed in the API documentation. New columns are favorites_count, video_duration, playlist_id, is_stem_verified, video_mention_list, and the list columns hashtag_info_list, sticker_info_list, effect_info_list, video_label and video_tag (the latter with a label column explaining AI-generated and branded content tags). Fields the parser does not know are kept instead of dropped.
  • fixed tt_search_api() failing to parse results that contain a video without music. music_id (and playlist_id) are now NA instead of "0" when a video has no music (or playlist), and ids that do not fit into an integer are no longer converted to scientific notation.
  • count columns of tt_search_api() results (view_count, like_count etc.) are now doubles instead of integers, as counts above ~2.1 billion previously failed to parse.

traktok 0.1.0

CRAN release: 2025-11-24

  • first CRAN release

traktok 0.0.8.9000

traktok 0.0.7.9000

  • overhauls tt_user_info_hidden (some breaking changes as names in the output have changed)

traktok 0.0.6.9000

  • adds access to additional Research API endpoints (tt_user_liked_videos_api, tt_user_pinned_videos_api, tt_user_follower_api, tt_user_following_api, tt_user_reposted_api, and tt_playlist_info_api)
  • tt_videos_hidden now supports Video IDs
  • adds tt_user_videos_api, a wrapper around tt_search_api to query user videos

traktok 0.0.5.9000

  • adds experimental tt_user_videos_hidden and tt_user_info_hidden that rely on chromote