@@ -180,8 +180,10 @@ def screenshot(
180180 direct_url : str | Omit = omit ,
181181 domain : str | Omit = omit ,
182182 full_screenshot : Literal ["true" , "false" ] | Omit = omit ,
183+ max_age_ms : int | Omit = omit ,
183184 page : Literal ["login" , "signup" , "blog" , "careers" , "pricing" , "terms" , "privacy" , "contact" ] | Omit = omit ,
184185 prioritize : Literal ["speed" , "quality" ] | Omit = omit ,
186+ viewport : web_screenshot_params .Viewport | Omit = omit ,
185187 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
186188 # The extra values given here take precedence over values defined on the client or passed to this method.
187189 extra_headers : Headers | None = None ,
@@ -205,6 +207,10 @@ def screenshot(
205207 screenshot capturing all content. If 'false' or not provided, takes a viewport
206208 screenshot (standard browser view).
207209
210+ max_age_ms: Return a cached screenshot if a prior screenshot for the same parameters exists
211+ and is younger than this many milliseconds. Defaults to 1 day (86400000 ms) when
212+ omitted. Max is 30 days (2592000000 ms). Set to 0 to always capture fresh.
213+
208214 page: Optional parameter to specify which page type to screenshot. If provided, the
209215 system will scrape the domain's links and use heuristics to find the most
210216 appropriate URL for the specified page type (30 supported languages). If not
@@ -215,6 +221,8 @@ def screenshot(
215221 faster capture with basic quality. If 'quality', optimizes for higher quality
216222 with longer wait times. Defaults to 'quality' if not provided.
217223
224+ viewport: Optional browser viewport dimensions for the screenshot. Defaults to 1920x1080.
225+
218226 extra_headers: Send extra headers
219227
220228 extra_query: Add additional query parameters to the request
@@ -235,8 +243,10 @@ def screenshot(
235243 "direct_url" : direct_url ,
236244 "domain" : domain ,
237245 "full_screenshot" : full_screenshot ,
246+ "max_age_ms" : max_age_ms ,
238247 "page" : page ,
239248 "prioritize" : prioritize ,
249+ "viewport" : viewport ,
240250 },
241251 web_screenshot_params .WebScreenshotParams ,
242252 ),
@@ -719,8 +729,10 @@ async def screenshot(
719729 direct_url : str | Omit = omit ,
720730 domain : str | Omit = omit ,
721731 full_screenshot : Literal ["true" , "false" ] | Omit = omit ,
732+ max_age_ms : int | Omit = omit ,
722733 page : Literal ["login" , "signup" , "blog" , "careers" , "pricing" , "terms" , "privacy" , "contact" ] | Omit = omit ,
723734 prioritize : Literal ["speed" , "quality" ] | Omit = omit ,
735+ viewport : web_screenshot_params .Viewport | Omit = omit ,
724736 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
725737 # The extra values given here take precedence over values defined on the client or passed to this method.
726738 extra_headers : Headers | None = None ,
@@ -744,6 +756,10 @@ async def screenshot(
744756 screenshot capturing all content. If 'false' or not provided, takes a viewport
745757 screenshot (standard browser view).
746758
759+ max_age_ms: Return a cached screenshot if a prior screenshot for the same parameters exists
760+ and is younger than this many milliseconds. Defaults to 1 day (86400000 ms) when
761+ omitted. Max is 30 days (2592000000 ms). Set to 0 to always capture fresh.
762+
747763 page: Optional parameter to specify which page type to screenshot. If provided, the
748764 system will scrape the domain's links and use heuristics to find the most
749765 appropriate URL for the specified page type (30 supported languages). If not
@@ -754,6 +770,8 @@ async def screenshot(
754770 faster capture with basic quality. If 'quality', optimizes for higher quality
755771 with longer wait times. Defaults to 'quality' if not provided.
756772
773+ viewport: Optional browser viewport dimensions for the screenshot. Defaults to 1920x1080.
774+
757775 extra_headers: Send extra headers
758776
759777 extra_query: Add additional query parameters to the request
@@ -774,8 +792,10 @@ async def screenshot(
774792 "direct_url" : direct_url ,
775793 "domain" : domain ,
776794 "full_screenshot" : full_screenshot ,
795+ "max_age_ms" : max_age_ms ,
777796 "page" : page ,
778797 "prioritize" : prioritize ,
798+ "viewport" : viewport ,
779799 },
780800 web_screenshot_params .WebScreenshotParams ,
781801 ),
0 commit comments