x-scraper — Claude Code skill: pull tweets through Apify
This skill runs the X Scraper API actor on Apify to collect tweets by query, profile, hashtag, cashtag, thread or list. Handy when you need the actual search feed plus engagement counts.
npx skills add apidojo-io/social-media-skills --skill x-scraper -a claude-codeWhat x-scraper does
The skill documents one Apify actor. You get curl snippets for quick and long jobs, ready -d payloads for common queries, and Python/JS samples built on apify-client. Queries use Twitter search syntax: from:NASA, since: and until:, conversation_id:, list:, -filter:retweets. Results come back as tweet objects carrying text, likeCount, retweetCount, createdAt and the author block.
Small jobs go through /run-sync-get-dataset-items and return JSON at once. Anything past 300 seconds needs the async route: start a run, poll its status, then read the dataset. The samples lean on jq for that.
The catch is billing. The actor refuses API calls on Apify's free plan, and the skill tells the agent to stop as soon as the output looks like demo mode or comes back nearly empty. There is no fallback path inside the skill, so line up a paid subscription and an APIFY_TOKEN before you ask for data.
What it helps with
- pull a profile's tweets for a date window
- collect posts by keyword or hashtag
- extract replies from a conversation thread
- fetch tweets from list members
- capture like and retweet counts for analysis
Example prompts for the agent
- Grab NASA's recent tweets and rank them by likes this month
- Fetch English posts tagged #MachineLearning, retweets excluded
- Pull every reply under conversation_id:1728108619189874825
How to install x-scraper
1Skills CLI (Vercel)
npx skills add apidojo-io/social-media-skills --skill x-scraper -a claude-code2Manually: put the files in place
~/.claude/skills/x-scraper/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/x-scraper/
1Skills CLI (Vercel)
npx skills add apidojo-io/social-media-skills --skill x-scraper -a codex2Manually: put the files in place
.agents/skills/x-scraper/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add apidojo-io/social-media-skills --skill x-scraper -a cursor2Manually: put the files in place
.cursor/skills/x-scraper/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install apidojo-io/social-media-skills x-scraper2Manually: put the files in place
.github/skills/x-scraper/SKILL.md1Skills CLI (Vercel)
npx skills add apidojo-io/social-media-skills --skill x-scraper -a gemini-cli2Platform CLI
gemini skills install https://github.com/apidojo-io/social-media-skills --path skills/x-scraperManually: put the files in place
.devin/skills/x-scraper/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add apidojo-io/social-media-skills --skill x-scraper -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about x-scraper
How do I install x-scraper in Claude Code?
Run npx skills add apidojo-io/social-media-skills --skill x-scraper -a claude-code. The skill lands at ~/.claude/skills/x-scraper/SKILL.md.
What does x-scraper do?
It sends search requests to the X Scraper API actor on Apify and returns a list of tweets with text, counters and author details. Queries follow Twitter's advanced search syntax.
Do I need a paid Apify plan?
Yes. API calls on the free plan are rejected, so the actor only returns real data with a paid subscription. Set the token in APIFY_TOKEN.