The Grok endpoint sends any prompt to xAI’s Grok and returns the response as structured JSON. Grok is the only major AI assistant with native X (Twitter) integration — theDocumentation Index
Fetch the complete documentation index at: https://docs.scrapellm.com/llms.txt
Use this file to discover all available pages before exploring further.
x_results field exposes real X posts that Grok surfaces alongside its web answer.
X (Twitter) posts includedEvery response includes
x_results — real posts from X that Grok pulled in to inform its answer. No other AI scraper surfaces this data.Overview
Use Grok to track brand sentiment on X, monitor real-time reactions to news, and understand what the X community is saying about any topic — all grounded in Grok’s AI-synthesised answer. The three reasoning modes let you trade off speed versus depth depending on your use case.Unique features
- X posts: Real posts from X (Twitter) that Grok cited — includes post text, author, view count, and timestamp
- Web sources: Standard web citations alongside the X posts
- Three reasoning modes:
AUTO,FAST, andEXPERTfor different speed/depth trade-offs - Related questions: Grok’s suggested follow-up questions
Request parameters
The prompt to send to Grok. Maximum 4,000 characters.
ISO 3166-1 alpha-2 country code. JP and TW are not supported.
Grok reasoning mode. See modes table below.
Skip the response cache and always fetch a fresh result.
Maximum seconds to wait for Grok to respond (10–600).
Modes
| Mode | Description |
|---|---|
MODEL_MODE_AUTO | Grok selects the model automatically (default) |
MODEL_MODE_FAST | Quick responses using Grok mini |
MODEL_MODE_EXPERT | Deeper reasoning using the full Grok model |
3 credits per request
Example request
Response schema
Includes common response fields plus:| Field | Type | Description |
|---|---|---|
result | string | Plain-text response from Grok |
result_markdown | string | Markdown-formatted response |
web_sources | array | Web citations — each has title, url, and preview |
web_sources[].title | string | Article title |
web_sources[].url | string | Source URL |
web_sources[].preview | string | Text excerpt from the source |
x_results | array | Real X posts Grok surfaced |
x_results[].post_id | string | X post ID |
x_results[].user_name | string | X handle (without @) |
x_results[].name | string | Display name of the X user |
x_results[].text | string | Full text of the post |
x_results[].view_count | integer | Number of views |
x_results[].create_time | string | ISO 8601 timestamp of the post |
related_questions | array | Grok’s suggested follow-up questions |
mode | string | The reasoning mode used |
llm_model | string | Grok model used (e.g. grok-3) |
credits_used | integer | Credits consumed — always 3 for Grok |
elapsed_ms | float | End-to-end request duration in milliseconds |
cached | boolean | true if served from cache |