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

> Get every image on a web page, including SVGs, background images, video posters, and embeds. Includes inputs, outputs, SDK V2 examples, and Deepline cost.

Get every image on a web page, including SVGs, background images, video posters, and embeds.

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

## 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_images',
  {
    "url": "https://example.com/resource"
  },
);

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

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline run contextdev_get_web_scrape_images --input '{
  "url": "https://example.com/resource"
}'
```

## 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,
    "images": [
      {
        "src": "example",
        "element": "img",
        "type": "url",
        "alt": "example"
      }
    ],
    "url": "https://example.com",
    "cache_metadata": {
      "status": "hit",
      "age_ms": 123
    },
    "request_id": "123e4567-e89b-42d3-a456-426614174000"
  }
}
```

Use `deepline describe 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 | `259200000` | Maximum cache age in milliseconds. Defaults to 3 days (259200000 ms). Maximum: 1 year (31536000000 ms). `0` fetches fresh. Minimum: 0. Maximum: 31536000000. |
| `payload.enrichment` | `object` | No | — | Optional per-image processing, sent as deep-object query params such as enrichment\[resolution]=true. |
| `payload.dedupe` | `boolean` | No | `false` | Remove visual duplicates, keeping the highest-resolution copy. Undownloadable images remain. |
| `payload.waitForMs` | `integer` | No | — | Optional browser wait time in milliseconds after initial page load before collecting images. Min: 0. Max: 30000 (30 seconds). When combined with timeoutOpts, timeoutOpts.milliseconds must be at least waitForMs + 10000 ms. A shorter deadline is rejected with 400 TIMEOUT\_TOO\_SHORT\_FOR\_WAIT. 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 | — | HTTP headers for the target origin. Non-empty headers bypass caching. |
| `payload.country` | `"ad" \| "ae" \| "af" \| "ag" \| "ai" \| "al" \| "am" \| "ao" \| "ar" \| "at" \| "au" \| "aw" \| "az" \| "ba" \| "bb" \| "bd" \| "be" \| "bf" \| "bg" \| "bh" \| "bi" \| "bj" \| "bm" \| "bn" \| "bo" \| "bq" \| "br" \| "bs" \| "bw" \| "by" \| "bz" \| "ca" \| "cd" \| "cf" \| "cg" \| "ch" \| "ci" \| "cl" \| "cm" \| "cn" \| "co" \| "cr" \| "cv" \| "cw" \| "cy" \| "cz" \| "de" \| "dj" \| "dk" \| "dm" \| "do" \| "dz" \| "ec" \| "ee" \| "eg" \| "es" \| "et" \| "fi" \| "fj" \| "fr" \| "ga" \| "gb" \| "gd" \| "ge" \| "gf" \| "gg" \| "gh" \| "gm" \| "gn" \| "gp" \| "gq" \| "gr" \| "gt" \| "gu" \| "gw" \| "gy" \| "hk" \| "hn" \| "hr" \| "ht" \| "hu" \| "id" \| "ie" \| "il" \| "im" \| "in" \| "iq" \| "ir" \| "is" \| "it" \| "je" \| "jm" \| "jo" \| "jp" \| "ke" \| "kg" \| "kh" \| "kn" \| "kr" \| "kw" \| "ky" \| "kz" \| "la" \| "lb" \| "lc" \| "lk" \| "lr" \| "ls" \| "lt" \| "lu" \| "lv" \| "ly" \| "ma" \| "mc" \| "md" \| "me" \| "mf" \| "mg" \| "mk" \| "ml" \| "mm" \| "mn" \| "mo" \| "mq" \| "mr" \| "mt" \| "mu" \| "mv" \| "mw" \| "mx" \| "my" \| "mz" \| "na" \| "nc" \| "ne" \| "ng" \| "ni" \| "nl" \| "no" \| "np" \| "nz" \| "om" \| "pa" \| "pe" \| "pf" \| "pg" \| "ph" \| "pk" \| "pl" \| "pr" \| "ps" \| "pt" \| "py" \| "qa" \| "re" \| "ro" \| "rs" \| "ru" \| "rw" \| "sa" \| "sc" \| "sd" \| "se" \| "sg" \| "si" \| "sk" \| "sl" \| "sm" \| "sn" \| "so" \| "sr" \| "ss" \| "st" \| "sv" \| "sx" \| "sy" \| "sz" \| "tc" \| "td" \| "tg" \| "th" \| "tj" \| "tl" \| "tm" \| "tn" \| "tr" \| "tt" \| "tw" \| "tz" \| "ua" \| "ug" \| "us" \| "uy" \| "uz" \| "vc" \| "ve" \| "vg" \| "vi" \| "vn" \| "ye" \| "yt" \| "za" \| "zm" \| "zw"` | No | — | Fetch from this country (ISO 3166-1 alpha-2). Allowed: `ad`, `ae`, `af`, `ag`, `ai`, `al`, `am`, `ao`, `ar`, `at`, `au`, `aw`, `az`, `ba`, `bb`, `bd`, `be`, `bf`, `bg`, `bh`, `bi`, `bj`, `bm`, `bn`, `bo`, `bq`, `br`, `bs`, `bw`, `by`, `bz`, `ca`, `cd`, `cf`, `cg`, `ch`, `ci`, `cl`, `cm`, `cn`, `co`, `cr`, `cv`, `cw`, `cy`, `cz`, `de`, `dj`, `dk`, `dm`, `do`, `dz`, `ec`, `ee`, `eg`, `es`, `et`, `fi`, `fj`, `fr`, `ga`, `gb`, `gd`, `ge`, `gf`, `gg`, `gh`, `gm`, `gn`, `gp`, `gq`, `gr`, `gt`, `gu`, See the live schema for the complete constraint. |
| `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": "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": "Maximum cache age in milliseconds. Defaults to 3 days (259200000 ms). Maximum: 1 year (31536000000 ms). `0` fetches fresh.",
        "default": 259200000,
        "minimum": 0,
        "maximum": 31536000000
      },
      "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 Context.dev CDN and return their URL and MIME type. Ignored when zero data retention is enabled.",
            "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": "Remove visual duplicates, keeping the highest-resolution copy. Undownloadable images remain.",
        "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). When combined with timeoutOpts, timeoutOpts.milliseconds must be at least waitForMs + 10000 ms; a shorter deadline is rejected with 400 TIMEOUT_TOO_SHORT_FOR_WAIT.",
        "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",
                  "description": "Use `wait` to pause for a fixed duration.",
                  "enum": [
                    "wait"
                  ]
                },
                "timeMs": {
                  "type": "integer",
                  "description": "Time to pause in milliseconds before the next action.",
                  "minimum": 0,
                  "maximum": 30000
                }
              },
              "required": [
                "do",
                "timeMs"
              ],
              "additionalProperties": false
            },
            {
              "type": "object",
              "description": "Resolve and perform one natural-language browser action.",
              "properties": {
                "do": {
                  "type": "string",
                  "description": "Use `perform` for a plain-language browser instruction.",
                  "enum": [
                    "perform"
                  ]
                },
                "action": {
                  "type": "string",
                  "description": "One browser instruction, such as clicking a button or entering text.",
                  "minLength": 1,
                  "maxLength": 500
                }
              },
              "required": [
                "do",
                "action"
              ],
              "additionalProperties": false
            },
            {
              "type": "object",
              "description": "Scroll the page or a selected scrollable container, waiting adaptively for content and dimensions to settle after each iteration.",
              "properties": {
                "do": {
                  "type": "string",
                  "description": "Use `scroll` to move through the page or a container.",
                  "enum": [
                    "scroll"
                  ]
                },
                "direction": {
                  "type": "string",
                  "description": "Direction to scroll. Defaults to down.",
                  "enum": [
                    "up",
                    "down",
                    "left",
                    "right"
                  ]
                },
                "amount": {
                  "description": "Pixels per scroll, one visible viewport, or the current scroll boundary. Defaults to viewport.",
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 100000
                    },
                    {
                      "type": "string",
                      "enum": [
                        "viewport",
                        "max"
                      ]
                    }
                  ]
                },
                "container": {
                  "type": "string",
                  "description": "CSS selector for the first matching scroll container. Defaults to the page.",
                  "minLength": 1,
                  "maxLength": 2000
                },
                "maxScrolls": {
                  "type": "integer",
                  "description": "Maximum scroll iterations. Stops early when scrolling and scrollable extent stop changing. Defaults to 1.",
                  "minimum": 1,
                  "maximum": 50
                }
              },
              "required": [
                "do"
              ],
              "additionalProperties": false
            }
          ]
        }
      },
      "headers": {
        "type": "object",
        "description": "HTTP headers for the target origin. Non-empty headers bypass caching.",
        "additionalProperties": {
          "type": "string",
          "maxLength": 8192,
          "pattern": "^[^\\r\\n]*$"
        }
      },
      "country": {
        "type": "string",
        "description": "Fetch from this country (ISO 3166-1 alpha-2).",
        "enum": [
          "ad",
          "ae",
          "af",
          "ag",
          "ai",
          "al",
          "am",
          "ao",
          "ar",
          "at",
          "au",
          "aw",
          "az",
          "ba",
          "bb",
          "bd",
          "be",
          "bf",
          "bg",
          "bh",
          "bi",
          "bj",
          "bm",
          "bn",
          "bo",
          "bq",
          "br",
          "bs",
          "bw",
          "by",
          "bz",
          "ca",
          "cd",
          "cf",
          "cg",
          "ch",
          "ci",
          "cl",
          "cm",
          "cn",
          "co",
          "cr",
          "cv",
          "cw",
          "cy",
          "cz",
          "de",
          "dj",
          "dk",
          "dm",
          "do",
          "dz",
          "ec",
          "ee",
          "eg",
          "es",
          "et",
          "fi",
          "fj",
          "fr",
          "ga",
          "gb",
          "gd",
          "ge",
          "gf",
          "gg",
          "gh",
          "gm",
          "gn",
          "gp",
          "gq",
          "gr",
          "gt",
          "gu",
          "gw",
          "gy",
          "hk",
          "hn",
          "hr",
          "ht",
          "hu",
          "id",
          "ie",
          "il",
          "im",
          "in",
          "iq",
          "ir",
          "is",
          "it",
          "je",
          "jm",
          "jo",
          "jp",
          "ke",
          "kg",
          "kh",
          "kn",
          "kr",
          "kw",
          "ky",
          "kz",
          "la",
          "lb",
          "lc",
          "lk",
          "lr",
          "ls",
          "lt",
          "lu",
          "lv",
          "ly",
          "ma",
          "mc",
          "md",
          "me",
          "mf",
          "mg",
          "mk",
          "ml",
          "mm",
          "mn",
          "mo",
          "mq",
          "mr",
          "mt",
          "mu",
          "mv",
          "mw",
          "mx",
          "my",
          "mz",
          "na",
          "nc",
          "ne",
          "ng",
          "ni",
          "nl",
          "no",
          "np",
          "nz",
          "om",
          "pa",
          "pe",
          "pf",
          "pg",
          "ph",
          "pk",
          "pl",
          "pr",
          "ps",
          "pt",
          "py",
          "qa",
          "re",
          "ro",
          "rs",
          "ru",
          "rw",
          "sa",
          "sc",
          "sd",
          "se",
          "sg",
          "si",
          "sk",
          "sl",
          "sm",
          "sn",
          "so",
          "sr",
          "ss",
          "st",
          "sv",
          "sx",
          "sy",
          "sz",
          "tc",
          "td",
          "tg",
          "th",
          "tj",
          "tl",
          "tm",
          "tn",
          "tr",
          "tt",
          "tw",
          "tz",
          "ua",
          "ug",
          "us",
          "uy",
          "uz",
          "vc",
          "ve",
          "vg",
          "vi",
          "vn",
          "ye",
          "yt",
          "za",
          "zm",
          "zw"
        ]
      },
      "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. \"return-partial\" requires at least 5000 ms. On POST /web/scrape, an output that is not ready in time fails with error_code REQUEST_TIMEOUT inside a 200 response under either behavior; 408 is returned only when the whole request cannot respond by the deadline.",
            "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": [
      "url"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.data` | `object` | Yes | — | — |
| `result.data.partial` | `boolean` | No | — | — |
| `result.data.finalDOMState` | `"loaded" \| "still-loading"` | No | — | Allowed: `loaded`, `still-loading`. |
| `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.cache_metadata` | `object` | Yes | — | — |
| `result.data.cache_metadata.status` | `"hit" \| "miss" \| "zdr"` | Yes | — | Allowed: `hit`, `miss`, `zdr`. |
| `result.data.cache_metadata.age_ms` | `integer` | Yes | — | Minimum: 0. |
| `result.data.actionsApplied` | `array` | No | — | — |
| `result.data.actionsApplied[].instruction` | `string` | Yes | — | — |
| `result.data.actionsApplied[].status` | `"applied" \| "failed" \| "skipped"` | Yes | — | Allowed: `applied`, `failed`, `skipped`. |
| `result.data.actionsApplied[].method` | `string` | No | — | — |
| `result.data.actionsApplied[].targetDescription` | `string` | No | — | — |
| `result.data.actionsApplied[].completionEvidence` | `string` | No | — | — |
| `result.data.actionsApplied[].error` | `string` | No | — | — |
| `result.data.actionsApplied[].durationMs` | `number` | No | — | — |
| `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"
          },
          "finalDOMState": {
            "type": "string",
            "enum": [
              "loaded",
              "still-loading"
            ]
          },
          "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"
          },
          "cache_metadata": {
            "type": "object",
            "properties": {
              "status": {
                "type": "string",
                "enum": [
                  "hit",
                  "miss",
                  "zdr"
                ]
              },
              "age_ms": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": [
              "status",
              "age_ms"
            ],
            "additionalProperties": false
          },
          "actionsApplied": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "instruction": {
                  "type": "string"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "applied",
                    "failed",
                    "skipped"
                  ]
                },
                "method": {
                  "type": "string"
                },
                "targetDescription": {
                  "type": "string"
                },
                "completionEvidence": {
                  "type": "string"
                },
                "error": {
                  "type": "string"
                },
                "durationMs": {
                  "type": "number"
                }
              },
              "required": [
                "instruction",
                "status"
              ],
              "additionalProperties": false
            }
          },
          "key_metadata": {
            "type": "object",
            "properties": {},
            "required": [],
            "additionalProperties": false
          },
          "request_id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "success",
          "images",
          "url",
          "cache_metadata",
          "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.