Skip to main content
GET
Ask Grok
Ask the real Grok assistant and receive structured JSON with web and X grounding. Accepts GET query parameters or a POST JSON body with the same fields. Credits: 20
Set your client timeout to at least 90 seconds for grounded answers.

Authorization

string
required
Your ScrapeBadger API key.

Parameters

string
required
The prompt to send. Maximum 4,000 characters.
string
The complete ID from a previous response. Includes prior-turn context and pins the follow-up to the owning X account.
string
default:"auto"
Assistant mode: auto, fast, or expert.
auto lets Grok decide, force requests web and X research, and off disables those tools.

Response

string
The answer without thinking text, tool-card markup, or inline citation tags.
string
The answer with inline citations rendered as Markdown links.
string
Opaque identifier used for follow-ups and conversation history. Preserve the complete value.
string | null
Identifier of the assistant response.
string
The upstream model option used.
string
The requested assistant mode.
Citation[]
Inline citation cards with card_id, url, domain, citation_index, start_index, and end_index. X citations can also include post_id and username.
SearchResult[]
Web results with url, title, snippet, and domain.
XPost[]
X post references with id and url.
string[]
Distinct domains across web results and citations.
string[]
Suggested follow-up prompts.
ToolUsage[]
Tool calls with card_id, tool_name, and parsed tool_args.
boolean
Whether Grok invoked web search.
boolean
Whether Grok invoked X keyword or semantic search.
boolean
Whether the upstream stream lacked its normal completion marker.
integer
End-to-end time in milliseconds.

Example

Response