Skip to main content

Overview

The ScrapeBadger Grok API sends prompts to the real Grok assistant and returns structured JSON. Responses include the answer, cited web sources, X post references, tool usage, follow-up suggestions, and a conversation ID for follow-ups. You authenticate only with a ScrapeBadger API key. No xAI developer key is required.
All endpoints live under https://scrapebadger.com/v1/grok/* and authenticate with the X-API-Key header. /ask and /brand-visibility accept GET and POST. Credits are reported in X-Credits-Used.
Simple answers often take seconds. Grounded answers can take a minute or longer. Set your HTTP client timeout to at least 90 seconds. At volume, run asks asynchronously.

Features

  • Real Grok answers with plain text and Markdown variants.
  • Web and X grounding — search_results contains web sources; x_search_results contains X post IDs and URLs.
  • Anchored citations with insertion offsets in answer.
  • Actual tool activity — web_search_triggered and x_search_triggered report what Grok did rather than assuming a search occurred.
  • Multi-turn conversations — pass the returned conversation_id to retain prior-turn context.
  • Brand visibility — deterministic mentions, share of voice, position, competitor metrics, and citation rank.
  • Three assistant modes — auto, fast, and expert.

Credits

Non-2xx responses are not billed.

Quickstart

Continue a conversation

Pass the entire conversation_id from the first response. Treat it as an opaque identifier and do not split or rewrite it.
Node.js
Fetch the normalized history with GET /v1/grok/conversations/{conversation_id}. Messages include id, role, content, created_utc, and created_at.

FAQ

No. It returns the real consumer Grok answer, including the product’s web and X grounding. You need only a ScrapeBadger API key.
web_search=auto lets Grok decide, force requests web and X research, and off disables those tools. Check the response’s trigger fields for what actually happened.
Yes. Pass the complete conversation_id from the previous answer. The service pins follow-ups to the X account that owns the conversation.
No. Grok is non-deterministic and live sources change. For monitoring, sample repeatedly and aggregate the results.