Grok Scraper avatar

Grok Scraper

Pricing

from $0.005 / result-item

Go to Apify Store
Grok Scraper

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

hospitable_luck

Maintained by Community

Actor stats

1

Bookmarked

2

Total users

0

Monthly active users

2 days ago

Last modified

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

  1. Opens Grok in a stealth Playwright browser through an Apify proxy in your chosen country.
  2. Aligns browser locale, timezone, and language headers with that country.
  3. Waits for Grok’s session handshake, types your prompt, and submits it.
  4. Captures the POST /rest/app-chat/conversations/new response.
  5. 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

FieldRequiredDefaultDescription
promptyesQuestion or instruction for Grok
countryyesUSProxy country and browser locale (see list below)
useResidentialProxynotrueUse residential proxies; set false for datacenter
includeHtmlnofalseAdd 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

  1. Push the Actor: apify push
  2. Open the Actor in Apify Console
  3. Fill in the input form and start a run
  4. Open the Dataset tab for the result

Or from the CLI:

apify login
apify push
apify call -i '{"prompt":"What is the cheapest electric car?","country":"US"}'

Requirements: Apify proxy enabled on your account (residential recommended).

Run locally

npm install
npx playwright install chromium
cp .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/default
cp .actor/INPUT.example.json storage/key_value_stores/default/INPUT.json
npm 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 debugging
  • DEBUG=1 — verbose scraper logs

Project scripts

CommandDescription
npm run start:devRun the Actor locally (TypeScript)
npm run buildCompile to dist/
npm startRun compiled Actor (dist/main.js)
npm run typecheckTypeScript check

Tags

Grok scraper, LLM ui chat scraper, stealth grok scraper, anti-bot detection, Gemini scraper, Chatgpt scraper, GEO, SEO, AEO