docs(tiktok): document Creator Search Insights (CSI) scraping#390
Open
eyalgaon wants to merge 2 commits into
Open
docs(tiktok): document Creator Search Insights (CSI) scraping#390eyalgaon wants to merge 2 commits into
eyalgaon wants to merge 2 commits into
Conversation
CSI (tiktok.com/csi) exposes trending search queries by category and is auth-walled (redirects to /login for anonymous users). Captures the private API endpoint (/api/search/inspired_query/recommended_queries), request body shape, category filter values including Food, response fields worth keeping (popularity_v2, trending_seq_v2, query_labels, textnet), pagination, and the js()-non-async-IIFE gotcha that breaks top-level await inside the captured fetch loop. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
✅ Skill review passedReviewed 1 file(s) — no findings. |
CSI is geo-personalized to the logged-in account region, not the IP and not via any UI control. Swapping tt-target-idc (and dropping the bound tt-target-idc-sign) reroutes the API call to a different IDC and returns region-appropriate data — confirmed alisg→useast1a moves an Israeli account from "brunch tel aviv" results to "hot cheetos" results. Also notes the language_filters sweet spot — ["en"] balances coverage and quality, ["en-US"] sometimes returns 0 items, empty/missing surfaces ~40% non-target-region noise. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a new domain skill at
domain-skills/tiktok/csi-scraping.mdfor TikTok Creator Search Insights (tiktok.com/csi), an auth-walled dashboard exposing trending search queries by category. Captures everything the next agent needs to skip the discovery work I had to do:/csiredirects to/loginfor anonymous users)/api/search/inspired_query/recommended_queries, request body shape, and category filter values (Food, Fashion, Gaming, Tourism, Science, Sports)query_text,popularity_v2,trending_seq_v2time series,query_labelsincl.content_gap,textnethierarchy)has_more+cursor, 50/page accepted)js()wraps in a non-async IIFE, so top-levelawaitinside the captured fetch loop won't compile — use.then()chains or paginate from the Python side, one page perjs()callNo coordinates, no cookies, no user-specific state — only the durable shape of the site, per the SKILL.md guidance on what a domain skill should capture.
Test plan
content_gapjs()-non-async IIFE behavior matches the documented workaround🤖 Generated with Claude Code
Summary by cubic
Adds a new domain skill documenting how to scrape TikTok Creator Search Insights (
tiktok.com/csi) behind login. Covers private API capture, pagination, and regional targeting viatt-target-idcto get country-appropriate trends.domain-skills/tiktok/csi-scraping.mdwith login-wall detection and session reuse./api/search/inspired_query/recommended_queriesvia awindow.fetchinterceptor; documents body (category/language/tab),limit50,offset/cursor, andsession_refresh_index.query_text,popularity_v2,trending_seq_v2,query_labels,textnet,video_num.tt-target-idc/store-idcand droptt-target-idc-signto reroute; recommendlanguage_filters: ["en"]for best coverage.js()wraps a non-async IIFE (use.then()), and Filters dropdown toggle behavior.Written for commit 5b8c980. Summary will update on new commits. Review in cubic