Skip to main content
The Web Scraping endpoint scrapes any URL and returns clean page content in your preferred format. It handles JavaScript sites, blocks ads, rotates proxies, and can extract structured data using CSS or XPath selectors. Endpoint: POST https://api.geekflare.com/webscraping
Install the official SDK: npm install @geekflare/api-node or pip install geekflare-api
Now, you can connect Web Scraping with your AI Agents or LLMs to give context. Refer to our MCP Server guide.

Basic Scrape

Scrape a URL and get back LLM-ready content. Costs 1 credit.

JavaScript Rendering

By default, renderJS is automatic: Geekflare first fetches the page without a browser, and only falls back to full JavaScript rendering if the page actually needs it. You don’t need to choose between “lite” and “standard” scraping, the API detects it for you at no extra cost. Set renderJS: true to always force full JavaScript rendering (skip the auto-detect and go straight to a headless browser), or renderJS: false to always skip rendering, even if the page would otherwise need it.
Leave renderJS unset for the best default experience. Only set it explicitly when you already know a page requires (or doesn’t require) JavaScript and want to skip the auto-detection round trip.

Output Formats

Choose one or more output formats. You can request up to 3 formats in a single call.

File Output

Get a CDN URL instead of inline content. Useful for large pages or when you need to store the result.

Stealth Mode

Bypass bot detection on protected pages. Slower but more reliable on heavily guarded sites.

Wait Time

Add a delay after page load to capture lazy-loaded content or bypass bot checks.

Proxy Routing

Web Scraping supports three proxy modes via proxyMode: Combine proxyMode: true (or auto, when a proxy ends up being used) with proxyCountry to route through a specific country’s IP address — useful for bypassing geo-blocks or scraping region-specific content.
Proxy modes apply to the Web Scraping endpoint only. Other endpoints that support proxy routing (Screenshot, Lighthouse, etc.) still use proxyCountry alone — see Using Proxies.

Device Emulation

Emulate a mobile device to scrape mobile-specific content.

Structured Extraction — CSS Schema

Extract specific fields from a page using CSS selectors. Returns structured JSON.

Structured Extraction — XPath Schema

Use XPath expressions for more precise extraction.

Default Extraction — Static Fields

Inject static metadata fields alongside scraped content.

AI Extraction

Ask AI to answer questions, extract structured data, or analyze the scraped page — summaries, sentiment, keywords, contact info, and more. AI requests always run against Markdown content; any format you set is ignored when aiPrompt is present. Costs +6 credits on top of the base scraping cost (7 total).
AI Extraction supports 8 modes — open-ended questions, custom JSON Schema extraction, product data, category listings, summaries, contact info, sentiment analysis, and keyword/entity extraction. See the full AI Extraction guide for request/response examples of every mode.

All Parameters

Credits

Node.js SDK

npm install @geekflare/api-node

Python SDK

pip install geekflare-api