webscraperapi.ai
API Reference

Scrape Endpoint

Scrape any web page and optionally process it with an LLM. Supports JavaScript rendering, CSS selectors, and multiple output formats (raw HTML, clean HTML, markdown, metadata, links, emails).

GET
/v2/scrape

Query Parameters

url*string

The URL to scrape.

Formaturi
Length1 <= length <= 2083
prompt?|

Optional prompt for LLM processing.

css_selector?|

Optional CSS selector to narrow content.

llm?|||||

LLM model for processing (e.g., 'gpt-4o-mini').

render_js?|

Whether to render JavaScript.

Defaultfalse
output?|

Output format: 'raw_html', 'clean_html', 'markdown', 'html_head_metadata_json', 'email_addresses', 'internal_links', 'external_links', 'all_links'.

timeout_ms?|

Request timeout in milliseconds.

Response Body

application/json

application/json

curl -X GET "https://api.webscraperapi.ai/v2/scrape?url=http%3A%2F%2Fexample.com"
null
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}