Ads, trackers and chat

Drop ad, tracker and chat requests before the page renders

An ad slot is not just visual noise: it is a request the page waits for. Blocking it at the network layer removes the pixels and the wait at once.

block_adsblock_trackersblock_chatsblock_requestsblock_resources
curl --fail-with-body "https://api.pagecapture.dev/v1/take" \
  -H "X-Access-Key: $PAGECAPTURE_KEY" \
  -H "Content-Type: application/json" \
  --data '{"url":"https://example.com","format":"jpg","block_ads":true,"block_trackers":true,"block_chats":true}' \
  -o capture.jpg

Verified 2026-08-13 by running the published code against a fixture.

Configure it in the playground
What you are seeing

Captures of the same page differ run to run, and the slow ones spend their budget on hosts that have nothing to do with your content.

Why the page does that

Ad and analytics scripts are third-party, unpredictable and often the last thing to settle. With `wait_until=networkidle0` they can hold a capture open until the timeout.

What it does

  • Blocks requests to 20 ad networks, 30 analytics and tracking hosts and 17 chat providers, by domain, before the request leaves the browser.
  • Removes chat widgets from the layout as well as from the network, so a floating bubble does not survive in the corner of the image.
  • Takes `block_requests` for your own glob patterns and `block_resources` for whole resource types.

What it does not do

  • Is not an ad blocker with thousands of rules. The lists are short on purpose: nobody here can audit a list inherited from a browser extension, and one wrong rule breaks a customer's page.
  • Does not block first-party analytics served from your own domain — a blocklist is by host, and your host is not on it.
  • Does not change what the page believes: a site that gates content on a tracker loading will behave as it does when that tracker fails.
The contract

Every limit on this page is the one the API enforces

These rows are read from the same parameter table that validates your request. Nothing here is transcribed, so a number cannot drift from the behaviour it describes.

ParameterTypeDefaultRangeEndpointsCache key
block_ads

Block ad networks.

booleanfalse/v1/take, /v1/animateIn
block_trackers

Block analytics and tracking requests.

booleanfalse/v1/take, /v1/animateIn
block_chats

Remove live chat widgets.

booleanfalse/v1/take, /v1/animateIn
block_requests

Glob patterns or domains to block.

string[]/v1/take, /v1/animateIn
block_resources

Resource types to block.

string[]/v1/take, /v1/animateIn
Group: BlockingValues outside a documented range are rejected before a browser opens.

How it behaves next to the rest of the request

block_resources

Resource types to block.

Accepts a closed vocabulary of resource types — document, stylesheet, image, media, font, script, texttrack, xhr, fetch, eventsource, websocket, manifest, other. A value outside it is rejected at validation rather than silently ignored.

wait_until

Navigation state to wait for. `networkidle0` waits for zero in-flight requests, `networkidle2` for at most two.

Blocking is what makes `networkidle0` usable on a commercial page. Requests that would never settle are never made, so the idle condition can actually be reached.

cache

Serve and store this capture from the cache. Cache hits are never charged.

The blocklist version is part of the engine manifest and therefore part of the cache key: adding a rule invalidates the entries it would have changed instead of serving yesterday's image.

Questions this raises

Will blocking trackers break the page?

It can, and that is worth knowing before you turn it on: a page that waits for an analytics callback before rendering will render as it does when that host is unreachable. Capture once with and once without if the page is not yours.

Can I block one specific host?

Yes — `block_requests` takes glob patterns and domains, and it is additive to the built-in lists rather than a replacement for them.

Does blocking make the capture cheaper?

It does not change the price. One successful, non-cached capture is one credit regardless of how many requests it made.