> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hasdata.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Web Scraping API Parameters

This page lists all parameters for the **Web Scraping API**.
Send a POST request to `https://api.hasdata.com/scrape/web` with a JSON body using the fields below.

## Basic Configuration

<ParamField body="url" type="string" required>
  The URL of the page to scrape. Must be a valid absolute URI (e.g. `https://example.com`).
</ParamField>

## Proxy Settings

<ParamField body="proxyType" type="string">
  Type of proxy to use. Options: `datacenter`, `residential`. Required if you're targeting geo-restricted or bot-protected content.
</ParamField>

<ParamField body="proxyCountry" type="string">
  [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code for proxy location (e.g. `US`, `DE`, `IN`).
</ParamField>

## Data Extraction

<ParamField body="extractRules" type="object">
  CSS selectors for field-level extraction. Example: `{ "title": "h1", "link": "a @href" }`.
</ParamField>

<ParamField body="aiExtractRules" type="object">
  Structured AI rules for LLM-based extraction. Supports types: `string`, `number`, `boolean`, `list`, `item`.

  Example:

  ```json theme={null}
  {
      "company": { "description": "Company name", "type": "string" },
      "email": { "type": "string" },
      "founded": { "type": "number" },
      "isHiring": { "type": "boolean" }
  }
  ```

  To learn more, see [LLM Extraction](/apis/web-scraping-api/llm-extraction).
</ParamField>

<ParamField body="screenshot" type="boolean">
  Capture a screenshot of the page.
</ParamField>

<ParamField body="extractEmails" type="boolean">
  Extract all email addresses found in the page content.
</ParamField>

<ParamField body="extractLinks" type="boolean">
  Extract all hyperlinks (`<a href="...">`) from the page.
</ParamField>

## Timing

<ParamField body="wait" type="integer">
  Delay (in milliseconds) after page load before scraping. Max: 30000.
</ParamField>

<ParamField body="waitFor" type="string">
  CSS selector to wait for before scraping begins.

  Example: `.product-listing`
</ParamField>

## Resource Control

<ParamField body="blockResources" type="boolean">
  Block loading of images and stylesheets.
</ParamField>

<ParamField body="blockAds" type="boolean">
  Block common ad scripts and tracking pixels.
</ParamField>

<ParamField body="blockUrls" type="string[]">
  Block any network requests containing these substrings or domains.

  Example: `["googleanalytics", "doubleclick"]`
</ParamField>

## JavaScript Options

<ParamField body="jsRendering" type="boolean">
  Enable JavaScript rendering (required for SPAs or dynamic content).
</ParamField>

<ParamField body="jsScenario" type="array">
  List of JavaScript actions to run on the page (click, scroll, wait, evaluate, etc.).

  Example:

  ```json theme={null}
  [
      {
          "click": "#buttonId"
      },
      {
          "fill": [".text_input", "value"]
      }
  ]
  ```

  To learn more, see [Page Interactions](/apis/web-scraping-api/features/page-interactions).
</ParamField>

## Advanced Settings

<ParamField body="headers" type="object">
  Custom headers to include in the request. Example: `{ "User-Agent": "custom-agent" }`.

  To learn more, see [Custom Headers and Cookies](/apis/web-scraping-api/features/custom-headers-and-cookies).
</ParamField>

<ParamField body="outputFormat" type="string[]">
  Response format(s). Options: `html`, `text`, `markdown`, `json`. Multiple formats allowed.
</ParamField>
