Scrape

Extract content from any URL. Returns clean markdown or structured text.

POST /v1/scrape

Extract readable content from any URL. The scraper handles JavaScript-rendered pages (via headless browser), strips ads, navigation menus, footers, and other non-content elements, and returns clean, structured content.

The scraper uses a stealth engine with curl-cffi impersonation profiles to avoid detection by anti-bot systems. It handles:

  • Static HTML pages
  • JavaScript-rendered SPAs (React, Vue, Angular, etc.)
  • Pages with cookie consent banners and popups
  • Content behind lazy loading
  • Complex navigation structures

The output is a clean, readable version of the page content in your chosen format.

Request Body

NameTypeDescription
urlrequired
stringThe URL to scrape. 1-2048 characters. Must be a valid HTTP or HTTPS URL. Redirects are followed automatically.
fmt
stringOutput format. Default: `markdown`. Options: `markdown` (structured markdown with headings, lists, links), `text` (plain text with formatting stripped).

Credit Cost

Every scrape request costs 2 credits, regardless of the URL, page size, or output format. There is no caching for scrape requests — each request fetches fresh content from the target URL.

If the scrape fails (timeout, DNS error, invalid URL), credits are automatically refunded.

Markdown vs Text Output

Markdown (fmt: "markdown") — preserves the document structure with headings (#, ##, ###), bold/italic text, lists, links, and code blocks. Best for feeding into AI models or rendering in documentation tools.

Text (fmt: "text") — strips all formatting and returns plain text. Best for text analysis, word counting, or when you need raw content without any markup.

markdown
text

Response

Successful scrape response:

json

SDK Examples

Scrape a URL using each SDK:

python
javascript
go

Error Codes

This endpoint can return the following errors:

Errors

NameTypeDescription
INVALID_URL
400The `url` field is missing, not a valid URL, or exceeds 2048 characters. Only HTTP and HTTPS URLs are supported.
INSUFFICIENT_CREDITS
402Not enough credits. Scrape costs 2 credits per request.
ENGINE_ERROR
502The scrape failed due to a timeout (30 second limit), DNS resolution error, connection refused, SSL error, or the page returned a non-2xx status code. Credits are automatically refunded.

Need help?

Check our error codes or reach out to the team.