How to capture a full-page screenshot with CaptureKit
Capture an entire webpage with CaptureKit’s API using full_page=true, save the result, and handle lazy-loaded content and common capture issues.
To capture an entire webpage with CaptureKit’s API, send the target URL to its screenshot endpoint with full_page=true. The API key goes in the x-api-key header. If the page loads images or other content while scrolling, also set full_page_scroll=true. Full-page capture is off by default.
This guide covers the API workflow and a separate Chrome extension workflow. Use the API for repeatable, programmatic captures; use the extension when you want to capture and edit interactively in Chrome.
1. Get a CaptureKit API key and choose your workflow
CaptureKit documents API-key authorization through the x-api-key request header. Get a key through CaptureKit before making the API request. Check its official API reference for the current endpoint URL, request schema, defaults, and credit cost; these product details may change.
There are two distinct CaptureKit workflows:
- API: send a configured request, then fetch the screenshot URL returned by the API and save its bytes. This suits scripts and integrations.
- Chrome extension: capture and edit from the browser. The Chrome Web Store listing describes full-page scrolling and stitching, plus annotation and redaction. It is a separate local browser workflow; do not assume its features or defaults match the API.
2. Capture a full page with the API
Set full_page to true. The API reference describes that setting as capturing the whole page instead of only the visible viewport. Select an output format if PNG, the documented default, is not suitable. Supported formats listed in the reference are PNG, JPEG/JPG, WebP, and PDF.
The API returns a screenshot URL. Fetch that URL and save the response bytes. The following Python example shows the complete two-request pattern; replace the endpoint with the current screenshot endpoint from CaptureKit’s API reference and provide your API key.
import requests
API_KEY = "YOUR_CAPTUREKIT_API_KEY"
API_ENDPOINT = "CAPTUREKIT_SCREENSHOT_ENDPOINT"
PAGE_URL = "https://example.com"
# Request a full-page capture. Set full_page_scroll to true for pages
# whose content appears as the page scrolls.
response = requests.post(
API_ENDPOINT,
headers={"x-api-key": API_KEY},
json={
"url": PAGE_URL,
"full_page": True,
"full_page_scroll": True,
"format": "png",
},
timeout=90,
)
response.raise_for_status()
data = response.json()
# Use the screenshot URL field documented by the current API response schema.
screenshot_url = data["screenshot_url"]
image_response = requests.get(screenshot_url, timeout=90)
image_response.raise_for_status()
with open("full-page.png", "wb") as image_file:
image_file.write(image_response.content)
Important: the research material confirms the authorization header, request options, and returned-URL save pattern, but does not provide the endpoint URL or exact JSON response field name. Do not guess those values: copy them from CaptureKit’s current official API reference and substitute them for the placeholders above.
cURL request and download pattern
Use the documented endpoint and response field from the API reference. This pattern assumes the response contains a screenshot URL; replace SCREENSHOT_URL with that returned value.
curl -X POST "CAPTUREKIT_SCREENSHOT_ENDPOINT" \
-H "x-api-key: YOUR_CAPTUREKIT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com","full_page":true,"full_page_scroll":true,"format":"png"}'
curl -L "SCREENSHOT_URL" -o full-page.png
Node.js request and download pattern
This uses the built-in fetch API available in modern Node.js. Substitute the endpoint and response field from CaptureKit’s current reference.
const endpoint = "CAPTUREKIT_SCREENSHOT_ENDPOINT";
const apiKey = "YOUR_CAPTUREKIT_API_KEY";
const response = await fetch(endpoint, {
method: "POST",
headers: {
"x-api-key": apiKey,
"content-type": "application/json",
},
body: JSON.stringify({
url: "https://example.com",
full_page: true,
full_page_scroll: true,
format: "png",
}),
});
if (!response.ok) {
throw new Error(`Capture request failed: ${response.status} ${await response.text()}`);
}
const data = await response.json();
const imageResponse = await fetch(data.screenshot_url);
if (!imageResponse.ok) {
throw new Error(`Screenshot download failed: ${imageResponse.status}`);
}
const bytes = Buffer.from(await imageResponse.arrayBuffer());
await import("node:fs/promises").then(({ writeFile }) => writeFile("full-page.png", bytes));
3. Configure scrolling, dimensions, and timing
Full-page capture and scroll-before-capture solve different problems. full_page=true asks for the full document. full_page_scroll=true asks CaptureKit to scroll before capture, which can trigger content that loads on scroll. The API documents both as false by default. The documented default for full_page_scroll_duration is 400 milliseconds.
| Need | Setting or action | Documented default or note |
|---|---|---|
| Capture beyond the visible viewport | full_page=true |
Defaults to false. |
| Trigger scroll-loaded content | full_page_scroll=true |
Defaults to false. |
| Allow time for scrolling behavior | full_page_scroll_duration |
Defaults to 400 milliseconds. |
| Set the browser viewport | Viewport width and height | Defaults to 1280 × 1024. |
| Change output density | Scale factor | Defaults to 1. |
| Wait before capture | Delay | Defaults to zero seconds. |
| Wait for page readiness | Wait-until condition or wait-for-selector | Choose based on how the target page loads. |
| Choose the file type | PNG, JPEG/JPG, WebP, or PDF | PNG is the documented default. |
Use the exact parameter names and accepted values from the current API reference. A viewport controls the browser’s layout width and height; it does not guarantee that a site’s responsive layout or dynamically rendered content will behave identically for every URL.
Pages with lazy-loaded images or content
- Enable
full_page_scroll. - If content still appears late, increase the documented scroll duration or use a delay or wait condition supported by the API.
- When a specific section must exist before capture, use the documented wait-for-selector option with a selector for that section.
- Inspect the output for missing content. Lazy loading is page-specific, so enabling scrolling cannot guarantee that every site exposes all content to an automated browser.
4. Save the right output
CaptureKit’s API reference lists PNG, JPEG/JPG, WebP, and PDF. Choose based on how the result will be used:
- PNG: a lossless image option, useful when preserving sharp interface details matters.
- JPEG: useful when a smaller photographic image is preferred and lossy compression is acceptable.
- WebP: an alternative image format where the consuming system supports it.
- PDF: choose when the output should be a document rather than a raster image.
Save the bytes from the returned screenshot URL, and use a file extension that matches the chosen format. Do not treat the API’s response JSON as the image itself.
5. Use the Chrome extension for interactive capture
The CaptureKit Chrome Web Store listing describes an extension called CaptureKit – Full Page Screenshot & Annotate. Its listing describes full-page capture by scrolling and stitching, as well as visible-area, region, element, scrolling, and inner-scrollable-area capture modes. It also lists annotation, blur/pixelate/black-bar redaction, crop, and PNG/JPEG/PDF export, with processing local in the browser.
Use the extension when you want to select a capture region or edit and redact a result by hand. Use the API when you need code to request captures and save returned files. These are distinct workflows; the listing does not establish that extension options are available in the API.
6. Troubleshoot common capture problems
| Symptom | Likely cause | What to do |
|---|---|---|
| Unauthorized response | The API key is absent, invalid, or sent in the wrong place. | Send the key in the x-api-key header and check the current authorization instructions. |
| Only the visible viewport is captured | full_page was omitted or false. |
Set full_page=true. |
| Images or sections are missing | The page loads content as the browser scrolls, or capture starts before content is ready. | Enable full_page_scroll; adjust its duration or use a documented delay/wait condition. |
| Request succeeds but no local image appears | The API returned a screenshot URL, but the client did not fetch it. | Read the response schema, fetch the returned URL, and write those response bytes to disk. |
| Downloaded output cannot be opened | The requested format and filename extension differ, or the downloaded response is an error. | Match the extension to the selected format and check the download response status before saving. |
| Page differs from the expected layout | The viewport or scale differs from the target rendering conditions. | Set the documented viewport dimensions and scale explicitly, then capture again. |
| Capture is incomplete despite waiting | The page may require application-specific interactions or may not expose all content through scrolling. | Try a wait-for-selector for a known element and inspect the page’s own loading behavior. The available sources do not establish a universal fix. |
7. Performance, reliability, and cost
Full-page captures can take longer and produce larger files than viewport captures because more page content is rendered and included. Scrolling adds work, and longer waits trade response time for a better chance that delayed content is ready. Use only the viewport, scale, format, and waits required by the task; validate output dimensions and file size in your own workflow.
CaptureKit’s API reference lists one credit per call. Treat that as a documented current product detail and confirm it in the official reference before planning usage. The available sources do not provide a comparative benchmark or guarantee that every page’s lazy-loaded content will appear, so build error handling and inspect captures for important workflows.
8. Or skip the browser setup
ScreenshotNeo is a website screenshot API and MCP server. One GET request can return a PNG, JPEG, WebP, or PDF. For a full-page capture with lazy images loaded, use full_page=true. See the ScreenshotNeo API documentation for options and current parameter details.
curl -G "https://api.screenshotneo.com/v1/shot" \
-d access_key=YOUR_API_KEY \
--data-urlencode url=https://example.com \
-d full_page=true \
-o shot.webp
ScreenshotNeo removes cookie banners, newsletter popups, and chat widgets before the shot. Bot checks, blank pages, and failed loads are never billed. Its MCP server lets AI agents use screenshot tools. The free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000. Create a free ScreenshotNeo account.
9. Frequently asked questions
Does CaptureKit capture the whole page by default?
No. The API reference says full_page defaults to false, so set it to true.
Do I need both full-page options?
Use full_page=true for the full document. Add full_page_scroll=true when scrolling is needed to trigger content loading.
Can I save the API response directly as a PNG?
The documented playbook pattern fetches the screenshot URL returned by the API and writes those bytes to a file. Follow the current response schema rather than saving the metadata response as an image.
Is the Chrome extension the same as the screenshot API?
No. The extension listing describes an interactive local browser workflow; the API is a programmatic request workflow. The sources do not establish shared features or defaults.
Sources
- CaptureKit Capture (Screenshot) API reference for full-page options, formats, defaults, authorization, and credit cost.
- CaptureKit API playbook for fetching the returned screenshot URL and saving its bytes.
- CaptureKit Chrome Web Store listing for the extension workflow and listed editing features. Locate the current listing before publication because marketplace details can change.


