Tool ID:
contextdev_get_web_scrape_htmlRun this action
Use the TypeScript SDK for one call. Usectx.tools.execute(...) inside a Play for durable calls, scheduled calls, or CSV processing.
import { Deepline } from 'deepline';
const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
'contextdev_get_web_scrape_html',
{
"url": "https://example.com/resource"
},
);
console.log(result.toolResponse.raw);
CLI
deepline run contextdev_get_web_scrape_html --input '{
"url": "https://example.com/resource"
}'
Example response
The SDK returns this shape atresult.toolResponse.raw. The example values illustrate the response.
{
"data": {
"success": true,
"html": "example",
"url": "https://example.com",
"type": "html",
"metadata": {
"sourceUrl": "https://example.com",
"finalUrl": "https://example.com"
},
"cache_metadata": {
"status": "hit",
"age_ms": 123
},
"finalDOMState": "loaded",
"request_id": "123e4567-e89b-42d3-a456-426614174000"
}
}
deepline describe contextdev_get_web_scrape_html --json for the latest machine-readable contract.
Input reference
Scrapes the given URL and returns the HTML content of the page. Rules run on the returned HTML after selector and main-content filtering. Send extractRules as a JSON-encoded query parameter.| Name | Type | Required | Default | Details |
|---|---|---|---|---|
payload.url | string | Yes | — | Full URL to scrape (must include http:// or https:// protocol) Format: uri. Minimum length: 1. |
payload.pdf | object | No | {"shouldParse":true,"ocr":false} | PDF handling. start/end limit parsing to an inclusive, 1-based page range. |
payload.includeFrames | boolean | No | false | When true, iframes are rendered inline into the returned HTML. |
payload.useMainContentOnly | boolean | No | false | When true, return only the page’s main content in the HTML response, excluding headers, footers, sidebars, and navigation when detectable. |
payload.extractRules | record | No | — | CSS extraction rules, as a JSON object. Up to 100 fields and 5 nesting levels. XPath is unsupported. |
payload.includeSelectors | array | No | — | Keep only elements matching these CSS selectors. Maximum items: 50. |
payload.excludeSelectors | array | No | — | CSS selectors to remove from the result. Applied after includeSelectors. Exclusion takes precedence: an element matching both is removed. Examples: “nav”, “footer”, “.ad-banner”, “[aria-hidden=true]”. Maximum items: 50. |
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.waitForMs | integer | No | — | Optional browser wait time in milliseconds after initial page load. 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.settleAnimations | boolean | No | false | When true, waits briefly for CSS and transition animations to settle before extracting HTML. Defaults to false. This adds a bit of latency in exchange for more stable output on animated pages. |
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. |
This input schema is too large for an inline display. Read the complete live contract with
deepline describe contextdev_get_web_scrape_html --json.Output reference
| Name | Type | Required | Default | Details |
|---|---|---|---|---|
result.data | object | Yes | — | — |
result.data.success | true | Yes | — | Allowed: true. |
result.data.html | string | Yes | — | — |
result.data.extracted | record | No | — | — |
result.data.url | string | Yes | — | — |
result.data.type | "html" | "xml" | "json" | "text" | "csv" | "markdown" | "svg" | "pdf" | "docx" | "doc" | "xlsx" | "xls" | "pptx" | "ppt" | "warc" | Yes | — | Allowed: html, xml, json, text, csv, markdown, svg, pdf, docx, doc, xlsx, xls, pptx, ppt, warc. |
result.data.metadata | object | Yes | — | — |
result.data.metadata.sourceUrl | string | Yes | — | — |
result.data.metadata.finalUrl | string | Yes | — | — |
result.data.metadata.title | string | No | — | — |
result.data.metadata.description | string | No | — | — |
result.data.metadata.language | string | No | — | — |
result.data.metadata.keywords | array | No | — | — |
result.data.metadata.canonicalUrl | string | No | — | — |
result.data.metadata.author | string | No | — | — |
result.data.metadata.siteName | string | No | — | — |
result.data.metadata.image | string | No | — | — |
result.data.metadata.favicon | string | No | — | — |
result.data.metadata.publishedTime | string | No | — | — |
result.data.metadata.modifiedTime | string | No | — | — |
result.data.metadata.robots | string | No | — | — |
result.data.metadata.openGraph | record | No | — | — |
result.data.metadata.twitter | record | No | — | — |
result.data.metadata.alternates | array | No | — | — |
result.data.metadata.alternates[].href | string | Yes | — | — |
result.data.metadata.alternates[].hreflang | string | No | — | — |
result.data.metadata.alternates[].type | string | No | — | — |
result.data.metadata.alternates[].title | string | No | — | — |
result.data.metadata.headings | array | No | — | — |
result.data.metadata.headings[].level | integer | Yes | — | Minimum: 1. Maximum: 6. |
result.data.metadata.headings[].text | string | Yes | — | — |
result.data.metadata.jsonLd | array | No | — | — |
result.data.metadata.additionalMeta | record | No | — | — |
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.actionsHtmlStale | boolean | No | — | — |
result.data.finalDOMState | "loaded" | "still-loading" | Yes | — | Allowed: loaded, still-loading. |
result.data.key_metadata | object | No | — | — |
result.data.request_id | string | Yes | — | Format: uuid. |
result.meta | object | No | — | — |
Deepline cost
- Pricing model:
provider_usage(provider usage). - Estimated Deepline credits:
0.01per pricing unit.