1. Basic Screenshot Capture
Capture a screenshot of https://apple.com
using a 1366×768 viewport:
GET https://screenshotink.com/wp-json/screenshotink/v1/capture?url=https://apple.com&width=1366&height=768&key=YOUR_API_KEY
Example Response
{
"success": true,
"cached": false,
"file_url": "https://screenshotink.com/wp-content/uploads/screenshotink/abcdef123456.png"
}
2. Full-Page Screenshot with Delay
Capture the full scrollable page of https://example.com
with a 2-second delay and output as JPEG:
GET https://screenshotink.com/wp-json/screenshotink/v1/capture?url=https://example.com&full_size=1&sleep_time=2000&format=jpeg&key=YOUR_API_KEY
3. Scaled Output
Capture a screenshot of https://nytimes.com
using a 1920×1080 viewport, then resize the final image to a width of 600 pixels:
GET https://screenshotink.com/wp-json/screenshotink/v1/capture?url=https://nytimes.com&width=1920&height=1080&scaled_width=600&key=YOUR_API_KEY
4. Ad-Blocked Capture
Capture a screenshot of https://cnn.com
while blocking ads/tracker requests:
GET https://screenshotink.com/wp-json/screenshotink/v1/capture?url=https://cnn.com&no_ads=1&key=YOUR_API_KEY
Best Practices
Keep Your API Key Secure:
Never share your API key publicly. Treat it as a secret credential.Check Usage:
The API tracks your monthly usage against your membership limits. If you exceed your quota, extra credits (if any) will be used. If you run out of both, you’ll receive an error response.Caching:
If you request the same URL with the same parameters within 1 hour, the cached image will be returned, reducing processing time and load on the service.Image Processing:
Use thescaled_width
parameter if you need a consistent output size regardless of the capture resolution.Error Handling:
Always check the response JSON for error codes and messages so you can adjust your application logic accordingly.