Return to Blog List
Customizing Screenshot Parameters
API

Customizing Screenshot Parameters

April 26, 2025
7 min read

One of the most powerful features of our Screenshot API is the ability to customize exactly how your screenshots are captured. From viewport dimensions to timing controls, our API gives you precise control over the output.

Basic Parameters

Let's start with the essential parameters:

  • url: The target website URL to capture
  • width and height: Define the viewport dimensions
  • fullPage: Capture the entire page, not just the viewport
  • format: Output format (PNG, JPEG, or PDF)

Advanced Timing Controls

Websites with dynamic content require careful timing:

  • delay: Wait a specific number of milliseconds before capturing
  • waitForElement: Wait until a specific DOM element appears
  • waitForEvent: Wait for a specific event (like page load or network idle)

Example: E-commerce Product Screenshot

Here's how to capture a product page with specific dimensions and waiting for all content to load:

javascript
01const response = await fetch('https://api.screenshotapi.com/capture', {
02 method: 'POST',
03 headers: {
04 'Content-Type': 'application/json',
05 'Authorization': 'Bearer YOUR_API_KEY'
06 },
07 body: JSON.stringify({
08 url: 'https://example-store.com/products/item-123',
09 width: 1200,
10 height: 800,
11 format: 'png',
12 waitForEvent: 'networkidle0',
13 delay: 500
14 })
15});

CSS Selectors and Element Capture

Need only a specific part of a page? Use CSS selectors:

  • selector: Capture only the matching element
  • hideSelectors: Hide specific elements before capturing
  • removeSelectors: Remove elements from the DOM before capturing

By mastering these parameters, you can ensure your screenshots capture exactly what you need, every time.

CustomizationParameters

Ready to Get Started?

Get your API key now and start capturing screenshots in minutes.