 // PRODUCT

# Screenshot API for protected web pages

 Capture any web page with pixel-perfect images through real Chromium, with viewport control, wait conditions, CSS injection, and full anti-bot bypass in one call.

##  Real browsers on every capture. Anti-bot bypass built in. 

- **Clean, ad-free screenshots.** Block cookie banners, ads, and overlays with built-in page modification options before the shutter fires.
- **Capture on your terms.** Full page, above-fold, specific element by CSS or XPath selector, custom viewport and DPR, PNG/JPEG/WebP/GIF output.
 
 [ Get Free API Key ](https://scrapfly.io/register) [ Developer Docs ](https://scrapfly.io/docs/screenshot-api/getting-started) 

 1,000 free credits. No credit card required. [  ](https://www.capterra.com/p/212653/Scrapfly/reviews/)  

 4.8/5 from 248 reviews 

 

 

 

 



 

 

 

 



 

---

Trusted by data teams worldwide

  NA North America 

- 
- 
- 
- 
- 
- 
- 
- 
- 
- SpaceX
- 
- 
 

- 
- 
- 
- 
- 
- 
- 
- 
- 
- SpaceX
- 
- 
 
 

 

 

  LATAM Latin America 

- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
 

- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
 
 

 

 

  EMEA Europe, Middle East, Africa 

- 
- 
- QatarEnergy
- 
- 
- Volkswagen
- 
- 
- 
- 
- 
- 
 

- 
- 
- QatarEnergy
- 
- 
- Volkswagen
- 
- 
- 
- 
- 
- 
 
 

 

 

  APAC Asia-Pacific 

- 
- 
- Petronas
- 
- Toyota
- 
- 
- 
- 
- 
- Mitsubishi
 

- 
- 
- Petronas
- 
- Toyota
- 
- 
- 
- 
- 
- Mitsubishi
 
 

 

 

 

## 55k+

developers using Scrapfly APIs

 



 

## 98%

capture success on blocked targets

 



 

## 4

output formats: PNG, JPEG, WebP, GIF

 



 

## 1s

typical capture time from browser pool

 



 

 

 

---

 CAPABILITIES

## Every Capture Scenario Covered

Viewport, wait conditions, page modifications, schedules, anti-bot bypass. All composable on one endpoint.

 

 

### Capture Pipeline

Every request flows through a composable capture pipeline. Anti-bot bypass, ad removal, JS scenarios, and format optimization activate only when you set the relevant parameter. Unused layers add zero latency.

  **Real Browser (Scrapium)** full Chromium render, JS execution, lazy-load forced via auto\_scroll 

 

  **Ad-block + Banner Dismiss** block\_banners preset removes cookie popups, overlays, and ads before shutter fires 

 

  **JS Scenario** click, fill, scroll, wait\_for\_selector, wait\_until - execute before capture 

 

  **Capture** full\_page, viewport, or CSS/XPath element selector - custom width, height, DPR 

 

  **Optimize** JPEG captured natively, PNG/WebP/GIF re-encoded from it 

 

  **Deliver** image bytes in response or cached URL via log\_url, configurable TTL up to 7 days 

 

 

  **4 formats** PNG, JPEG, WebP, GIF 

  **Any viewport** desktop, tablet, mobile 

  **Full page** scroll-to-bottom auto 

  **0 credits** on failed capture 

 

[View Screenshot API docs →](https://scrapfly.io/docs/screenshot-api/getting-started)

 



 

 

 

### Wait Conditions

Capture the page at exactly the right moment. Wait for a CSS selector to appear, for network activity to go idle, or hold for a fixed rendering delay in milliseconds before the shutter fires.

  **Selector** wait\_for\_selector 

  **Network idle** wait\_until 

  **Fixed ms** rendering\_wait 

 

networkidle

domcontentloaded

wait\_for\_selector

rendering\_wait

 

 



 

 

### Page Modifications Before Capture

Inject custom CSS to hide cookie banners, ads, and overlays before capture. Use the `options` parameter with built-in presets like `block_banners` and `dark_mode`, or supply your own stylesheet. Run any JS scenario step - click, fill a form field, scroll to position - before the shutter fires.

  **Block banners** cookie popups, ads 

  **Dark mode** built-in preset 

  **Custom CSS** hide any element 

  **JS scenario** click, fill, scroll 

 

block\_banners

dark\_mode

custom CSS inject

click

fill

scroll

 

 



 

 

 

### Anti-Bot Bypass

Add `unblocker=true` and the same bypass engine powering the Web Scraping API handles Cloudflare, DataDome, Akamai, and more. TLS fingerprint, JS challenges, and behavioral signals are solved server-side before the screenshot is taken. No extra code on your end.

  **JA3/JA4** TLS fingerprint 

  **HTTP/2** SETTINGS frame 

  **Behavioral** mouse + scroll 

  **Free retries** challenges don't cost 

 

 [Cloudflare](https://scrapfly.io/bypass/cloudflare) 

 [DataDome](https://scrapfly.io/bypass/datadome) 

 [Akamai](https://scrapfly.io/bypass/akamai) 

 [PerimeterX](https://scrapfly.io/bypass/perimeterx) 

 [Kasada](https://scrapfly.io/bypass/kasada) 

 [Imperva](https://scrapfly.io/bypass/incapsula) 

 [F5](https://scrapfly.io/bypass/f5) 

 [AWS WAF](https://scrapfly.io/bypass/aws-waf) 

 

[View full bypass catalog →](https://scrapfly.io/bypass)

 



 

 

 

### Viewport and Resolution Control

Set any width and height for the browser viewport before capture. Use `resolution` to pass custom dimensions. Set `dpr` for retina (2x/3x) output. Combine with `auto_scroll=true` to force lazy-loaded content into the frame. Preset device sizes cover desktop, tablet, and mobile without pixel math.

  **Desktop** 1280 x 720 default 

  **Tablet** 768 x 1024 

  **Mobile** 375 x 812 

  **2x / 3x DPR** retina output 

 

resolution param

dpr param

auto\_scroll

 

[View viewport docs →](https://scrapfly.io/docs/screenshot-api/getting-started)

 



 

 

### Output Formats

Four formats via the `format` parameter. JPEG is the default and the format the browser captures; PNG, WebP and GIF are re-encoded from that capture. All formats are returned as binary in the response body.

  **JPEG** native capture 

  **PNG** re-encoded 

  **WebP/GIF** compact 

 

png

jpeg

webp

gif

 

 



 

 

 

### Scheduled Captures

Pair a screenshot configuration with a cron recurrence and a webhook, and the Screenshot API captures the page on that schedule and delivers each result to your endpoint. Pause, resume, patch, or trigger a schedule on demand from the same API.

  **Cron** any interval 

  **Webhook** delivered per capture 

  **Retry** on failed captures 

  **Pause / resume** without recreating 

 

[View schedule docs →](https://scrapfly.io/docs/screenshot-api/schedule)

 



 

 

 

### Server-Side Cache

Cache captured images on Scrapfly infrastructure with a configurable TTL. Repeat requests return the stored image for 1 credit. The maximum TTL is 7 days.

**1**credit per cache hit

**7 days**max TTL

 

 



 

 

### Request Observability

Every capture returns a `log_url`. Inspect the full request timeline, rendered HTML, final URL after redirects, and load timings in the dashboard.

**log\_url**per capture

**Timeline**full trace

 

 



 

 

### Screenshot + Data in One Call

The Screenshot API is focused on image capture. For structured data from the same page in one call, the Web Scraping API supports `screenshots[name]=fullpage` alongside HTML extraction - data and image in a single request. For session-based workflows (login flows, multi-step navigation) before a capture, the Cloud Browser gives you a persistent Chromium session you drive directly.

 [Web Scraping API](https://scrapfly.io/products/web-scraping-api) 

 [Cloud Browser](https://scrapfly.io/products/cloud-browser-api) 

 

 



 

 

 

### Pay Only for Delivered Images

Failed captures don't consume credits. Timeouts, upstream errors, and bypass failures are free. Standard captures have a base price, and larger pages may cost extra. Set a project credit limit to cap what the project spends.

0credits on fail

**Project**credit limit

 

[View billing docs →](https://scrapfly.io/docs/screenshot-api/billing)

 



 

 

### Developer Tools

Test selector targeting before writing a single line of capture code. Verify the CSS or XPath expression you plan to pass to the `capture` parameter against a live page, then copy it straight into your API call.

 [Selector tester](https://scrapfly.io/web-scraping-tools/css-xpath-tester) 

 [JA3 fingerprint](https://scrapfly.io/web-scraping-tools/ja3-fingerprint) 

 [Device fingerprint](https://scrapfly.io/web-scraping-tools/device-fingerprint) 

 [All tools](https://scrapfly.io/web-scraping-tools) 

 

[Browse all developer tools →](https://scrapfly.io/web-scraping-tools)

 



 

 

 

---

 CODE

## Capture Any Page in Two Lines

Pick a capture style, pick a language. Real examples, real endpoints.

 

 [ Basic Capture ](#sa-strat-options) [ Wait Conditions ](#sa-strat-flow) [ Format + Quality ](#sa-strat-format) [ Viewport + DPR ](#sa-strat-resolution) [ Element Areas ](#sa-strat-areas) [ Caching ](#sa-strat-cache) [ Anti-Bot Bypass ](#sa-strat-bypass) 

Default JPEG capture of a page. All options optional.

     Python TypeScript HTTP / cURL  

    

```
from scrapfly import ScreenshotConfig, ScrapflyClient

client = ScrapflyClient(key="API KEY")

api_response = client.screenshot(
    ScreenshotConfig(
        url='https://web-scraping.dev/login?cookies',
        # use one of many modifiers to modify the page
        options=["block_banners"],
    )
)
client.save_screenshot(api_response, "sa_options")
```

```
import { 
    ScrapflyClient, ScreenshotConfig,
} from 'jsr:@scrapfly/scrapfly-sdk';

const client = new ScrapflyClient({ key: "API KEY" });

let api_result = await client.screenshot(
    new ScreenshotConfig({
        url: 'https://web-scraping.dev/reviews',
        // use one of many modifiers to modify the page
        options: ['block_banners']
    })
);

console.log(api_result.image);
```

```
http https://api.scrapfly.io/screenshot \
key==$SCRAPFLY_KEY \
url==https://web-scraping.dev/login?cookies \
options==block_banners
```

 

 

 [ Python SDK docs → ](https://scrapfly.io/docs/sdk/python) [ TypeScript SDK docs → ](https://scrapfly.io/docs/sdk/typescript) [ HTTP API docs → ](https://scrapfly.io/docs) 

 

Wait for a selector, network idle, or custom JS before capturing.

     Python TypeScript HTTP / cURL  

    

```
from scrapfly import ScreenshotConfig, ScrapflyClient

client = ScrapflyClient(key="API KEY")

api_response = client.screenshot(
    ScreenshotConfig(
        url='https://web-scraping.dev/reviews',
        # wait for specific element to appear
        wait_for_selector=".review",
        # or for a specific time
        rendering_wait=3000,  # 3 seconds
    )
)
client.save_screenshot(api_response, "sa_flow")
```

```
import { 
    ScrapflyClient, ScreenshotConfig,
} from 'jsr:@scrapfly/scrapfly-sdk';

const client = new ScrapflyClient({ key: "API KEY" });

let api_result = await client.screenshot(
    new ScreenshotConfig({
        url: 'https://web-scraping.dev/reviews',
        // for for specific element to appear
        wait_for_selector: ".review",
        // or for a specific time
        rendering_wait: 3000,  // 3 seconds
    })
);

console.log(api_result.image);
```

```
http https://api.scrapfly.io/screenshot \
key==$SCRAPFLY_KEY \
url==https://web-scraping.dev/reviews \
wait_for_selector==.review \
rendering_wait==3000
```

 

 

 [ Python SDK docs → ](https://scrapfly.io/docs/sdk/python) [ TypeScript SDK docs → ](https://scrapfly.io/docs/sdk/typescript) [ HTTP API docs → ](https://scrapfly.io/docs) 

 

PNG, JPEG, WebP, or GIF output. JPEG captured natively, the rest re-encoded.

     Python TypeScript HTTP / cURL  

    

```
from scrapfly import ScreenshotConfig, ScrapflyClient

client = ScrapflyClient(key="API KEY")

api_response = client.screenshot(
    ScreenshotConfig(
        url='https://web-scraping.dev/product/1',
        # directly capture in your file type
        format="jpg",
        # jpg, png, webp, gif etc.
    )
)
client.save_screenshot(api_response, "sa_format")
```

```
import { 
    ScrapflyClient, ScreenshotConfig,
} from 'jsr:@scrapfly/scrapfly-sdk';

const client = new ScrapflyClient({ key: "API KEY" });

let api_result = await client.screenshot(
    new ScreenshotConfig({
        url: 'https://web-scraping.dev/product/1',
        // directly capture in your file type
        format: "jpg", 
        // jpg, png, webp, gif etc.
    })
);

console.log(api_result.image);
```

```
http https://api.scrapfly.io/screenshot \
key==$SCRAPFLY_KEY \
url==https://web-scraping.dev/product/1 \
format==jpg
```

 

 

 [ Python SDK docs → ](https://scrapfly.io/docs/sdk/python) [ TypeScript SDK docs → ](https://scrapfly.io/docs/sdk/typescript) [ HTTP API docs → ](https://scrapfly.io/docs) 

 

Retina (2x/3x DPR), custom viewport dimensions, device pixel ratios.

     Python TypeScript HTTP / cURL  

    

```
from scrapfly import ScreenshotConfig, ScrapflyClient

client = ScrapflyClient(key="API KEY")

api_response = client.screenshot(
    ScreenshotConfig(
        url='https://web-scraping.dev/product/1',
        # set viewport resolution: desktop, mobile, tablet
        # resolution="1920x1080",  # desktop (default)
        # resolution="375x812",    # mobile
        resolution="1024x768",     # tablet
    )
)
client.save_screenshot(api_response, "sa_resolution")
```

```
import { 
    ScrapflyClient, ScreenshotConfig,
} from 'jsr:@scrapfly/scrapfly-sdk';

const client = new ScrapflyClient({ key: "API KEY" });

let api_result = await client.screenshot(
    new ScreenshotConfig({
        url: 'https://web-scraping.dev/product/1',
        // set viewport: desktop, mobile, or tablet
        // resolution: "1920x1080",  // desktop (default)
        // resolution: "375x812",    // mobile
        resolution: "1024x768",     // tablet
    })
);

console.log(api_result.image);
```

```
http https://api.scrapfly.io/screenshot \
key==$SCRAPFLY_KEY \
url==https://web-scraping.dev/product/1 \
resolution==1920x1080
```

 

 

 [ Python SDK docs → ](https://scrapfly.io/docs/sdk/python) [ TypeScript SDK docs → ](https://scrapfly.io/docs/sdk/typescript) [ HTTP API docs → ](https://scrapfly.io/docs) 

 

Full-page, viewport-only, or specific CSS-selector element capture.

     Python TypeScript HTTP / cURL  

    

```
from scrapfly import ScreenshotConfig, ScrapflyClient

client = ScrapflyClient(key="API KEY")

api_response = client.screenshot(
    ScreenshotConfig(
        url='https://web-scraping.dev/product/1',
        # use XPath or CSS selectors to tell what to screenshot
        capture='#reviews',
        # force scrolling to the bottom of the page to load all areas
        auto_scroll=True,
    )
)
client.save_screenshot(api_response, "sa_areas")
```

```
import { 
    ScrapflyClient, ScreenshotConfig,
} from 'jsr:@scrapfly/scrapfly-sdk';

const client = new ScrapflyClient({ key: "API KEY" });

let api_result = await client.screenshot(
    new ScreenshotConfig({
        url: 'https://web-scraping.dev/product/1',
        // use XPath or CSS selectors to tell what to screenshot
        capture: '#reviews',
        // force scrolling to the bottom of the page to load all areas
        auto_scroll: true,
    })
);

console.log(api_result.image);
```

```
http https://api.scrapfly.io/screenshot \
key==$SCRAPFLY_KEY \
url==https://web-scraping.dev/product/1 \
capture==#reviews \
auto_scroll==true
```

 

 

 [ Python SDK docs → ](https://scrapfly.io/docs/sdk/python) [ TypeScript SDK docs → ](https://scrapfly.io/docs/sdk/typescript) [ HTTP API docs → ](https://scrapfly.io/docs) 

 

Server-side cache with TTL. Repeat captures are free and instant.

     Python TypeScript HTTP / cURL  

    

```
from scrapfly import ScreenshotConfig, ScrapflyClient

client = ScrapflyClient(key="API KEY")

api_response = client.screenshot(
    ScreenshotConfig(
        url='https://web-scraping.dev/product/1',
        # enable cache
        cache=True,
        # optionally set expiration
        cache_ttl=3600, # 1 hour
        # or clear cache any time
        # cache_clear=True,
    )
)
client.save_screenshot(api_response, "sa_cache")
```

```
import { 
    ScrapflyClient, ScreenshotConfig,
} from 'jsr:@scrapfly/scrapfly-sdk';

const client = new ScrapflyClient({ key: "API KEY" });

let api_result = await client.screenshot(
    new ScreenshotConfig({
        url: 'https://web-scraping.dev/product/1',
        // enable cache
        cache: true,
        // optionally set expiration
        cache_ttl: 3600, // 1 hour
        // or clear cache any time
        // cache_clear: true,
    })
);

console.log(api_result.image);
```

```
http https://api.scrapfly.io/screenshot \
key==$SCRAPFLY_KEY \
url==https://web-scraping.dev/product/1 \
cache==true \
cache_ttl==3600
```

 

 

 [ Python SDK docs → ](https://scrapfly.io/docs/sdk/python) [ TypeScript SDK docs → ](https://scrapfly.io/docs/sdk/typescript) [ HTTP API docs → ](https://scrapfly.io/docs) 

 

Same `unblocker=true` flag bypasses protection before the capture. See the [bypass catalog](https://scrapfly.io/bypass).

     Python TypeScript HTTP / cURL  

    

```
from scrapfly import ScreenshotConfig, ScrapflyClient

client = ScrapflyClient(key="API KEY")

api_response = client.screenshot(
    ScreenshotConfig(
        url='https://web-scraping.dev/product/1',
        # auto anti-bot bypass, no extra configuration needed
    )
)
client.save_screenshot(api_response, "sa_bypass")
```

```
import { 
    ScrapflyClient, ScreenshotConfig,
} from 'jsr:@scrapfly/scrapfly-sdk';

const client = new ScrapflyClient({ key: "API KEY" });

let api_result = await client.screenshot(
    new ScreenshotConfig({
        url: 'https://web-scraping.dev/product/1',
        // auto anti-bot bypass, no extra configuration needed
    })
);

console.log(api_result.image);
```

```
http https://api.scrapfly.io/screenshot \
key==$SCRAPFLY_KEY \
url==https://web-scraping.dev/product/1
```

 

 

 [ Python SDK docs → ](https://scrapfly.io/docs/sdk/python) [ TypeScript SDK docs → ](https://scrapfly.io/docs/sdk/typescript) [ HTTP API docs → ](https://scrapfly.io/docs) 

 

 

 

---

 LEARN

## Docs, Tools, And Ready-Made Examples

Everything you need to go from first capture to production screenshot pipeline.

 

 

### API Reference

Every parameter, every response field, with runnable cURL examples for the screenshot endpoint.

 [ Developer Docs → ](https://scrapfly.io/docs/screenshot-api/getting-started) 



 

 

### Academy

Interactive courses on web scraping, anti-bot bypass, and browser automation.

 [ Start learning → ](https://scrapfly.io/academy) 



 

 

### Open-Source Examples

Production-ready screenshot scripts on GitHub. Copy, paste, and customize for your target.

 [ Explore repo → ](https://github.com/scrapfly/scrapfly-scrapers) 



 

 

### Developer Tools

Selector tester, cURL-to-Python converter, antibot detector, and more.

 [ Browse tools → ](https://scrapfly.io/web-scraping-tools) 



 

 

 

---

  // INTEGRATIONS

## Seamlessly integrate with frameworks &amp; platforms

Plug Scrapfly into your favorite tools, or build custom workflows with our first-class SDKs.

 

### No-code automation

 [  Zapier ](https://scrapfly.io/integration/zapier) [  Make ](https://scrapfly.io/integration/make) [  n8n ](https://scrapfly.io/integration/n8n) 

 

### Agent skills

 [  OpenClaw ](https://scrapfly.io/integration/openclaw) 

 

### LLM &amp; RAG frameworks

 [  LlamaIndex ](https://scrapfly.io/integration/llamaindex) [  LangChain ](https://scrapfly.io/integration/langchain) [  CrewAI ](https://scrapfly.io/integration/crewai) 

 

### First-class SDKs

 [  Python pip install scrapfly-sdk ](https://scrapfly.io/docs/sdk/python) [  TypeScript Node, Deno, Bun ](https://scrapfly.io/docs/sdk/typescript) [  Go go get github.com/scrapfly/go-scrapfly ](https://scrapfly.io/docs/sdk/golang) [  Rust cargo add scrapfly-sdk ](https://scrapfly.io/docs/sdk/rust) [  Scrapy Full-feature extension ](https://scrapfly.io/docs/sdk/scrapy) 

 

 

 [ See all integrations  ](https://scrapfly.io/integration) 

 

---

  FAQ

## Frequently Asked Questions

 

  

### What is the Scrapfly Screenshot API?

 

A hosted service that renders any URL in a real browser and returns the image. One API call delivers a PNG, JPEG, WebP, or GIF with no browser infrastructure to manage on your end. Anti-bot bypass, proxy rotation, and page modification are all available as parameters.

 

   

### How does anti-bot bypass work for screenshots?

 

The same bypass engine used in the Web Scraping API is available here. Set `unblocker=true` and the engine selects the right TLS fingerprint, browser profile, and proxy location for the target. Cloudflare, DataDome, Akamai, and PerimeterX challenges are solved server-side before the screenshot is taken.

 

   

### Can I capture only part of a page?

 

Yes. Use the `capture` parameter with a CSS selector or XPath expression and the API crops to that element. Combine with `auto_scroll=true` to force lazy content into view before capture.

 

   

### How do I remove cookie banners and ads from screenshots?

 

Pass `options=["block_banners"]` to activate the built-in banner blocker. For more control, inject custom CSS via the `custom_css` parameter to hide any element by selector before the shutter fires.

 

   

### What output formats are supported?

 

JPEG (default), PNG, WebP, and GIF are all available via the `format` parameter. The browser captures JPEG and the other three are re-encoded from it, so PNG is a lossless container around a lossy capture rather than a lossless capture.

 

   

### Can I schedule recurring captures?

 

Yes. Create a schedule through the Screenshot API with a screenshot configuration, a cron recurrence, and a webhook. Each capture is delivered to your webhook when it runs, and you can pause, resume, patch, or trigger the schedule on demand. See the [schedule docs](https://scrapfly.io/docs/screenshot-api/schedule).

 

   

### What happens if a capture fails?

 

Failed captures don't consume credits. Timeouts, upstream errors, and bypass failures are all free retries. Every response includes a `log_url` that opens the full request timeline in the dashboard so you can diagnose exactly what happened.

 

  

 

 

---

 // PRICING

## Transparent, usage-based pricing

A screenshot starts at 60 credits on standard plans, or costs 1 credit when served from cache.

**Free: $0 / 1,000 credits every month.** Paid plans from $30/mo for 200,000 credits.

 

  **Free tier**

Free credits cover about 16 screenshots per month. Discovery covers 3,333.

 

 

  **Pay on success**

Failed captures are always free. You only pay for delivered images.

 

 

  **No lock-in**

Upgrade, downgrade, or cancel anytime. No contract.

 

 

 

 [ See pricing  ](https://scrapfly.io/pricing) [ Start free ](https://scrapfly.io/register) 

 

 

### Need the full data pipeline? We unbundle the stack.

 The Screenshot API is focused on image capture. For structured data from the same pages, explore [Web Scraping API](https://scrapfly.io/products/web-scraping-api) for HTML and JSON with [anti-bot bypass](https://scrapfly.io/bypass), [Extraction API](https://scrapfly.io/products/extraction-api) for AI-powered structured output, [Browser API](https://scrapfly.io/products/cloud-browser-api) for hosted Playwright and Puppeteer, [Scrapium](https://scrapfly.io/scrapium) for stealth Chromium you drive directly, or [Curlium](https://scrapfly.io/curlium) for raw HTTP on Chrome's network stack.

 

 [Get Free API Key](https://scrapfly.io/register)1,000 free credits. No card.