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. 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.",
786
+
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. Cached results are reused according to\nmaxAgeMs (default: 1 day; maximum: 30 days). Set maxAgeMs=0 to fetch fresh and\nrefresh the cache. Cache identity includes the exact URL, country, waitForMs,\nand normalized outbound headers. Credential-bearing headers and zero data\nretention bypass cache reads and writes. cache_metadata reports hit, miss, or\nzdr and the cached result age in milliseconds. Maximum decoded resource size: 20\nMiB (20971520 bytes), before base64 encoding. Successful requests cost 1 credit;\nerrors are not billed.",
787
787
Suggest: true,
788
788
Flags: []cli.Flag{
789
789
&requestflag.Flag[string]{
@@ -799,9 +799,15 @@ var webWebScrapeBytes = requestflag.WithInnerFlags(cli.Command{
799
799
},
800
800
&requestflag.Flag[map[string]any]{
801
801
Name: "headers",
802
-
Usage: "Optional outbound HTTP headers, such as Referer, Cookie, or Authorization. Send as a JSON object or deep-object query params such as headers[Referer]=https://example.com/. Host, Content-Length, and hop-by-hop transport headers are rejected. Authorization and cookies are removed when a redirect changes origin.",
802
+
Usage: "Optional outbound HTTP headers, such as Referer, Cookie, or Authorization. Send as a JSON object or deep-object query params such as headers[Referer]=https://example.com/. Host, Content-Length, and hop-by-hop transport headers are rejected. Authorization and cookies are removed when a redirect changes origin. Credential-bearing headers bypass cache reads and writes; other headers are included in the cache key.",
803
803
QueryPath: "headers",
804
804
},
805
+
&requestflag.Flag[*int64]{
806
+
Name: "max-age-ms",
807
+
Usage: "Return a cached result if a prior scrape for the same parameters exists and is younger than this many milliseconds. Defaults to 1 day (86400000 ms) when omitted. Max is 30 days (2592000000 ms). Set to 0 to always scrape fresh.",
808
+
Default: requestflag.Ptr[int64](86400000),
809
+
QueryPath: "maxAgeMs",
810
+
},
805
811
&requestflag.Flag[[]string]{
806
812
Name: "tag",
807
813
Usage: "Comma-separated tags for tracking request usage. Up to 20 tags, each 1-50 characters.",
@@ -989,6 +995,11 @@ var webWebScrapeImages = requestflag.WithInnerFlags(cli.Command{
989
995
Usage: "Optional browser actions executed in array order after the page loads and before content is captured. Requires a paid plan. Send a JSON array in the query parameter. Maximum: 5 actions.",
990
996
QueryPath: "actions",
991
997
},
998
+
&requestflag.Flag[string]{
999
+
Name: "country",
1000
+
Usage: "Fetch the target page through a residential proxy in this country (ISO 3166-1 alpha-2).",
1001
+
QueryPath: "country",
1002
+
},
992
1003
&requestflag.Flag[bool]{
993
1004
Name: "dedupe",
994
1005
Usage: "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.",
0 commit comments