@@ -445,6 +445,9 @@ def screenshot(
445445 * ,
446446 domain : str ,
447447 full_screenshot : Literal ["true" , "false" ] | NotGiven = NOT_GIVEN ,
448+ page : Literal ["login" , "signup" , "blog" , "careers" , "pricing" , "terms" , "privacy" , "contact" ]
449+ | NotGiven = NOT_GIVEN ,
450+ prioritize : Literal ["speed" , "quality" ] | NotGiven = NOT_GIVEN ,
448451 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
449452 # The extra values given here take precedence over values defined on the client or passed to this method.
450453 extra_headers : Headers | None = None ,
@@ -455,8 +458,9 @@ def screenshot(
455458 """Beta feature: Capture a screenshot of a website.
456459
457460 Supports both viewport
458- (standard browser view) and full-page screenshots. Returns a URL to the uploaded
459- screenshot image hosted on our CDN.
461+ (standard browser view) and full-page screenshots. Can also screenshot specific
462+ page types (login, pricing, etc.) by using heuristics to find the appropriate
463+ URL. Returns a URL to the uploaded screenshot image hosted on our CDN.
460464
461465 Args:
462466 domain: Domain name to take screenshot of (e.g., 'example.com', 'google.com'). The
@@ -466,6 +470,15 @@ def screenshot(
466470 screenshot capturing all content. If 'false' or not provided, takes a viewport
467471 screenshot (standard browser view).
468472
473+ page: Optional parameter to specify which page type to screenshot. If provided, the
474+ system will scrape the domain's links and use heuristics to find the most
475+ appropriate URL for the specified page type (30 supported languages). If not
476+ provided, screenshots the main domain landing page.
477+
478+ prioritize: Optional parameter to prioritize screenshot capture. If 'speed', optimizes for
479+ faster capture with basic quality. If 'quality', optimizes for higher quality
480+ with longer wait times. Defaults to 'quality' if not provided.
481+
469482 extra_headers: Send extra headers
470483
471484 extra_query: Add additional query parameters to the request
@@ -485,6 +498,8 @@ def screenshot(
485498 {
486499 "domain" : domain ,
487500 "full_screenshot" : full_screenshot ,
501+ "page" : page ,
502+ "prioritize" : prioritize ,
488503 },
489504 brand_screenshot_params .BrandScreenshotParams ,
490505 ),
@@ -496,6 +511,7 @@ def styleguide(
496511 self ,
497512 * ,
498513 domain : str ,
514+ prioritize : Literal ["speed" , "quality" ] | NotGiven = NOT_GIVEN ,
499515 timeout_ms : int | NotGiven = NOT_GIVEN ,
500516 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
501517 # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -513,6 +529,11 @@ def styleguide(
513529 domain: Domain name to extract styleguide from (e.g., 'example.com', 'google.com'). The
514530 domain will be automatically normalized and validated.
515531
532+ prioritize: Optional parameter to prioritize screenshot capture for styleguide extraction.
533+ If 'speed', optimizes for faster capture with basic quality. If 'quality',
534+ optimizes for higher quality with longer wait times. Defaults to 'speed' if not
535+ provided.
536+
516537 timeout_ms: Optional timeout in milliseconds for the request. If the request takes longer
517538 than this value, it will be aborted with a 408 status code. Maximum allowed
518539 value is 300000ms (5 minutes).
@@ -535,6 +556,7 @@ def styleguide(
535556 query = maybe_transform (
536557 {
537558 "domain" : domain ,
559+ "prioritize" : prioritize ,
538560 "timeout_ms" : timeout_ms ,
539561 },
540562 brand_styleguide_params .BrandStyleguideParams ,
@@ -949,6 +971,9 @@ async def screenshot(
949971 * ,
950972 domain : str ,
951973 full_screenshot : Literal ["true" , "false" ] | NotGiven = NOT_GIVEN ,
974+ page : Literal ["login" , "signup" , "blog" , "careers" , "pricing" , "terms" , "privacy" , "contact" ]
975+ | NotGiven = NOT_GIVEN ,
976+ prioritize : Literal ["speed" , "quality" ] | NotGiven = NOT_GIVEN ,
952977 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
953978 # The extra values given here take precedence over values defined on the client or passed to this method.
954979 extra_headers : Headers | None = None ,
@@ -959,8 +984,9 @@ async def screenshot(
959984 """Beta feature: Capture a screenshot of a website.
960985
961986 Supports both viewport
962- (standard browser view) and full-page screenshots. Returns a URL to the uploaded
963- screenshot image hosted on our CDN.
987+ (standard browser view) and full-page screenshots. Can also screenshot specific
988+ page types (login, pricing, etc.) by using heuristics to find the appropriate
989+ URL. Returns a URL to the uploaded screenshot image hosted on our CDN.
964990
965991 Args:
966992 domain: Domain name to take screenshot of (e.g., 'example.com', 'google.com'). The
@@ -970,6 +996,15 @@ async def screenshot(
970996 screenshot capturing all content. If 'false' or not provided, takes a viewport
971997 screenshot (standard browser view).
972998
999+ page: Optional parameter to specify which page type to screenshot. If provided, the
1000+ system will scrape the domain's links and use heuristics to find the most
1001+ appropriate URL for the specified page type (30 supported languages). If not
1002+ provided, screenshots the main domain landing page.
1003+
1004+ prioritize: Optional parameter to prioritize screenshot capture. If 'speed', optimizes for
1005+ faster capture with basic quality. If 'quality', optimizes for higher quality
1006+ with longer wait times. Defaults to 'quality' if not provided.
1007+
9731008 extra_headers: Send extra headers
9741009
9751010 extra_query: Add additional query parameters to the request
@@ -989,6 +1024,8 @@ async def screenshot(
9891024 {
9901025 "domain" : domain ,
9911026 "full_screenshot" : full_screenshot ,
1027+ "page" : page ,
1028+ "prioritize" : prioritize ,
9921029 },
9931030 brand_screenshot_params .BrandScreenshotParams ,
9941031 ),
@@ -1000,6 +1037,7 @@ async def styleguide(
10001037 self ,
10011038 * ,
10021039 domain : str ,
1040+ prioritize : Literal ["speed" , "quality" ] | NotGiven = NOT_GIVEN ,
10031041 timeout_ms : int | NotGiven = NOT_GIVEN ,
10041042 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
10051043 # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -1017,6 +1055,11 @@ async def styleguide(
10171055 domain: Domain name to extract styleguide from (e.g., 'example.com', 'google.com'). The
10181056 domain will be automatically normalized and validated.
10191057
1058+ prioritize: Optional parameter to prioritize screenshot capture for styleguide extraction.
1059+ If 'speed', optimizes for faster capture with basic quality. If 'quality',
1060+ optimizes for higher quality with longer wait times. Defaults to 'speed' if not
1061+ provided.
1062+
10201063 timeout_ms: Optional timeout in milliseconds for the request. If the request takes longer
10211064 than this value, it will be aborted with a 408 status code. Maximum allowed
10221065 value is 300000ms (5 minutes).
@@ -1039,6 +1082,7 @@ async def styleguide(
10391082 query = await async_maybe_transform (
10401083 {
10411084 "domain" : domain ,
1085+ "prioritize" : prioritize ,
10421086 "timeout_ms" : timeout_ms ,
10431087 },
10441088 brand_styleguide_params .BrandStyleguideParams ,
0 commit comments