Date: 2026-04-17
Skill: ~/.claude/skills/x-search/
Tester: Lucienne (foreground)
Ticket: MC-697 — Add Grok + ScrapeCreators APIs for X access (Scott capability)
All three CLI subcommands (search, fetch, trending) return live data end-to-end. Grok /v1/responses with tools: [{"type": "x_search"}] on grok-4-fast-reasoning is the working path — and it returned real, current, cited X posts. ScrapeCreators endpoint and key verified functional by the research subagent separately; fallback path in fetch is wired but not exercised here because Grok did not fail.
Result: ✅ Ready for council review.
x-search --helpusage: x-search [-h] {search,fetch,trending} ...
OK — subcommand routing works.
x-search search "FlySafair" --limit 3 --verboseLive X search returned 3 ranked posts with author handle, x.com URL, ISO timestamp, full text, and engagement counts. [path=grok citations=3]. Sample (top result):
@MuloiwaThendo (2025-07-21) — "FlySafair was founded in 2013 and they now control 60% of all domestic flights? That's madness." — 6216 likes, 639 reposts.@EdS_888 (2026-04-15) — opinion on SAA vs private carriers.@BalisoMlamli (2023-07-15) — 3026 likes, on FlySafair punctuality.x-search fetch https://x.com/MuloiwaThendo/status/1947378449695596670 --verboseSingle-post fetch via Grok. Returned structured markdown with:
- Author handle: @MuloiwaThendo
- Display name: Thendo Muloiwa
- ISO timestamp: 2025-07-21T19:29:37Z
- Full text of the post
- Engagement: 6216 likes, 639 reposts, 229 replies
- Quoted/replied-to context: None
[path=grok] — ScrapeCreators fallback was wired but not triggered since Grok succeeded.
x-search trending --country ZA --verboseReturned 10 trending topics for South Africa with one-line rationale and 1–2 representative x.com URLs each. [path=grok citations=14]. Topics returned (current as of test): #WhiteGenocide, #KillTheBoer, #JuliusMalema, #EFF, #SouthAfricaRefugees, #BEE, #FarmAttacks, #MalemaCase, and others. These are real trending topics in ZA today (2026-04-17).
The research subagent confirmed — with separate HTTP calls — that:
- Grok /v1/chat/completions with search_parameters is deprecated. Use /v1/responses with tools: [{"type": "x_search"}] and a grok-4 model.
- ScrapeCreators tweet endpoint: GET https://api.scrapecreators.com/v1/twitter/tweet?url=<url> with x-api-key header. Works on both x.com/i/status/ID and x.com/@user/status/ID. Verified with live test.
fetch is simple: if response is shorter than 80 chars or contains "cannot", fall back to ScrapeCreators. May need tuning if Grok returns refusals in other phrasings.x_search tool surfaces. Documented as "if visible".--force-scrapecreators flag for testing.~/.claude/skills/x-search/SKILL.md — new~/.claude/skills/x-search/x-search — new (executable Python CLI)~/.claude/skills/x-search/references/grok-api.md — new~/.claude/skills/x-search/references/scrapecreators-api.md — new~/.claude/vault/secrets/api_keys.env — added GROK_API_KEY and XAI_API_KEY aliases/Users/elmar/PKA/.claude/agents/scott.md — to be updated (x-search in toolkit)in_review