You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Usage: "Downloads a resource and returns its bytes as base64. Supports images, PDFs,\nHTML pages, and any other content type without image conversion, text\nextraction, or character-encoding changes. HTTP compression is decoded before\nbase64 encoding.HTML is the original HTTP response; JavaScript is not rendered.\nFollows public redirects and retries failed downloads through ISP and\nresidential proxies, with a direct fallback. When country is specified, only a\nresidential proxy in that country is used. Supply headers such as Referer for\nimages that require a referring page. Downloads are not cached. Maximum decoded\nresource size: 20 MiB (20971520 bytes), before base64 encoding. Successful\nrequests cost 1 credit; errors are not billed.",
781
+
Usage: "Downloads a resource and returns its bytes as base64. Without waitForMs, returns\nthe original HTTP response without image conversion, text extraction, or\ncharacter-encoding changes. HTTP compression is decoded before base64 encoding.\nSupply waitForMs to render HTML with JavaScript in the browser and return the\nresulting HTML as UTF-8 bytes after the wait. Non-HTML resources, including\nimages and PDFs, keep their original bytes and do not incur a browser wait.\nFollows public redirects and retries failed downloads through ISP and\nresidential proxies, with a direct fallback. When country is specified, only a\nresidential proxy in that country is used. Supply headers such as Referer for\nimages that require a referring page. Downloads are not cached. Maximum decoded\nresource size: 20 MiB (20971520 bytes), before base64 encoding. Successful\nrequests cost 1 credit; errors are not billed.",
782
782
Suggest: true,
783
783
Flags: []cli.Flag{
784
784
&requestflag.Flag[string]{
@@ -807,6 +807,11 @@ var webWebScrapeBytes = requestflag.WithInnerFlags(cli.Command{
807
807
Usage: "Optional request deadline and behavior on timeout. For GET requests, use timeoutOpts[milliseconds]=30000&timeoutOpts[behavior]=fail or a JSON-encoded timeoutOpts object.",
808
808
QueryPath: "timeoutOpts",
809
809
},
810
+
&requestflag.Flag[*int64]{
811
+
Name: "wait-for-ms",
812
+
Usage: "Optional browser wait time after initial page load, in milliseconds (0–30000; 0 uses 500). When supplied, HTML is rendered with JavaScript and returned as UTF-8 bytes. Other resources keep their original bytes without a browser wait. Omit to download the original HTTP response. 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.",
813
+
QueryPath: "waitForMs",
814
+
},
810
815
&requestflag.Flag[string]{
811
816
Name: "zdr",
812
817
Usage: "Set to enabled to bypass shared caches and omit request and response content from retained usage logs. Asset uploads are skipped, so hosted image URLs are omitted. Requires zero data retention to be enabled for your organization (contact support@context.dev), otherwise the request fails with ZDR_NOT_ENABLED. Successful ZDR responses include X-Context-ZDR: true.",
0 commit comments