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 timezone. 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 | Accepts a single CSS Selector. Use this option to capture a specific element on the web page identified by the CSS Selector you provide (instead of capturing the immediate window). |
| hover_on_selected | Boolean (true or false) | false | Gives you the ability to display :hover styles on the element identified by the selectors field. |
AI Analysis
| Field | Type | Default | Description |
|---|---|---|---|
| analyze_image_with_ai | Boolean (true or false) | false | |
| ai_prompt | Text | None | |
| 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"]}] |
Real Locations
| Field | Type | Default | Description |
|---|---|---|---|
| real_location | Text | None | Set the real_location parameter to a supported city, country, or US state to take screenshots from that geographical location. For more details and an example, see this section. |
| 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 | Set to true to scroll and capture the entire web page. |
| 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 | This is the width of the browser when the screenshot is taken. |
| page_height | Text | 1000 | This is the height of the browser when the screenshot is taken. |
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 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. |
Custom Headers
| Field | Type | Default | Description |
|---|---|---|---|
| headers | Text | None |
Custom Cookies
| Field | Type | Default | Description |
|---|---|---|---|
| cookies | Text | None |
Language, Coordinates, 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. You can learn more about this setting here: |
| user_agent | Text | None | Give the browser additional information about the type of device that is connecting to the website. You can learn more about the User Agent setting here: |
| latitude | Text | None | Provide location information to the browser. You can learn more about the latitude, longitude, and accuracy configuration settings here: |
| longitude | Text | None | Provide location information to the browser. You can learn more about the latitude, longitude, and accuracy configuration settings here: |
| accuracy | Number | None | Provide location information to the browser. You can learn more about the latitude, longitude, and accuracy configuration settings here: |
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 block trackers, set to true. |
| no_cookie_banners | Boolean (true or false) | false | Cookie consent banners are not removed by default. To remove cookie consent banners, set to true. |
| disable_js | Boolean (true or false) | false | Javascript is enabled by default. To disable all javascript, set to true. |
| disable_third_party_js | Boolean (true or false) | false |
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.