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

# Context.dev: Contextdev Get Web Scrape Sitemap

> List every page URL on a website from its sitemap, optionally filtered by a pattern. Includes inputs, outputs, SDK V2 examples, and Deepline cost.

List every page URL on a website from its sitemap, optionally filtered by a pattern.

> [!NOTE]
>
> Tool ID: `contextdev_get_web_scrape_sitemap`

## Run this action

Use the TypeScript SDK for one call. Use `ctx.tools.execute(...)` inside a Play for durable calls, scheduled calls, or CSV processing.

```ts theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'contextdev_get_web_scrape_sitemap',
  {
    "domain": "example.com"
  },
);

console.log(result.toolResponse.raw);
```

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline run contextdev_get_web_scrape_sitemap --input '{
  "domain": "example.com"
}'
```

## Example response

The SDK returns this shape at `result.toolResponse.raw`. The example values illustrate the response.

```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
{
  "data": {
    "success": true,
    "domain": "example.com",
    "urls": [
      "https://example.com"
    ],
    "meta": {
      "sitemapsDiscovered": 123,
      "sitemapsFetched": 123,
      "sitemapsSkipped": 123,
      "errors": 123
    },
    "request_id": "123e4567-e89b-42d3-a456-426614174000"
  }
}
```

Use `deepline describe contextdev_get_web_scrape_sitemap --json` for the latest machine-readable contract.

## Input reference

Crawl an entire website's sitemap and return all discovered page URLs. Set `includeSubdomains=true` to also discover public pages and sitemaps on child hosts such as `docs.example.com` or `brand.example.com`.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.domain` | `string` | Yes | — | Domain to map, e.g. `stripe.com`. Minimum length: 3. |
| `payload.includeSubdomains` | `boolean` | No | `false` | Include URLs on subdomains. |
| `payload.maxLinks` | `integer` | No | `10000` | Maximum number of URLs to return. Minimum: 1. Maximum: 100000. |
| `payload.sitemapUrl` | `string` | No | — | Fetch this sitemap instead of discovering sitemaps. Must belong to the domain or a subdomain. Format: `uri`. |
| `payload.urlRegex` | `string` | No | — | Regex pattern. Only URLs matching this pattern are returned and counted against maxLinks. Maximum length: 256. |
| `payload.excludeUrlRegex` | `string` | No | — | Regex pattern. URLs matching this pattern are not returned, even when they match urlRegex. Maximum length: 256. |
| `payload.search` | `string` | No | — | Filter URLs by a topic or phrase, most relevant first. Minimum length: 2. Maximum length: 200. |
| `payload.headers` | `record` | No | — | HTTP headers for the target origin. Non-empty headers bypass caching. |
| `payload.timeoutOpts` | `object` | No | — | Request deadline and what to return when it passes. |
| `payload.zdr` | `"enabled" \| "disabled"` | No | `"disabled"` | `enabled` turns on zero data retention. Returns 403 `ZDR_NOT_ENABLED` unless your organization has ZDR. Allowed: `enabled`, `disabled`. |
| `payload.tags` | `array` | No | — | Comma-separated labels for filtering usage, e.g. `production,team-alpha`. Maximum items: 20. |
| `payload.timeoutMS` | `integer` | No | — | Deprecated: use timeoutOpts.milliseconds. Request deadline in milliseconds. sent as timeoutOpts with the "fail" behavior. Minimum: 1. Maximum: 300000. |

<details>
  <summary>Show raw input schema</summary>

  ### Input JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Crawl an entire website's sitemap and return all discovered page URLs. Set `includeSubdomains=true` to also discover public pages and sitemaps on child hosts such as `docs.example.com` or `brand.example.com`.",
    "properties": {
      "domain": {
        "type": "string",
        "description": "Domain to map, e.g. `stripe.com`.",
        "minLength": 3
      },
      "includeSubdomains": {
        "type": "boolean",
        "description": "Include URLs on subdomains.",
        "default": false
      },
      "maxLinks": {
        "type": "integer",
        "description": "Maximum number of URLs to return.",
        "default": 10000,
        "minimum": 1,
        "maximum": 100000
      },
      "sitemapUrl": {
        "type": "string",
        "description": "Fetch this sitemap instead of discovering sitemaps. Must belong to the domain or a subdomain.",
        "format": "uri"
      },
      "urlRegex": {
        "type": "string",
        "description": "Regex pattern. Only URLs matching this pattern are returned and counted against maxLinks.",
        "maxLength": 256
      },
      "excludeUrlRegex": {
        "type": "string",
        "description": "Regex pattern. URLs matching this pattern are not returned, even when they match urlRegex.",
        "maxLength": 256
      },
      "search": {
        "type": "string",
        "description": "Filter URLs by a topic or phrase, most relevant first.",
        "minLength": 2,
        "maxLength": 200
      },
      "headers": {
        "type": "object",
        "description": "HTTP headers for the target origin. Non-empty headers bypass caching.",
        "additionalProperties": {
          "type": "string",
          "maxLength": 8192,
          "pattern": "^[^\\r\\n]*$"
        }
      },
      "timeoutOpts": {
        "type": "object",
        "description": "Request deadline and what to return when it passes.",
        "properties": {
          "milliseconds": {
            "type": "integer",
            "description": "Deadline in milliseconds.",
            "minimum": 1,
            "maximum": 300000
          },
          "behavior": {
            "type": "string",
            "description": "\"fail\" returns 408 at the deadline. \"return-partial\" returns available results; inspect the response’s partial flag.",
            "default": "fail",
            "enum": [
              "fail",
              "return-partial"
            ]
          }
        },
        "required": [
          "milliseconds"
        ],
        "additionalProperties": false
      },
      "zdr": {
        "type": "string",
        "description": "`enabled` turns on zero data retention. Returns 403 `ZDR_NOT_ENABLED` unless your organization has ZDR.",
        "default": "disabled",
        "enum": [
          "enabled",
          "disabled"
        ]
      },
      "tags": {
        "type": "array",
        "description": "Comma-separated labels for filtering usage, e.g. `production,team-alpha`.",
        "maxItems": 20,
        "items": {
          "type": "string",
          "minLength": 1,
          "maxLength": 50
        }
      },
      "timeoutMS": {
        "type": "integer",
        "description": "Deprecated: use timeoutOpts.milliseconds. Request deadline in milliseconds; sent as timeoutOpts with the \"fail\" behavior.",
        "minimum": 1,
        "maximum": 300000
      }
    },
    "required": [
      "domain"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.data` | `object` | Yes | — | — |
| `result.data.partial` | `boolean` | No | — | — |
| `result.data.success` | `true` | Yes | — | Allowed: `true`. |
| `result.data.domain` | `string` | Yes | — | — |
| `result.data.urls` | `array` | Yes | — | — |
| `result.data.meta` | `object` | Yes | — | — |
| `result.data.meta.sitemapsDiscovered` | `integer` | Yes | — | — |
| `result.data.meta.sitemapsFetched` | `integer` | Yes | — | — |
| `result.data.meta.sitemapsSkipped` | `integer` | Yes | — | — |
| `result.data.meta.errors` | `integer` | Yes | — | — |
| `result.data.key_metadata` | `object` | No | — | — |
| `result.data.request_id` | `string` | Yes | — | Format: `uuid`. |
| `result.meta` | `object` | No | — | — |

<details>
  <summary>Show raw output schema</summary>

  ### Output JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "properties": {
      "data": {
        "type": "object",
        "properties": {
          "partial": {
            "type": "boolean"
          },
          "success": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "domain": {
            "type": "string"
          },
          "urls": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "meta": {
            "type": "object",
            "properties": {
              "sitemapsDiscovered": {
                "type": "integer"
              },
              "sitemapsFetched": {
                "type": "integer"
              },
              "sitemapsSkipped": {
                "type": "integer"
              },
              "errors": {
                "type": "integer"
              }
            },
            "required": [
              "sitemapsDiscovered",
              "sitemapsFetched",
              "sitemapsSkipped",
              "errors"
            ],
            "additionalProperties": false
          },
          "key_metadata": {
            "type": "object",
            "properties": {},
            "required": [],
            "additionalProperties": false
          },
          "request_id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "success",
          "domain",
          "urls",
          "meta",
          "request_id"
        ],
        "additionalProperties": false
      },
      "meta": {
        "type": "object",
        "additionalProperties": true
      }
    },
    "required": [
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Deepline cost

* Pricing model: `provider_usage` (provider usage).
* Estimated Deepline credits: `0.01` per pricing unit.

## Related documentation

* [Connect integrations](https://deepline.com/docs/integrations.md)
* [SDK V2 quickstart](https://deepline.com/docs/sdk-v2/quickstart.md)
* [SDK reference](https://deepline.com/docs/sdk-v2/sdk-reference.md)
* [Run tools across a CSV](https://deepline.com/docs/sdk-v2/batch-csv.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.