Screenshot API Options
Screenshots are highly configurable to suit nearly any need.
In addition to the standard options below, you can also use the multi_step_actions option described in more detail here.
Basic Setup
| Field | Type | Default | Description |
|---|---|---|---|
| url | Text | None | The URL you would like to capture. For example: https://wikipedia.com |
| time_zone | Text | null | Emulate how a web page behaves and displays content in a set time zone. The value for the time_zone field must be a supported ICU programmatic timezone ID (e.g. "US/Eastern", "Europe/Berlin", "Asia/Tokyo", "America/Sao_Paulo", "Pacific/Auckland"). You can find the latest full list of timezone IDs in this Unicode txt document, or for a quicker reference, see this Wikipedia article. |
| selectors | Text | None | Capture only a specific element on a web page by providing a CSS Selector that identifies the element. Note: Accepts a single CSS Selector. |
| hover_on_selected | Boolean (true or false) | false | Requires selectors field. Displays available :hover styles on the element identified by the selectors field when set to true. |
Real Locations
| Field | Type | Default | Description |
|---|---|---|---|
| real_location | Text | false | See details and an example in this section. Set the real_location parameter to a supported city, country, or US state to take screenshots from that geographical location through a proxy network. |
| custom_proxy_id | Number | None | The id of a proxy stored on your account (see |
Waiting
| Field | Type | Default | Description |
|---|---|---|---|
| wait | Number | 1500 | The number of milliseconds to wait before capturing the screenshot. Max is: 20000 |
| wait_for | Text | None | Provide a CSS selector that should appear on the page before the screenshot is captured. For example: #id-to-wait-for |
| incremental_scroll | Boolean (true or false) | false | Slowly scrolls to trigger content that only loads when a user scrolls (lazy-loaded). Note: May take up to 10 seconds to complete. |
Page Setup
| Field | Type | Default | Description |
|---|---|---|---|
| fullpage | Boolean (true or false) | false | Scrolls and captures the entire web page when set to true. |
| fullpage_advanced | Boolean (true or false) | false | Captures the entire web page using a more advanced algorithm. Useful for pages with lazy-loaded content or when the standard fullpage option doesn’t produce the desired result. Note: This option takes a longer time to process vs fullpage. |
| page_width | Number | 1920 | Width of the viewport when the screenshot is taken. Default is 1920 (pixels). Use this option to emulate different mobile and desktop device dimensions. |
| page_height | Number | 1000 | Height of the viewport when the screenshot is taken. Default is 1000 (pixels). Use this option to emulate different mobile and desktop device dimensions. |
Image Settings
| Field | Type | Default | Description |
|---|---|---|---|
| image_format | Text | jpeg | Generate screenshots in jpeg, png, webp, or pdf formats. |
| placeholder_url | Text | https://cdn.pagepixels.com/placeholder.png | The image at the provided URL will be displayed until the first screenshot is captured. The provided URL should return an image. |
| quality | Number | 100 | Quality defines the JPEG compression, where 1 produces the lowest quality image and 100 creates the highest quality image. The higher the quality, the larger the image will be. This setting is ignored if you are producing a PNG or WebP image. |
| scale_factor | Text | 1 | Scale factor 2 produces a Retina display scaled image. |
CSS Injection
| Field | Type | Default | Description |
|---|---|---|---|
| css_inject | Text | None | Inject any CSS declarations you need into the page. |
Javascript Injection
| Field | Type | Default | Description |
|---|---|---|---|
| js_inject | Text | None | Inject any Javascript you need on the page. |
AI Analysis
| Field | Type | Default | Description |
|---|---|---|---|
| analyze_image_with_ai | Boolean (true or false) | false | Set this field to true to enable AI image analysis. When enabled, the AI will process the image and provide insights based on the provided ai_prompt. |
| ai_prompt | Text | None | A text prompt that guides the AI in analyzing the image. This prompt should specify what information you want the AI to extract or explain. Examples include:
|
| ai_provider | Text | pagepixels | Which AI provider analyzes the screenshot. |
| ai_model | Text | None | The model id to use with your own provider. Required for |
| ai_prompt_mode | Text | simple |
|
| ai_structured_instructions | Text | None | Optional context for a structured analysis, for example This is an e-commerce product page. Only used when |
| ai_structured_fields | Text | None | The fields to extract, as a JSON array (or a JSON string on GET requests). Each field has a [{"name":"page_loaded","type":"boolean","description":"Did the page render without errors?"},{"name":"status","type":"enum","options":["ok","warning","broken"]},{"name":"issues","type":"multi","options":["layout broken","missing images","error message"]}] |
Custom Headers
| Field | Type | Default | Description |
|---|---|---|---|
| headers | Text | None | Add additional HTTP headers to your request. |
Custom Cookies
| Field | Type | Default | Description |
|---|---|---|---|
| cookies | Text | None | Add custom cookies to your request. |
Language, Location, and User Agent
| Field | Type | Default | Description |
|---|---|---|---|
| accept_language | Text | None | Instruct the browser to ask the website to display a specific language. This is great for websites that support multiple languages. |
| user_agent | Text | None | Give user device information to the browser. This can be useful for emulating different devices. |
| latitude | Text | None | Provide latitude location information to the browser. |
| longitude | Text | None | Provide longitude location information to the browser. |
| accuracy | Number | None | Provide accuracy location information to the browser. |
Ads, Tracking, and Javascript
| Field | Type | Default | Description |
|---|---|---|---|
| no_ads | Boolean (true or false) | false | Ads are not blocked by default. To block Ads, set this option to true. |
| no_tracking | Boolean (true or false) | false | Tracking is not blocked by default. To stop tracking scripts from running, set this option to true. |
| no_cookie_banners | Boolean (true or false) | false | Cookie consent banners are not removed by default. To hide cookie consent banners, set this option to true. |
| disable_js | Boolean (true or false) | false | Javascript is enabled by default. To disable all javascript, set this option to true. |
| disable_third_party_js | Boolean (true or false) | false | To discard Javascript resources from outside of the requested domain, set this option to true. This can help speed up load times, improve performance, and reduce the risk of a timeout. |
Screenshot Configuration Information
| Field | Type | Default | Description |
|---|---|---|---|
| custom_title | Text | None | Add a custom title to your screenshot configuration |
| custom_description | Text | None | Add a custom description to your screenshot configuration. |
Support
Questions? Contact us anytime by email:
support-tickets@pagepixels.com
Or send us a message through our Support page.