Capture the dark version of a page you do not control
A site with a dark theme decides which one to show from a media query. Answering that query is all it takes.
dark_modemedia_typereduced_motionomit_backgroundcurl --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","dark_mode":true}' \
-o capture.jpgVerified 2026-08-13 by running the published code against a fixture.
Configure it in the playgroundWhat it does
- Emulates `prefers-color-scheme: dark` for the whole capture, so CSS, images with `<picture>` media conditions and canvas code all see the same answer.
- Is part of the cache key, so the light and dark captures of one URL are separate entries and never overwrite each other.
- Works on `/v1/take` and `/v1/animate` alike, because it is a property of the context rather than of the output format.
What it does not do
- Does not invert a site that has no dark theme. There is no filter here — a light-only page renders light, and that is the honest result.
- Does not click a theme toggle. A site that stores the choice in localStorage needs `scripts` to seed it.
- Does not change the media type. Print styles are `media_type`, and the two are independent.
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.
| Parameter | Type | Default | Range | Endpoints | Cache key |
|---|---|---|---|---|---|
dark_modeEmulate `prefers-color-scheme: dark`. | boolean | false | — | /v1/take, /v1/animate | In |
media_typeCSS media type to emulate. | enum | screen | — | /v1/take, /v1/animate | In |
reduced_motionEmulate `prefers-reduced-motion: reduce`. | boolean | false | — | /v1/take, /v1/animate | In |
omit_backgroundRender with a transparent background where the format supports alpha. | boolean | false | — | /v1/take | In |
How it behaves next to the rest of the request
media_typeCSS media type to emulate.
`screen` or `print`, independent of the colour scheme. A page can have a dark screen theme and a light print stylesheet, and you can request either combination.
reduced_motionEmulate `prefers-reduced-motion: reduce`.
The other emulated preference. Together they describe a visitor who wants a dark, still page — usually exactly the visitor a marketing capture should represent.
omit_backgroundRender with a transparent background where the format supports alpha.
For a transparent capture, the theme still decides the colour of everything that is not the background. Both parameters apply to the same render.
Errors this option can produce
None of them is billable. No error code in the catalog is.
Related capabilities
All capabilities100 successful captures a month, every feature unlocked, no card.
Get an API keyPageCapture Engineering · reviewed by PageCapture API maintainers · Verified 2026-08-13 by running the published code against a fixture.