x-tweet-search-by-query
它能做什么
这项技能运行 X 的高级搜索,并返回符合你查询条件的推文。适合在特定时间段内研究某个话题的研究人员、营销人员和记者。
适用场景
- ✓当你想在某个日期范围内查找关于某个话题的推文时。
- ✓当你需要查找使用某个话题标签或一组关键词的推文时。
- ✓当你想收集大量推文用于分析的时候。
技能链接
https://github.com/browser-act/skills/blob/main/solutions/social-listening/x-tweet-search-by-query/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请帮我查找今年一月到三月之间发布的关于太阳能板的推文,并显示其正文和点赞数。”
每周 5 个新技能,1 分钟读完。
工作原理
这项技能在 X 中输入你的高级搜索查询,并读取匹配的推文。它返回每条推文的正文、作者资料、互动数、媒体、话题标签、提及,以及用于翻页的游标。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
X — Tweet Search by Query
Advanced search query → normalized list of tweets matching the query (with author, engagement, media, cursor).
Language
All process output to user (progress updates, process notifications) follows the user's language.
Objective
Collect tweets that match an X advanced-search query expression, returning structured per-tweet data and pagination cursors for unbounded bulk collection.
Prerequisites
- Active X session in the browser (left sidebar shows logged-in avatar / @handle).
- Network capture is enabled in the browser-act session.
Pre-execution Checks
1. Tool Readiness
If browser-act has been confirmed available in the current session → skip this step.
Invoke browser-act via Skill tool to load usage. If installation or configuration issues arise, follow its guidance to resolve then retry.
2. Login Verification
If login status for X has been confirmed in the current session → skip this step.
Otherwise: open https://x.com and observe the left sidebar:
- User avatar or @handle visible at the bottom → logged in, continue
- "Sign in" / "Log in" prompt visible → not logged in, inform the user that an X login is required and assist the login flow
User refuses or cannot log in → terminate execution.
Capability Components
This Skill's operational boundary = what the user can manually do in their browser. It only reads tweet data rendered by the user's own X session, never bypassing authentication. Each search request is signed by X's own page JS; the Skill triggers it via URL navigation and reads structured GraphQL responses from network traffic. Python scripts under
scripts/only build URLs and parse responses — they do not call X directly. Run them through the bash tool.
Network Capture: search tweets via advanced query
All search parameters are encoded into X's native advanced search syntax via the URL builder, then injected through the page URL. The browser's own JS signs the GraphQL request; the response is read from network traffic and parsed locally.
Step 1 — build the search URL with all desired filters:
URL=$(python scripts/build-search-url.py '{raw_query}' --sort {sort} [--language {iso}] [--min-retweets {n}] [--min-faves {n}] [--min-replies {n}] [--since YYYY-MM-DD] [--until YYYY-MM-DD] [--author {handle}] [--in-reply-to {handle}] [--mentioning {handle}] [--only-verified] [--only-blue-verified] [--only-image] [--only-video] [--only-quote] [--exclude-retweets] [--exclude-replies] [--geocode LAT,LON,RADIUSmi] [--near 'PLACE'] [--within 15mi])
Parameters:
raw_query(positional): free-form X advanced search expression; all standard operators are supported and may already include any clause below. Operators added via flags are skipped if the same operator is already present inraw_query.--sort:Latest(default) orTop. Maps to URLf=liveandf=top, which select GraphQLproduct=Latestvsproduct=Top.--language: ISO 639-1 code, appended aslang:CODE.--min-retweets/--min-faves/--min-replies: integer thresholds, appended asmin_retweets:N/min_faves:N/min_replies:N.--since/--until:YYYY-MM-DD, appended assince:/until:.--author: only tweets from this handle, appended asfrom:HANDLE.--in-reply-to: only tweets replying to this handle, appended asto:HANDLE.--mentioning: only tweets mentioning this handle, appended as@HANDLE.--only-verified/--only-blue-verified: appended asfilter:verified/filter:blue_verified.--only-image/--only-video/--only-quote: appended asfilter:images/filter:native_video/filter:quote.--exclude-retweets/--exclude-replies: appended as-filter:retweets/-filter:replies.--geocode:LAT,LON,RADIUSmiorLAT,LON,RADIUSkm, appended asgeocode:LAT,LON,RADIUS.--near/--within: appended asnear:"PLACE"andwithin:VALUE.
Step 2 — navigate and capture the first page:
network requests --clearnavigate "$URL"wait stable --timeout 25000(a timeout is normal on X; proceed even if it fires — the GraphQL response usually completes before the page reaches network-idle)network requests --type xhr,fetch --filter SearchTimeline→ take the latest entry'srequest_idnetwork request <request_id>→ save full output to a file (e.g.tmp/x-search-page-1.txt)python scripts/parse-tweets.py --json-file tmp/x-search-page-1.txt --source search→ emit
常见问题
我可以按日期搜索吗?
可以。描述中说明,高级查询可以使用起始日期和截止日期筛选。
我需要登录吗?
需要。这项技能需要你的浏览器中有一个有效的 X 会话。
我可以收集很多结果吗?
可以。游标可以让你翻页获取更多结果,适合收集较大的数据集。
详情
作者的原始描述
Searches X (Twitter) for tweets by free-form advanced query and returns a normalized tweet list with text, author profile, engagement counts, media, hashtags, mentions, and cursor for pagination. Use when user mentions X search, Twitter search, scrape tweets by keyword, search X by hashtag, search Twitter by hashtag, find tweets about a topic, search tweets by date range, since until search Twitter, advanced Twitter search, tweets with media, tweets with images, tweets with video, top tweets, latest tweets, X latest tab, X top tab, min_faves, min_retweets, min_replies, filter verified Twitter,
repo: browser-act/skills
热度
- GitHub 星标
- 6.3k
- 排名
- #14321
- 许可证
- MIT
- 更新时间
- 2026/8/24
评论
- …
同一仓库的更多技能
browser-act-skill-forge
6.3k帮你的智能体探索一次网站,并保存一个带脚本的可复用技能,使之后从该网站提取数据更快。
browser-act
6.3k帮你的智能体运行浏览器自动化工具,打开页面、读取渲染后的内容、填写表单、截图,并管理已登录的会话。
1688-product-detail
6.3k帮你的智能体从 1688.com 批发页面提取商品详情,例如价格阶梯、规格变体、卖家统计数据和属性。
airbnb-listing-detail
6.3k帮你的智能体根据 ID 获取 Airbnb 房源的公开详情,例如照片、设施、评分和房屋规则。