getOgScreenshot
Capture screenshots of any URL as a hosted image. Supports full-page, viewport, dark mode, custom dimensions, and element targeting via CSS selectors.
Instructions
Capture a screenshot of any URL via the OpenGraph.io API (v3). Supports full-page or viewport captures, custom viewport dimensions, dark mode, image format/quality control, cookie-banner dismissal, and CSS selector-based element targeting or exclusion.
Returns a screenshotUrl — a hosted URL pointing to the screenshot image file, not inline image data. Use this URL directly in a browser, an tag, or pass it to another tool.
Pick the right tool: getOgData → Open Graph tags, social preview metadata (title, description, image, favicon) getOgMarkdown → Clean readable text / article prose — ideal for feeding into an LLM getOgScrapeData → Raw HTML — use when you need to do your own parsing or link extraction getOgExtract → Targeted elements by tag (html_elements) or named CSS selectors (selectors) getOgScreenshot → Visual capture of a page as an image getOgQuery → Natural-language question answered from page content (100–200 credits/request)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | URL of the webpage to screenshot. | |
| retry | No | Automatically retry failed requests. Defaults to true on v3. | |
| format | No | Image format. Defaults to 'jpg'. | |
| quality | No | Image compression quality 1–100. Only applies to jpg/webp. Defaults to 80. | |
| cache_ok | No | Use cached results. Set to false to bypass cache. Defaults to true. | |
| selector | No | CSS selector — crop the screenshot to just this element. | |
| dark_mode | No | Enable dark mode (prefers-color-scheme: dark). Defaults to false. | |
| full_page | No | Capture the full scrollable page height. Defaults to false (viewport only). | |
| use_proxy | No | Route the request through a standard proxy. | |
| auto_proxy | No | Automatically escalate to a proxy if the direct request fails. Defaults to true on v3. | |
| dimensions | No | Viewport dimensions as WxH (e.g. '1280x800'). Defaults to '1366x768'. | |
| accept_lang | No | Accept-Language header for the outbound request. Defaults to 'auto'. | |
| full_render | No | Fully render the page with JavaScript before capturing. Defaults to true for screenshots. | |
| max_retries | No | Maximum number of retry attempts (1–4). Defaults to 4. | |
| use_premium | No | Route the request through a premium proxy. | |
| use_superior | No | Route the request through a superior-tier proxy. | |
| capture_delay | No | Milliseconds to wait after page load before capturing (0–10 000). Defaults to 0. | |
| hideSelectors | No | Whether to apply the exclude_selectors hiding. Defaults to true when exclude_selectors is set. | |
| max_cache_age | No | Maximum cache age in milliseconds. Defaults to 432000000 (5 days). | |
| proxy_country | No | Two-letter ISO country code for geo-targeted proxy exit node (e.g. 'US', 'GB'). | |
| exclude_selectors | No | Comma-separated CSS selectors to hide (set visibility: hidden) before capturing. | |
| navigationTimeout | No | Navigation timeout in milliseconds (1 000–60 000). Defaults to 30 000. | |
| wait_for_selector | No | CSS selector to wait for before capturing. | |
| block_cookie_banner | No | Attempt to dismiss cookie consent banners before capturing. Defaults to false. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Source URL that was screenshotted | |
| format | No | ||
| fullPage | No | ||
| dimensions | No | ||
| screenshotUrl | Yes | Hosted URL of the screenshot image |