Screenshot
Set screenshot=1 to receive a base64-encoded JPEG of the fully rendered page. Use screenshot_options to control viewport dimensions and whether to capture beyond the fold.
Endpoint
Section titled “Endpoint” GET https://scrape.shifter.io/v1?api_key=YOUR_API_KEY&url=<TARGET_URL>&screenshot=1&render_js=1
Parameters
Section titled “Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
api_key | string | yes | Your Web Scraping API key |
url | string | yes | Target URL to fetch |
screenshot | integer | yes | Set to 1 to return a screenshot. |
render_js | integer | yes | Must be 1. |
screenshot_options | object | no | JSON with full_page (boolean), width (number), height (number). |
Screenshot options
Section titled “Screenshot options”| Field | Type | Description |
|---|---|---|
full_page | boolean | Capture the full page beyond the viewport. |
width | number | Viewport width in pixels. |
height | number | Viewport height in pixels. |
Example request
Section titled “Example request”curl "https://scrape.shifter.io/v1?api_key=YOUR_API_KEY&url=https%3A%2F%2Fhttpbin.org%2Fget&screenshot=1&render_js=1"import requests
r = requests.get("https://scrape.shifter.io/v1", params={ "api_key": "YOUR_API_KEY", "url": "https://httpbin.org/get", "screenshot": 1, "render_js": 1,})data = r.json()print(data["screenshot"][:80])import fetch from 'node-fetch';
const url = 'https://scrape.shifter.io/v1?' + new URLSearchParams({ api_key: 'YOUR_API_KEY', url: 'https://httpbin.org/get', screenshot: '1', render_js: '1',});const res = await fetch(url);const data = await res.json();console.log(data.screenshot.slice(0, 80));Example response
Section titled “Example response”{ "screenshot": "/9j/4AAQSkZJRgABAQAAAQABAAD/4gIoSUNDX1BST0ZJTEU..."}The screenshot value is a base64-encoded JPEG. Decode it to bytes and save as .jpg to view.