@@ -2244,7 +2244,8 @@ def retrieve_simplified(
22442244 def screenshot (
22452245 self ,
22462246 * ,
2247- domain : str ,
2247+ direct_url : str | Omit = omit ,
2248+ domain : str | Omit = omit ,
22482249 full_screenshot : Literal ["true" , "false" ] | Omit = omit ,
22492250 page : Literal ["login" , "signup" , "blog" , "careers" , "pricing" , "terms" , "privacy" , "contact" ] | Omit = omit ,
22502251 prioritize : Literal ["speed" , "quality" ] | Omit = omit ,
@@ -2259,10 +2260,15 @@ def screenshot(
22592260
22602261 Supports both viewport (standard browser
22612262 view) and full-page screenshots. Can also screenshot specific page types (login,
2262- pricing, etc.) by using heuristics to find the appropriate URL. Returns a URL to
2263- the uploaded screenshot image hosted on our CDN.
2263+ pricing, etc.) by using heuristics to find the appropriate URL. Either 'domain'
2264+ or 'directUrl' must be provided as a query parameter, but not both. Returns a
2265+ URL to the uploaded screenshot image hosted on our CDN.
22642266
22652267 Args:
2268+ direct_url: A specific URL to screenshot directly, bypassing domain resolution (e.g.,
2269+ 'https://example.com/pricing'). When provided, the screenshot is taken of this
2270+ exact URL.
2271+
22662272 domain: Domain name to take screenshot of (e.g., 'example.com', 'google.com'). The
22672273 domain will be automatically normalized and validated.
22682274
@@ -2273,7 +2279,8 @@ def screenshot(
22732279 page: Optional parameter to specify which page type to screenshot. If provided, the
22742280 system will scrape the domain's links and use heuristics to find the most
22752281 appropriate URL for the specified page type (30 supported languages). If not
2276- provided, screenshots the main domain landing page.
2282+ provided, screenshots the main domain landing page. Only applicable when using
2283+ 'domain', not 'directUrl'.
22772284
22782285 prioritize: Optional parameter to prioritize screenshot capture. If 'speed', optimizes for
22792286 faster capture with basic quality. If 'quality', optimizes for higher quality
@@ -2296,6 +2303,7 @@ def screenshot(
22962303 timeout = timeout ,
22972304 query = maybe_transform (
22982305 {
2306+ "direct_url" : direct_url ,
22992307 "domain" : domain ,
23002308 "full_screenshot" : full_screenshot ,
23012309 "page" : page ,
@@ -4733,7 +4741,8 @@ async def retrieve_simplified(
47334741 async def screenshot (
47344742 self ,
47354743 * ,
4736- domain : str ,
4744+ direct_url : str | Omit = omit ,
4745+ domain : str | Omit = omit ,
47374746 full_screenshot : Literal ["true" , "false" ] | Omit = omit ,
47384747 page : Literal ["login" , "signup" , "blog" , "careers" , "pricing" , "terms" , "privacy" , "contact" ] | Omit = omit ,
47394748 prioritize : Literal ["speed" , "quality" ] | Omit = omit ,
@@ -4748,10 +4757,15 @@ async def screenshot(
47484757
47494758 Supports both viewport (standard browser
47504759 view) and full-page screenshots. Can also screenshot specific page types (login,
4751- pricing, etc.) by using heuristics to find the appropriate URL. Returns a URL to
4752- the uploaded screenshot image hosted on our CDN.
4760+ pricing, etc.) by using heuristics to find the appropriate URL. Either 'domain'
4761+ or 'directUrl' must be provided as a query parameter, but not both. Returns a
4762+ URL to the uploaded screenshot image hosted on our CDN.
47534763
47544764 Args:
4765+ direct_url: A specific URL to screenshot directly, bypassing domain resolution (e.g.,
4766+ 'https://example.com/pricing'). When provided, the screenshot is taken of this
4767+ exact URL.
4768+
47554769 domain: Domain name to take screenshot of (e.g., 'example.com', 'google.com'). The
47564770 domain will be automatically normalized and validated.
47574771
@@ -4762,7 +4776,8 @@ async def screenshot(
47624776 page: Optional parameter to specify which page type to screenshot. If provided, the
47634777 system will scrape the domain's links and use heuristics to find the most
47644778 appropriate URL for the specified page type (30 supported languages). If not
4765- provided, screenshots the main domain landing page.
4779+ provided, screenshots the main domain landing page. Only applicable when using
4780+ 'domain', not 'directUrl'.
47664781
47674782 prioritize: Optional parameter to prioritize screenshot capture. If 'speed', optimizes for
47684783 faster capture with basic quality. If 'quality', optimizes for higher quality
@@ -4785,6 +4800,7 @@ async def screenshot(
47854800 timeout = timeout ,
47864801 query = await async_maybe_transform (
47874802 {
4803+ "direct_url" : direct_url ,
47884804 "domain" : domain ,
47894805 "full_screenshot" : full_screenshot ,
47904806 "page" : page ,
0 commit comments