GET 25 FREE SCREENSHOTS PER MONTH  →
API REFERENCE

Screenshot API Options

Every option the Screenshot API accepts, in one place: the field, its type, its default and what it does. Pass any of them as parameters in your URL or POST body.

BASE URL https://api.pagepixels.com
GET YOUR FREE API KEY →

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 PUT /proxies). The capture is routed through that proxy instead of the PagePixels network, so no Real Location bandwidth is used. Requires the Bring Your Own Proxy addon. Replaces real_location when both are given.

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:
  • "Extract the business's current rating from this page."
  • "Analyze the branding elements present in the image."
  • "Identify the target audience based on the marketing material."
  • "Summarize the key marketing message conveyed in the image."
ai_provider Text pagepixels

Which AI provider analyzes the screenshot. pagepixels (the default) uses your PagePixels AI Analysis credits. anthropic, openai and openrouter send the analysis to your own provider account using the API key you have stored with PUT /ai/providers/:provider, and require the Bring Your Own AI addon. Your PagePixels credits are never consumed when using your own provider.

ai_model Text None

The model id to use with your own provider. Required for openai and openrouter; optional for anthropic. Only vision-capable models that support structured outputs are accepted — list them with GET /ai/models?provider=…. Ignored when ai_provider is pagepixels.

ai_prompt_mode Text simple

simple (the default) sends ai_prompt and returns the answer as free text in ai.ai_response. structured ignores ai_prompt and instead returns a JSON object matching ai_structured_fields, available as ai.ai_structured_response (and JSON-encoded in ai.ai_response).

ai_structured_instructions Text None

Optional context for a structured analysis, for example This is an e-commerce product page. Only used when ai_prompt_mode is structured.

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 (letters, numbers, underscores), a type of string, number, boolean, enum (pick one) or multi (pick several), an optional description, and for enum/multi an options array. Up to 50 fields, up to 100 options each. Example:

[{"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.

Learn More about Accept Language

user_agent Text None

Give user device information to the browser. This can be useful for emulating different devices.

Learn More about User Agents

latitude Text None

Provide latitude location information to the browser.

Learn More about Latitude

longitude Text None

Provide longitude location information to the browser.

Learn More about Longitude

accuracy Number None

Provide accuracy location information to the browser.

Learn More about Accuracy

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:

Or send us a message through our Support page.

FREE PLAN

Start free. Upgrade when you’re ready.

Every feature and integration is included on the free plan. No credit card and no phone number required.

Free $0 / month
25 screenshots every month
32 MB of Real Location proxy bandwidth
25 AI Analysis credits