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

# Map Site

> Discover all links on a website

Map a website and return the links discovered on it. Useful for building a crawl plan or auditing site structure. Runs synchronously.

## Request Body

<ParamField body="url" type="string" required>
  The site URL to map.
</ParamField>

<ParamField body="filter" type="string">
  Only return links containing this substring.
</ParamField>

<ParamField body="limit" type="number" default="5000">
  Maximum number of links to return. Between `1` and `100000`.
</ParamField>

<ParamField body="include_subdomains" type="boolean" default="true">
  Include links on subdomains of the target site.
</ParamField>

<ParamField body="ignore_query_parameters" type="boolean" default="true">
  Treat URLs that differ only by query string as the same link.
</ParamField>

<ParamField body="timeout" type="number">
  Max time in milliseconds to wait. Between `1000` and `600000`.
</ParamField>

## Response

<ResponseField name="data" type="object">
  `links` (string\[]) — discovered URLs; `total_links` (number) — count.
</ResponseField>

<RequestExample>
  ```bash theme={null}
  curl -X POST https://scrape.st/web/map \
    -H "x-api-key: YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "url": "https://example.com",
      "limit": 100
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json theme={null}
  {
    "map_id": "map_01HZX...",
    "version": "1.0.0",
    "status": "completed",
    "url": "https://example.com",
    "data": {
      "links": ["https://example.com/", "https://example.com/about"],
      "total_links": 2
    }
  }
  ```
</ResponseExample>
