# Screenshotty > A powerful screenshot API that captures high-quality screenshots of websites or raw HTML content. Screenshotty is a website screenshot API available on RapidAPI. It enables developers to programmatically capture screenshots of any webpage with extensive customization options. ## API Endpoint Base URL: https://api.screenshotty.link Alternative (RapidAPI): https://screenshotty1.p.rapidapi.com ## Authentication ### Direct API (Recommended) 1. Sign up at https://screenshotty.link/sign-up 2. Get your API key from the dashboard 3. Include your API key in the `X-Api-Key` header ### Via RapidAPI 1. Subscribe to the API on RapidAPI 2. Include your RapidAPI key in the `X-RapidAPI-Key` header 3. Include `X-RapidAPI-Host: screenshotty1.p.rapidapi.com` header ## Main Endpoints ### POST /v1/screenshot Capture a screenshot of a URL or HTML content. Recommended for complex requests. ### GET /v1/screenshot Capture a screenshot using query parameters. Useful for embedding directly in HTML. ### GET /v1/screenshot/countries List available countries for geo-targeted screenshots. ## Key Features ### Responsive Screenshots Capture websites at any viewport size from mobile (390x844) to 4K (3840x2160). Use `viewport_width` and `viewport_height` parameters or `viewport_preset` for common devices. ### Light or Dark Mode Force light or dark color scheme using the `light_mode` parameter. Options: "default", "light", "dark". ### Full Page Screenshots Capture entire scrollable pages with `full_page: true`. Handles infinite scroll and lazy-loaded content. ### Multiple Output Formats Supported formats via `format` parameter: - image/png (default) - image/jpeg, image/jpg - image/webp - image/gif - image/jp2 - image/tiff - application/pdf ### Transparent Background Remove page backgrounds with `transparent_background: true` (PNG format only). Useful for font previews and UI component captures. ### Block Cookie Banners & Ads - `block_cookie_banner: true` - Remove GDPR/cookie consent popups - `adblock: true` - Block advertisements and trackers ### Geo-Targeting Capture from different geographic locations using `country` parameter with ISO 3166-1 alpha-2 codes (US, UK, DE, FR, JP, BR, etc.). ### Custom JavaScript and CSS Injection - `javascript_code` - Execute JavaScript before capture (remove elements, click buttons, modify content) - `css_code` - Inject CSS styles (hide elements, change fonts) ### Element Selection Use `selector` parameter with CSS selector to capture specific elements only. ### Cropping Define crop region with `crop_x`, `crop_y`, `crop_width`, `crop_height` parameters. ### Response Types Control response format with `response_type`: - "image" (default) - Raw binary image data - "json" / "url" - JSON with image URL - "redirect" - HTTP redirect to image URL ## Quick Start Examples ### cURL ```bash curl -X POST "https://screenshotty1.p.rapidapi.com/v1/screenshot" \ -H "Content-Type: application/json" \ -H "X-RapidAPI-Key: YOUR_API_KEY" \ -H "X-RapidAPI-Host: screenshotty1.p.rapidapi.com" \ -d '{"url": "https://example.com", "format": "image/png"}' \ --output screenshot.png ``` ### Python ```python import requests response = requests.post( "https://screenshotty1.p.rapidapi.com/v1/screenshot", json={"url": "https://example.com", "format": "image/png"}, headers={ "X-RapidAPI-Key": "YOUR_API_KEY", "X-RapidAPI-Host": "screenshotty1.p.rapidapi.com" } ) with open("screenshot.png", "wb") as f: f.write(response.content) ``` ### Node.js ```javascript const response = await fetch( "https://screenshotty1.p.rapidapi.com/v1/screenshot", { method: "POST", headers: { "Content-Type": "application/json", "X-RapidAPI-Key": "YOUR_API_KEY", "X-RapidAPI-Host": "screenshotty1.p.rapidapi.com" }, body: JSON.stringify({ url: "https://example.com", format: "image/png" }) } ); const buffer = await response.arrayBuffer(); ``` ## Common Parameters | Parameter | Type | Description | |-----------|------|-------------| | url | string | URL to capture (required unless using html) | | html | string | Raw HTML content to render | | format | string | Output format (image/png, image/jpeg, etc.) | | viewport_width | integer | Viewport width in pixels (1-3840) | | viewport_height | integer | Viewport height in pixels (1-3840) | | full_page | boolean | Capture entire scrollable page | | selector | string | CSS selector to capture specific element | | javascript_code | string | JavaScript to execute before capture | | css_code | string | CSS to inject before capture | | light_mode | string | Color scheme: default, light, dark | | country | string | ISO country code for geo-targeting | | adblock | boolean | Block ads and trackers | | block_cookie_banner | boolean | Remove cookie consent banners | | transparent_background | boolean | Transparent background (PNG only) | | wait_ms | integer | Additional wait time in milliseconds | | device_scale_factor | integer | Pixel density (1-3, 2 for Retina) | ## Language Guides Per-language integration guides with copy-paste code: - Python: https://screenshotty.link/screenshot-api/python - Node.js: https://screenshotty.link/screenshot-api/nodejs - PHP: https://screenshotty.link/screenshot-api/php - Java: https://screenshotty.link/screenshot-api/java - Ruby: https://screenshotty.link/screenshot-api/ruby - Go: https://screenshotty.link/screenshot-api/go - C#: https://screenshotty.link/screenshot-api/csharp ## Free Tools In-browser tools powered by the API (no sign-up required): - Website Screenshot Tool: https://screenshotty.link/website-screenshot - Responsivity Check: https://screenshotty.link/responsivity-check - Website to PDF: https://screenshotty.link/website-to-pdf - Website Text Extractor: https://screenshotty.link/website-text-extractor - All tools: https://screenshotty.link/tools ## MCP Server (for AI agents) Give coding agents (Claude Code, Cursor, Windsurf) a take_screenshot tool: - Install: `npx -y screenshotty-mcp` with SCREENSHOTTY_API_KEY in the environment - Guide: https://screenshotty.link/integrations/mcp - Tools exposed: take_screenshot (url/html, full_page, viewport, selector, format, dark mode), list_countries ## Integrations - Zapier: https://screenshotty.link/integrations/zapier - n8n: https://screenshotty.link/integrations/n8n - Make: https://screenshotty.link/integrations/make - Google Sheets: https://screenshotty.link/integrations/google-sheets ## Parameter Reference Per-parameter documentation with examples: https://screenshotty.link/docs/parameters ## Links - RapidAPI: https://rapidapi.com/nexus-apis-nexus-apis-default/api/screenshotty1 - OpenAPI Specification: /openapi.json ## Optional - llms-full.txt: /llms-full.txt (includes full OpenAPI specification)