Docs

Scrape

POST /v1/scrape fetches a URL as clean markdown or JSON. 1 credit per page, plus 2 when structured extraction is requested. View as Markdown

POST /v1/scrape fetches a page and returns its content as Markdown (full page by default). Costs 1 credit per page, plus 2 when structured extraction is requested. Matching /v2/scrape and /api/v1/scrape aliases exist.

Product page: /scrape. URL to Markdown guide: /url-to-markdown. HTML to Markdown glossary. Web scraping API overview: /web-scraping-api.

Example

curl -s -X POST https://webcrawl.app/v1/scrape \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com"}'

Request body

  • url (string (required)): Page to fetch
  • onlyMainContent (boolean): Default false (full page). Set true to keep only the main content and drop navigation, headers and footers
  • includeTags (string[]): Keep only elements matching these CSS selectors
  • excludeTags (string[]): Remove elements matching these CSS selectors
  • retainImages (all or none): Default all
  • timeout (integer): Milliseconds (default 15000)
  • prompt / schema / extract (object or string): Ask for structured data; adds 2 credits

Optional header X-Retain-Images: none strips images from the Markdown. Send X-No-Cache: true or Cache-Control: no-cache to bypass cached results.

Auth

Authorization: Bearer YOUR_API_KEY or X-API-Key: YOUR_API_KEY.

Related