@@ -58,7 +58,8 @@ def with_streaming_response(self) -> WebResourceWithStreamingResponse:
5858 def screenshot (
5959 self ,
6060 * ,
61- domain : str ,
61+ direct_url : str | Omit = omit ,
62+ domain : str | Omit = omit ,
6263 full_screenshot : Literal ["true" , "false" ] | Omit = omit ,
6364 page : Literal ["login" , "signup" , "blog" , "careers" , "pricing" , "terms" , "privacy" , "contact" ] | Omit = omit ,
6465 prioritize : Literal ["speed" , "quality" ] | Omit = omit ,
@@ -73,10 +74,15 @@ def screenshot(
7374
7475 Supports both viewport (standard browser
7576 view) and full-page screenshots. Can also screenshot specific page types (login,
76- pricing, etc.) by using heuristics to find the appropriate URL. Returns a URL to
77- the uploaded screenshot image hosted on our CDN.
77+ pricing, etc.) by using heuristics to find the appropriate URL. Either 'domain'
78+ or 'directUrl' must be provided as a query parameter, but not both. Returns a
79+ URL to the uploaded screenshot image hosted on our CDN.
7880
7981 Args:
82+ direct_url: A specific URL to screenshot directly, bypassing domain resolution (e.g.,
83+ 'https://example.com/pricing'). When provided, the screenshot is taken of this
84+ exact URL.
85+
8086 domain: Domain name to take screenshot of (e.g., 'example.com', 'google.com'). The
8187 domain will be automatically normalized and validated.
8288
@@ -87,7 +93,8 @@ def screenshot(
8793 page: Optional parameter to specify which page type to screenshot. If provided, the
8894 system will scrape the domain's links and use heuristics to find the most
8995 appropriate URL for the specified page type (30 supported languages). If not
90- provided, screenshots the main domain landing page.
96+ provided, screenshots the main domain landing page. Only applicable when using
97+ 'domain', not 'directUrl'.
9198
9299 prioritize: Optional parameter to prioritize screenshot capture. If 'speed', optimizes for
93100 faster capture with basic quality. If 'quality', optimizes for higher quality
@@ -110,6 +117,7 @@ def screenshot(
110117 timeout = timeout ,
111118 query = maybe_transform (
112119 {
120+ "direct_url" : direct_url ,
113121 "domain" : domain ,
114122 "full_screenshot" : full_screenshot ,
115123 "page" : page ,
@@ -409,7 +417,8 @@ def with_streaming_response(self) -> AsyncWebResourceWithStreamingResponse:
409417 async def screenshot (
410418 self ,
411419 * ,
412- domain : str ,
420+ direct_url : str | Omit = omit ,
421+ domain : str | Omit = omit ,
413422 full_screenshot : Literal ["true" , "false" ] | Omit = omit ,
414423 page : Literal ["login" , "signup" , "blog" , "careers" , "pricing" , "terms" , "privacy" , "contact" ] | Omit = omit ,
415424 prioritize : Literal ["speed" , "quality" ] | Omit = omit ,
@@ -424,10 +433,15 @@ async def screenshot(
424433
425434 Supports both viewport (standard browser
426435 view) and full-page screenshots. Can also screenshot specific page types (login,
427- pricing, etc.) by using heuristics to find the appropriate URL. Returns a URL to
428- the uploaded screenshot image hosted on our CDN.
436+ pricing, etc.) by using heuristics to find the appropriate URL. Either 'domain'
437+ or 'directUrl' must be provided as a query parameter, but not both. Returns a
438+ URL to the uploaded screenshot image hosted on our CDN.
429439
430440 Args:
441+ direct_url: A specific URL to screenshot directly, bypassing domain resolution (e.g.,
442+ 'https://example.com/pricing'). When provided, the screenshot is taken of this
443+ exact URL.
444+
431445 domain: Domain name to take screenshot of (e.g., 'example.com', 'google.com'). The
432446 domain will be automatically normalized and validated.
433447
@@ -438,7 +452,8 @@ async def screenshot(
438452 page: Optional parameter to specify which page type to screenshot. If provided, the
439453 system will scrape the domain's links and use heuristics to find the most
440454 appropriate URL for the specified page type (30 supported languages). If not
441- provided, screenshots the main domain landing page.
455+ provided, screenshots the main domain landing page. Only applicable when using
456+ 'domain', not 'directUrl'.
442457
443458 prioritize: Optional parameter to prioritize screenshot capture. If 'speed', optimizes for
444459 faster capture with basic quality. If 'quality', optimizes for higher quality
@@ -461,6 +476,7 @@ async def screenshot(
461476 timeout = timeout ,
462477 query = await async_maybe_transform (
463478 {
479+ "direct_url" : direct_url ,
464480 "domain" : domain ,
465481 "full_screenshot" : full_screenshot ,
466482 "page" : page ,
0 commit comments