Extract and structure data according to the specified schema
Return valid JSON that matches the schema exactly
The --extract flag automatically selects grok-4-1-fast-non-reasoning regardless of other model flags. Structured output with tools requires a non-reasoning model.
Five built-in schemas cover common X intelligence use cases:
sentiment
narrative
timeline
profiles
claims
Sentiment AnalysisReturns overall sentiment, sentiment score, key claims, and notable accounts.Use for: Understanding the mood and dominant perspectives around a topic.
Narrative MappingReturns dominant narratives, emerging narratives, and counter-narratives.Use for: Understanding competing storylines and how different groups frame an issue.
Timeline ConstructionReturns chronological events with date, source, significance, and URL.Use for: Building timelines of announcements, events, or developments.
Account ProfilingReturns detailed profiles for each account: posting style, main topics, key positions, recent notable posts.Use for: Understanding who the key voices are on a topic and their perspectives.
Claim AttributionReturns individual claims with attribution, claim type, verifiability flag, context, and URL.Use for: Tracking specific claims, fact-checking, and understanding what different accounts are asserting.
/grok-x "xAI product announcements in the last 90 days" --extract timeline --from 2025-12-01
Output:
{ "events": [ { "date": "2025-12-11", "source_handle": "xai", "event": "Grok 3 released to Premium+ subscribers with significantly improved reasoning and a new 'Think' mode for extended chain-of-thought responses.", "significance": "major product launch", "url": "https://x.com/xai/status/186634291000000001" }, { "date": "2025-12-19", "source_handle": "elonmusk", "event": "Announced that Grok will be integrated directly into Tesla vehicles, enabling voice-driven AI assistance using real-time X data.", "significance": "major partnership / product expansion", "url": "https://x.com/elonmusk/status/186712940000000001" }, { "date": "2026-01-08", "source_handle": "xai", "event": "Aurora image generation model launched inside Grok on X. Available to all Premium subscribers.", "significance": "new capability launch", "url": "https://x.com/xai/status/187700120000000001" }, { "date": "2026-02-03", "source_handle": "xai", "event": "Grok API updated with Responses API (/v1/responses) support, enabling native x_search, web_search, and code_interpreter tool use.", "significance": "developer platform update", "url": "https://x.com/xai/status/188820340000000001" }, { "date": "2026-02-27", "source_handle": "xai", "event": "Grok-4 model family announced. Grok-4-0709 positioned as flagship reasoning model; fast variants released for latency-sensitive workloads.", "significance": "major model release", "url": "https://x.com/xai/status/189731500000000001" } ]}