{"uid":"cap_1mJFhg83AdXnxdhTt6lmJ","slug":"screenshot-api-viewport-screenshot-capture-6a43d405","name":"Screenshot API - Viewport Screenshot Capture","description":"Capture a viewport-sized PNG screenshot of an http(s) URL with headless Chromium; returns a JSON envelope with the PNG base64-encoded under image_base64, plus final_url, title, viewport, and size.","url":"https://screenshot-api-production-fe7e.up.railway.app/capture/screenshot","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"url":{"type":"string","description":"The http(s) URL to capture, e.g. 'https://example.com'. Internal/loopback hosts are rejected."},"width":{"type":"integer","description":"Viewport width in pixels (320-3840). Defaults to 1280."},"height":{"type":"integer","description":"Viewport height in pixels (240-3840). Defaults to 800."},"wait_until":{"type":"string","description":"Playwright load state to wait for before capture: 'load', 'domcontentloaded', 'networkidle', or 'commit'. Defaults to 'networkidle'."}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_lnZ56jythRysdk2VaNI3Z","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Captures a viewport-sized PNG screenshot of any public HTTP/HTTPS URL using headless Chromium and returns the image as a base64-encoded JSON envelope with metadata.","exampleAgentPrompt":"Can you take a screenshot of https://news.ycombinator.com at 1440x900 resolution and wait for the page to fully load (networkidle) before capturing?","exampleUseCases":[{"title":"Visual regression monitoring for web apps","prompt":"Take a screenshot of https://staging.myapp.com at 1280x800, waiting for networkidle, so I can compare it to what the production site looks like."},{"title":"Archiving a competitor's landing page","prompt":"Capture a viewport screenshot of https://www.competitor.com at 1920x1080 — I want a visual record of what their homepage looks like today."},{"title":"Generating preview thumbnails for a link aggregator","prompt":"Screenshot https://techcrunch.com at 1280x800 using networkidle so I can use it as a preview card image in my newsletter."}],"resultDescription":"A JSON object containing: `image_base64` (PNG screenshot encoded as base64), `final_url` (the URL after any redirects), `title` (the page title), `viewport` (object with width and height used), and `size` (byte size of the PNG). The image can be decoded and used directly as a PNG file.","failureModes":["Internal or loopback hosts (e.g. localhost, 192.168.x.x) are rejected with an error","Invalid or malformed URLs return a validation error","Pages that timeout before reaching the specified load state may return a partial capture or error","Very large pages or high-resolution viewports may produce large base64 payloads","Pages requiring authentication will capture the login screen rather than the authenticated content","Invalid wait_until values outside the accepted enum will cause a parameter error"],"whenToPreferThis":"Choose this endpoint when you need a standard viewport-sized screenshot (what a user would see above the fold in a browser window) at a specific resolution. It is ideal for generating preview thumbnails, visual QA checks, link previews, or archiving web content at a defined viewport. Use the sibling full-page endpoint instead if you need the entire scrollable page captured; use the element screenshot endpoint if you only need a specific CSS-selected component.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T06:36:31.999Z","isFirstParty":false}