Crawler / Screenshot

Turn a website URL into a PNG screenshot.

Send a public URL to the screenshot API. Choose a full-page PNG or a shorter viewport PNG, then receive the stored image URL, final URL, status, and credits used. Text extraction requires a separate fetch or render request.

Choose capture length

Full page or visible viewport

Both modes return a stored PNG URL and the same response fields. Choose based on how much of the page a reviewer needs to see.

Default · 50 credits

Full-page PNG

full_page=true captures the scrollable page, including content below the initial viewport.

Use it for long pages, full layouts, or a record that needs more than the first screen.

Optional · 20 credits

Viewport PNG

full_page=false captures the visible browser viewport for a shorter image.

Use it when the opening screen is enough for a quick visual check.

These are API modes, not sample captures. See the verified request and response fields below;compare all credit costs and plans.

Request and response

Capture a page and keep its image URL

The endpoint returns results.snapshot_url for the stored PNG, plus the final URL, target status code, credits used, and storage metadata. Save the image yourself if your workflow needs a copy under your own retention policy.

For Markdown, links, or metadata, make a separatefetch orrender request. Usesearch if you still need to find the URL.

Browser capture pathStored image URLTraceable storage metadataTraceable request fields

curl

Capture a page

curl -X POST "https://api.anycrawler.com/v1/crawl/screenshot" \
  -H "Authorization: Bearer $ANYCRAWLER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com",
    "full_page": true
  }'

This request explicitly selects the default full-page mode. Omit full_page for the same 50-credit mode, or set it to false for a 20-credit viewport capture.

Use cases

Where a visual record helps

Use screenshot capture when a person or report needs to inspect how a page appeared.

Use

Compliance review

Add visual context to a review of pricing, policies, claims, disclosures, or consent pages. Confirm provenance and retention separately before treating a capture as evidence.

Use

Support and escalation records

Attach the captured image URL to a ticket or report so a reviewer can inspect the page appearance while the stored URL remains available.

Use

Visual QA for crawl workflows

Pair screenshots with fetch or render output to confirm that extracted text matches the page state a human would inspect.

Response

Stored screenshot output

{
  "ok": true,
  "requested_url": "https://example.com",
  "canonical_url": null,
  "final_url": "https://example.com/",
  "cache_timestamp": 0,
  "status_code": 200,
  "credits_used": 50,
  "results": {
    "snapshot_url": "https://cdn.example.com/snapshots/example.png",
    "snapshot_key": "snapshots/example.png",
    "snapshot_bytes": 182734,
    "snapshot_image_type": "png",
    "storage_ms": 42
  }
}

Illustrative JSON using the verified public response fields. The example URL and values are not a live API result.

What you get

A visual record your systems can attach

Attach the returned image URL to the related crawl result, support case, or report so a person can inspect the page appearance. A screenshot alone does not establish legal evidence or guarantee that the stored URL will remain available.

  • Stored PNG URL for human review while available
  • Final URL and status code for traceability
  • Storage key, byte size, and image type for operational records
  • Credit fields for cost control

The public contract does not specify image retention, access controls, deletion, or a numerical image-size limit. Ask support about these requirements before building a long-term record workflow.

Request fields

Keep capture requests simple

The stable public contract focuses on the fields below. Undocumented passthrough fields are not part of new integrations.

FieldTypeRequiredNotes
urlstringYesThe public page URL to capture.
full_pagebooleanNoDefaults to true. Capture the full scrollable page for 50 credits; false captures the visible viewport for 20 credits.
user_agentstring or nullNoOptional paid-plan override for the outbound user agent. Empty strings and null are treated as unset.
aspect_ratio"16:9", "9:16", "1:1", or "4:3"NoOptional paid-plan framing control. Defaults to 4:3 when omitted.

Response fields

Fields your integration can rely on

The public response exposes screenshot storage fields. The example values above illustrate the documented shape, not an API capture we made.

FieldMeaning
okWhether the gateway completed the screenshot request successfully.
requested_urlThe URL submitted in the request.
canonical_urlCanonical URL discovered from the page when present, otherwise null.
final_urlThe final URL after redirects and browser navigation.
status_codeHTTP status code returned by the target page.
cache_timestampAlways 0 in the public screenshot response.
credits_usedCredits settled for the request.
results.snapshot_urlURL of the stored PNG image. The public contract does not specify how long this URL remains available.
results.snapshot_keyStorage identifier for support and internal traceability.
results.snapshot_bytesSize of the stored screenshot artifact in bytes.
results.snapshot_image_typeImage type returned by the screenshot worker.
results.storage_msStorage timing returned for operational diagnostics.
error_code / error_message / retryableFailure details returned when ok is false; retryable indicates whether retrying can help.

JavaScript

Attach the image URL

const response = await fetch("https://api.anycrawler.com/v1/crawl/screenshot", {
  method: "POST",
  headers: {
    "authorization": `Bearer ${process.env.ANYCRAWLER_API_KEY}`,
    "content-type": "application/json",
  },
  body: JSON.stringify({
    url: "https://example.com",
    full_page: true,
  }),
});

const data = await response.json();
console.log(data.results?.snapshot_url);

Store snapshot_url next to the crawl, ticket, or report that needs visual context.

Combine carefully

Use screenshots for visuals and page extraction for text.

Screenshot responses provide a PNG URL and storage metadata. Fetch and render return Markdown and structured fields. If you need both, make one request for text and a separate request for the visual record. The same URL may have different content or appearance when those requests run at different times. See Page Extraction for choosing the text path.

Errors

Status codes are explicit enough for production handling

Use response status plus error_code and request headers to route retries, credit issues, authentication problems, and browser concurrency limits.

200Screenshot captured and stored.
400Invalid JSON or unsupported request field value.
401Missing, invalid, or revoked API key.
402Account does not have enough credits.
403Account inactive or paid-plan-only field requested.
409Gateway could not reserve account capacity; retry the request.
413Request body exceeds 256 KiB, or screenshot dimensions, bytes, or backend output exceed a processing limit.
429Rate limit or browser concurrency limit reached.
502Upstream browser connection failed.
503Database or upstream worker is not configured.
504Target page or browser worker timed out.

Headers

Track every capture

Successful and error responses include gateway metadata headers such as x-request-id, x-credits-reserved, and x-credits-used. Store them when you need support or cost audits.

Pricing

Pay for the capture length you need

A full-page request reserves 50 credits; a viewport request reserves 20. The Free plan starts with 5,000 one-time credits.

See all plans and credit rules

FAQ

Common screenshot API questions

Short answers for teams adding visual evidence to crawler workflows.

When should I use the screenshot API?

Use it when a person needs to review how a public page appeared, such as a UI change, pricing page, support case, or compliance review. A screenshot is a visual record, not automatic legal evidence.

Does the screenshot API return page text?

No. Screenshot responses focus on the stored image and traceable request fields. Use fetch or render when you need Markdown, links, and metadata from the page.

How are screenshot requests charged?

Requests default to full_page=true and use 50 credits. Set full_page=false for a smaller capture that uses 20 credits.

How should I combine screenshots with crawl results?

Use render or fetch for machine-readable Markdown, then make a separate screenshot request when the same URL needs visual context for review or reporting.

How long are screenshots stored, and can I control access or deletion?

The public API contract does not state a retention period, access-control model, deletion endpoint, or numerical image-size limit. Contact support to confirm these requirements before relying on a stored URL for long-term records.