x-tweet-search-by-query

Search X tweets by advanced query and parse GraphQL responses into structured tweet data.

5.5k|269|Updated Feb 6, 2026
One-click install
npx skills add https://github.com/browser-act/skills --skill x-tweet-search-by-query
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: x-tweet-search-by-query
Source: https://github.com/browser-act/skills/tree/main/solutions/social-listening/x-tweet-search-by-query
Command: npx skills add https://github.com/browser-act/skills --skill x-tweet-search-by-query

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Collecting tweets matching specific keywords, hashtags, dates, or engagement thresholds from X (Twitter) normally requires paid API access or manual scrolling; this Skill automates advanced search through a logged-in browser session and returns normalized, structured tweet data with pagination support.

Core Features & Use Cases

  • Advanced Query Building: A Python script converts filters like date ranges, minimum likes, language, geocode, verified-only, and media type into X's native advanced search URL syntax.
  • Structured Tweet Extraction: Captured SearchTimeline GraphQL responses are parsed into JSON containing tweet text, author profile, engagement counts, hashtags, mentions, media, and pagination cursors.
  • Bulk Pagination: Scroll-driven pagination with cursor tracking, de-duplication by tweet ID, and termination conditions enables large-scale tweet collection.
  • Use Case: A marketing team monitors brand mentions by running a query like 'MyBrand min_faves:10 since:2026-01-01' and exports hundreds of matching tweets with engagement metrics for sentiment analysis.

Quick Start

Search X for tweets containing 'AI agents' posted since 2026-01-01 with at least 100 likes and return the results as structured JSON.

Frequently Asked Questions about x-tweet-search-by-query

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I search tweets by keyword on X without the official API?

This Skill builds an X advanced search URL from your query, navigates a logged-in browser session to it, and reads the SearchTimeline GraphQL response from network traffic. The parse-tweets.py script then converts the response into normalized JSON with text, author, and engagement counts.

How to filter Twitter search results by date, likes, or language?

Pass flags to build-search-url.py such as --since, --until, --min-faves, --min-retweets, and --language. These are appended as native X operators like since:2026-01-01, min_faves:100, and lang:en before the search URL is generated.

Does X tweet search require a logged-in account?

Yes, an active X session in the browser is required because search requests are signed by X's own page JavaScript. The Skill only reads data rendered by the user's own authenticated session and never bypasses authentication.

Why does the X search pagination stop returning new tweets?

Pagination stops when a page returns zero tweets, the bottom cursor stops advancing, or X rate-limits the session. X allows roughly 150 SearchTimeline calls per 15-minute window, so the Skill retries once after a 3-second wait before terminating.

What are the limitations of scraping X search results?

Only public tweets are indexed, so protected accounts are excluded. View counts may be null for new or low-traffic tweets, GraphQL query hashes rotate over time, and account-level settings like NSFW filters affect results.