Grok Scraper
Pricing
from $0.005 / result-item
Grok Scraper
Bypasses Anti-Bot detection, Queries and Scrapes Grok guest chat responses via Playwright with stealth evasion and Apify proxy rotation.
Pricing
from $0.005 / result-item
Rating
0.0
(0)
Developer
hospitable_luck
Maintained by CommunityActor stats
1
Bookmarked
2
Total users
0
Monthly active users
2 days ago
Last modified
Categories
Share
Apify Actor that sends a prompt to Grok as a guest user and returns the parsed chat response to the run Dataset. No Grok account is required.
What it does
- Opens Grok in a stealth Playwright browser through an Apify proxy in your chosen country.
- Aligns browser locale, timezone, and language headers with that country.
- Waits for Grok’s session handshake, types your prompt, and submits it.
- Captures the
POST /rest/app-chat/conversations/newresponse. - Parses the NDJSON stream into structured JSON and saves one record to the Dataset.
On failure (rate limits, timeouts), the Actor retries with a new proxy session and browser profile (up to 10 attempts).
Input
| Field | Required | Default | Description |
|---|---|---|---|
prompt | yes | — | Question or instruction for Grok |
country | yes | US | Proxy country and browser locale (see list below) |
useResidentialProxy | no | true | Use residential proxies; set false for datacenter |
includeHtml | no | false | Add the full Grok page HTML to the output |
Supported countries: US, GB, DE, FR, CA, AU, IT, ES, NL, BR, IN, JP, MX, PL, SE
Example:
{"prompt": "What is the cheapest electric car?","country": "US","useResidentialProxy": true,"includeHtml": false}
Output
One Dataset record per run:
{"text": "Assistant reply with citation tags stripped…","searchQueries": ["cheapest electric car 2026"],"sources": [{"position": 1,"url": "https://example.com/article","label": "Article title","siteName": "example.com"}],"model": "grok-3"}
If includeHtml is true, an html field is added with the full page source.
Run on Apify
- Push the Actor:
apify push - Open the Actor in Apify Console
- Fill in the input form and start a run
- Open the Dataset tab for the result
Or from the CLI:
apify loginapify pushapify call -i '{"prompt":"What is the cheapest electric car?","country":"US"}'
Requirements: Apify proxy enabled on your account (residential recommended).
Run locally
npm installnpx playwright install chromiumcp .env.example .env # add your APIFY_TOKEN
Option A — environment variable:
$APIFY_INPUT='{"prompt":"What is the cheapest electric car?","country":"US"}' npm run start:dev
Option B — input file:
mkdir -p storage/key_value_stores/defaultcp .actor/INPUT.example.json storage/key_value_stores/default/INPUT.jsonnpm run start:dev
Results are saved to storage/datasets/default/*.json (not printed to the terminal).
$cat storage/datasets/default/*.json | jq .
Optional local settings (in .env):
HEADLESS=false— show the browser window while debuggingDEBUG=1— verbose scraper logs
Project scripts
| Command | Description |
|---|---|
npm run start:dev | Run the Actor locally (TypeScript) |
npm run build | Compile to dist/ |
npm start | Run compiled Actor (dist/main.js) |
npm run typecheck | TypeScript check |
Tags
Grok scraper, LLM ui chat scraper, stealth grok scraper, anti-bot detection, Gemini scraper, Chatgpt scraper, GEO, SEO, AEO