Beta API
Screenshot API Documentation
Capture high-quality screenshots with customizable dimensions and settings
Screenshot API - Now Available in Beta!
Capture high-quality screenshots of any website. This endpoint requires an API key. Contact us to get your beta API key and start using this feature today!
Screenshot Endpoint
GET /screenshot?url={url}&width={width}&height={height}&fullPage={fullPage}
Capture a screenshot of any URL with customizable dimensions for social media, documentation, or archival purposes.
Parameters:
url - The URL to screenshot (required)width - Screenshot width in pixels (optional, default: 1200)height - Screenshot height in pixels (optional, default: 630)fullPage - Capture full page height when true (optional, default: false)Authentication:
API key required via
X-API-Key: YOUR_API_KEY headerScreenshot Example
curl -H "X-API-Key: YOUR_API_KEY" \"https://api.ogfetch.com/screenshot?url=https://github.com&width=1200&height=630"
Response Schema & Captured Screenshot
https://example.com

size:1200×630cache:MISSexpires:2024-01-22T10:30:00Z
The captured screenshot URL renders inside a browser-frame mock.
Response Schema
Screenshot Response
{"screenshot_url": "https://cdn.ogfetch.com/screenshots/abc123.png","cached": false,"width": 1200,"height": 630,"expires_at": "2024-01-22T10:30:00Z"}
Field Descriptions
screenshot_url: Direct URL to the captured screenshot image
cached: Whether this screenshot was served from cache
width: Actual width of the captured screenshot
height: Actual height of the captured screenshot
expires_at: When the screenshot URL will expire (ISO 8601 format)
Use Cases
Social Media Previews
Generate Open Graph images for social sharing
Documentation
Capture website states for tutorials and guides
Quality Assurance
Automated visual testing of web applications