> ## 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 Images

> Scrape Images. Context.dev Contextdev Get Web Scrape Images reference includes SDK V2 and CLI requests, input constraints, response fields, and Deepline cost.

Scrape Images.

<Info>
  Tool ID: `contextdev_get_web_scrape_images`
</Info>

## Run this action

Use the TypeScript SDK for a single call. Put `ctx.tools.execute(...)` inside a Play when the call should be durable, scheduled, or run across a CSV.

```ts theme={null}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'contextdev_get_web_scrape_images',
  {
    "url": "https://example.com/resource"
  },
);

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

### CLI

```bash theme={null}
deepline tools execute contextdev_get_web_scrape_images --input '{
  "url": "https://example.com/resource"
}' --json
```

## Example response

The SDK exposes this shape at `result.toolResponse.raw`. Values below are representative.

```json theme={null}
{
  "data": {
    "success": true,
    "images": [
      {
        "src": "example",
        "element": "img",
        "type": "url",
        "alt": "example"
      }
    ],
    "url": "https://example.com"
  }
}
```

Use `deepline tools get contextdev_get_web_scrape_images --json` for the latest machine-readable contract.

## Input reference

Extract image assets from a web page, including standard URLs, inline SVGs, data URIs, responsive image sources, metadata, CSS backgrounds, video posters, and embeds.

| Name                 | Type      | Required | Default    | Details                                                                                                                                                                                                                                     |
| -------------------- | --------- | -------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `payload.url`        | `string`  | Yes      | —          | Page URL to inspect. Must include http\:// or https\://. Format: `uri`. Minimum length: 1.                                                                                                                                                  |
| `payload.maxAgeMs`   | `integer` | No       | `86400000` | Reuse a cached result this many milliseconds old or newer. Default: 86400000 (1 day). Set to 0 to bypass cache. Maximum: 2592000000 (30 days). Minimum: 0. Maximum: 2592000000.                                                             |
| `payload.enrichment` | `object`  | No       | —          | Optional per-image processing, sent as deep-object query params such as enrichment\[resolution]=true.                                                                                                                                       |
| `payload.dedupe`     | `boolean` | No       | `false`    | When true, visually duplicate images are removed: every image is loaded and perceptually hashed, and only the highest-resolution copy of each duplicate group is kept. Images that cannot be downloaded or hashed are kept. Default: false. |
| `payload.waitForMs`  | `integer` | No       | —          | Optional browser wait time in milliseconds after initial page load before collecting images. Min: 0. Max: 30000 (30 seconds). Minimum: 0. Maximum: 30000.                                                                                   |
| `payload.actions`    | `array`   | No       | —          | Optional browser actions executed in array order after the page loads and before content is captured. Send a JSON array in the query parameter. Maximum: 5 actions. Maximum items: 5.                                                       |
| `payload.headers`    | `record`  | No       | —          | Optional outbound HTTP headers forwarded only to the target URL, sent as deep-object query params such as headers\[X-Custom]=value. When provided, caching is bypassed: the result is neither read from nor written to cache.               |
| `payload.timeoutMS`  | `integer` | No       | —          | Optional timeout in milliseconds for the request. If the request takes longer than this value, it will be aborted with a 408 status code. Maximum allowed value is 300000ms (5 minutes). Minimum: 1. Maximum: 300000.                       |
| `payload.tags`       | `array`   | No       | —          | Optional comma-separated caller-defined tags for tracking this request. Tags are recorded on the request's usage log and can be used to filter usage on the dashboard usage page. Up to 20 tags, each 1-50 characters. Maximum items: 20.   |

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

  ### Input JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Extract image assets from a web page, including standard URLs, inline SVGs, data URIs, responsive image sources, metadata, CSS backgrounds, video posters, and embeds.",
    "properties": {
      "url": {
        "type": "string",
        "description": "Page URL to inspect. Must include http:// or https://.",
        "minLength": 1,
        "format": "uri"
      },
      "maxAgeMs": {
        "type": [
          "integer",
          "null"
        ],
        "description": "Reuse a cached result this many milliseconds old or newer. Default: 86400000 (1 day). Set to 0 to bypass cache. Maximum: 2592000000 (30 days).",
        "default": 86400000,
        "minimum": 0,
        "maximum": 2592000000
      },
      "enrichment": {
        "type": [
          "object",
          "null"
        ],
        "description": "Optional per-image processing, sent as deep-object query params such as enrichment[resolution]=true.",
        "properties": {
          "resolution": {
            "type": "boolean",
            "description": "Measure image width and height when possible.",
            "default": false
          },
          "hostedUrl": {
            "type": "boolean",
            "description": "Host materializable images on the Brand.dev CDN and return their URL and MIME type.",
            "default": false
          },
          "classification": {
            "type": "boolean",
            "description": "Classify each image by visual asset type.",
            "default": false
          },
          "maxTimePerMs": {
            "type": "integer",
            "description": "Per-image enrichment timeout in milliseconds. Default: 30000. Maximum: 60000.",
            "default": 30000,
            "minimum": 1,
            "maximum": 60000
          }
        },
        "additionalProperties": false
      },
      "dedupe": {
        "type": "boolean",
        "description": "When true, visually duplicate images are removed: every image is loaded and perceptually hashed, and only the highest-resolution copy of each duplicate group is kept. Images that cannot be downloaded or hashed are kept. Default: false.",
        "default": false
      },
      "waitForMs": {
        "type": [
          "integer",
          "null"
        ],
        "description": "Optional browser wait time in milliseconds after initial page load before collecting images. Min: 0. Max: 30000 (30 seconds).",
        "minimum": 0,
        "maximum": 30000
      },
      "actions": {
        "type": [
          "array",
          "null"
        ],
        "description": "Optional browser actions executed in array order after the page loads and before content is captured. Send a JSON array in the query parameter. Maximum: 5 actions.",
        "maxItems": 5,
        "items": {
          "description": "Browser action discriminated by `do`. Each variant exposes only its applicable fields.",
          "anyOf": [
            {
              "type": "object",
              "description": "Pause for a fixed number of milliseconds before continuing to the next action.",
              "properties": {
                "do": {
                  "type": "string",
                  "enum": [
                    "wait"
                  ]
                },
                "timeMs": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 30000
                }
              },
              "required": [
                "do",
                "timeMs"
              ],
              "additionalProperties": false
            },
            {
              "type": "object",
              "description": "Resolve and perform one natural-language browser action.",
              "properties": {
                "do": {
                  "type": "string",
                  "enum": [
                    "perform"
                  ]
                },
                "action": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 500
                }
              },
              "required": [
                "do",
                "action"
              ],
              "additionalProperties": false
            }
          ]
        }
      },
      "headers": {
        "type": "object",
        "description": "Optional outbound HTTP headers forwarded only to the target URL, sent as deep-object query params such as headers[X-Custom]=value. When provided, caching is bypassed: the result is neither read from nor written to cache.",
        "additionalProperties": {
          "type": "string",
          "maxLength": 8192,
          "pattern": "^[^\\r\\n]*$"
        }
      },
      "timeoutMS": {
        "type": "integer",
        "description": "Optional timeout in milliseconds for the request. If the request takes longer than this value, it will be aborted with a 408 status code. Maximum allowed value is 300000ms (5 minutes).",
        "minimum": 1,
        "maximum": 300000
      },
      "tags": {
        "type": "array",
        "description": "Optional comma-separated caller-defined tags for tracking this request. Tags are recorded on the request's usage log and can be used to filter usage on the dashboard usage page. Up to 20 tags, each 1-50 characters.",
        "maxItems": 20,
        "items": {
          "type": "string",
          "minLength": 1,
          "maxLength": 50
        }
      }
    },
    "required": [
      "url"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

| Name                                       | Type                                                                                                     | Required | Default | Details                                                                                            |
| ------------------------------------------ | -------------------------------------------------------------------------------------------------------- | -------- | ------- | -------------------------------------------------------------------------------------------------- |
| `result.data`                              | `object`                                                                                                 | Yes      | —       | —                                                                                                  |
| `result.data.success`                      | `true`                                                                                                   | Yes      | —       | Allowed: `true`.                                                                                   |
| `result.data.images`                       | `array`                                                                                                  | Yes      | —       | —                                                                                                  |
| `result.data.images[].src`                 | `string`                                                                                                 | Yes      | —       | —                                                                                                  |
| `result.data.images[].element`             | `"img" \| "svg" \| "link" \| "source" \| "video" \| "css" \| "object" \| "meta" \| "background"`         | Yes      | —       | Allowed: `img`, `svg`, `link`, `source`, `video`, `css`, `object`, `meta`, `background`.           |
| `result.data.images[].type`                | `"url" \| "html" \| "base64"`                                                                            | Yes      | —       | Allowed: `url`, `html`, `base64`.                                                                  |
| `result.data.images[].alt`                 | `string \| null`                                                                                         | Yes      | —       | —                                                                                                  |
| `result.data.images[].enrichment`          | `object`                                                                                                 | No       | —       | —                                                                                                  |
| `result.data.images[].enrichment.width`    | `integer`                                                                                                | No       | —       | —                                                                                                  |
| `result.data.images[].enrichment.height`   | `integer`                                                                                                | No       | —       | —                                                                                                  |
| `result.data.images[].enrichment.mimetype` | `string`                                                                                                 | No       | —       | —                                                                                                  |
| `result.data.images[].enrichment.url`      | `string`                                                                                                 | No       | —       | Format: `uri`.                                                                                     |
| `result.data.images[].enrichment.type`     | `"photography" \| "illustration" \| "logo" \| "wordmark" \| "icon" \| "pattern" \| "graphic" \| "other"` | No       | —       | Allowed: `photography`, `illustration`, `logo`, `wordmark`, `icon`, `pattern`, `graphic`, `other`. |
| `result.data.url`                          | `string`                                                                                                 | Yes      | —       | —                                                                                                  |
| `result.data.key_metadata`                 | `object`                                                                                                 | No       | —       | —                                                                                                  |
| `result.meta`                              | `object`                                                                                                 | No       | —       | —                                                                                                  |

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

  ### Output JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "data": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "images": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "src": {
                  "type": "string"
                },
                "element": {
                  "type": "string",
                  "enum": [
                    "img",
                    "svg",
                    "link",
                    "source",
                    "video",
                    "css",
                    "object",
                    "meta",
                    "background"
                  ]
                },
                "type": {
                  "type": "string",
                  "enum": [
                    "url",
                    "html",
                    "base64"
                  ]
                },
                "alt": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "enrichment": {
                  "type": "object",
                  "properties": {
                    "width": {
                      "type": "integer"
                    },
                    "height": {
                      "type": "integer"
                    },
                    "mimetype": {
                      "type": "string"
                    },
                    "url": {
                      "type": "string",
                      "format": "uri"
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "photography",
                        "illustration",
                        "logo",
                        "wordmark",
                        "icon",
                        "pattern",
                        "graphic",
                        "other"
                      ]
                    }
                  },
                  "additionalProperties": false
                }
              },
              "required": [
                "src",
                "element",
                "type",
                "alt"
              ],
              "additionalProperties": false
            }
          },
          "url": {
            "type": "string"
          },
          "key_metadata": {
            "type": "object",
            "properties": {},
            "required": [],
            "additionalProperties": false
          }
        },
        "required": [
          "success",
          "images",
          "url"
        ],
        "additionalProperties": false
      },
      "meta": {
        "type": "object",
        "additionalProperties": true
      }
    },
    "required": [
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Deepline cost

* Pricing model: `fixed` (per call).
* Estimated Deepline credits: `0` per pricing unit.
* Provider-native pricing may still exist outside Deepline credit billing.

## Related documentation

* [Context.dev provider guide](/docs/providers/contextdev/guide)
* [SDK V2 quickstart](/docs/sdk-v2/quickstart)
* [SDK reference](/docs/sdk-v2/sdk-reference)
* [Run tools across a CSV](/docs/sdk-v2/batch-csv)
