{"uid":"cap_GMlxq8kAQjkpoyev37kNA","slug":"screenshot-api-element-capture-17a1acf7","name":"Screenshot API – Element Capture","description":"Headless Chromium screenshots, PDFs, full-page captures and element captures, with x402 payments.","url":"https://screenshot.payapi.market/capture/element?utm_source=zero.xyz","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."},"selector":{"type":"string","description":"CSS selector of the single element to capture, e.g. '#main' or '.hero'."},"wait_until":{"type":"string","description":"Playwright load state to wait for before capture: 'load', 'domcontentloaded', 'networkidle', or 'commit'. Defaults to 'networkidle'."}}},"responseSchema":{"type":"json","example":{"url":"https://example.com","title":"Example Domain","format":"png","selector":"#main","viewport":{"width":1280,"height":800},"final_url":"https://example.com/","size_bytes":8192,"image_base64":"iVBORw0KGgoAAAANSUhEUgAAAAUA... (base64-encoded PNG bytes, truncated)"}},"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_WmYeRScictYoRW0fDOn3-","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 screenshot of a specific DOM element on a webpage using headless Chromium, returning a base64-encoded PNG image.","exampleAgentPrompt":"Take a screenshot of just the '#hero' element on https://stripe.com using a 1440px wide viewport, waiting for the network to be idle before capturing.","exampleUseCases":[{"title":"Monitoring competitor hero banners","prompt":"Grab a screenshot of the '.hero-banner' element on https://competitor.com every day so I can track how their homepage changes — use a 1280px wide viewport and wait for networkidle."},{"title":"Capturing chart widgets for reports","prompt":"Take a screenshot of the '#revenue-chart' element on our internal dashboard at https://dashboard.mycompany.com and give me the image so I can drop it into a report — use a 1920px wide viewport."},{"title":"Visual regression testing a UI component","prompt":"Screenshot the '.checkout-button' element on https://staging.myshop.com with a 375px wide mobile viewport waiting for domcontentloaded, so I can compare it against the production version."}],"resultDescription":"Returns a JSON object containing the original URL, page title, format ('png'), the CSS selector used, viewport dimensions, final redirected URL, image size in bytes, and the full base64-encoded PNG of the captured element.","failureModes":["Invalid or unreachable URL returns an error (internal/loopback hosts are rejected)","CSS selector not found on page results in an error response","Page fails to reach the requested load state (timeout)","Viewport dimensions outside allowed range (320-3840px) are rejected","Payment failure via x402 protocol blocks the request"],"whenToPreferThis":"Choose this endpoint when you need to capture a specific DOM element rather than the full page or a PDF — ideal for extracting charts, UI components, product cards, or any isolated section identified by a CSS selector. Prefer this over full-page screenshot endpoints when only a portion of the page is relevant, reducing image size and noise.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T18:30:40.344Z","isFirstParty":false,"canonicalSlug":"screenshot-api-element-capture-17a1acf7"}