NewAPI
Send screenshot options as JSON.
You can now POST to /v1/screenshot with a JSON body, with the same options, limits, price and cache as a GET request.
POST to the same endpoint, with the options as JSON instead of a query string:
curl "https://api.urlshot.io/v1/screenshot" \
-H "Authorization: Bearer $URLSHOT_API_KEY" \
-H "Content-Type: application/json" \
--data-binary @- \
--output screenshot.png <<'JSON'
{
"url": "https://example.com",
"full_page": true,
"hide_selectors": [".newsletter", "#chat-widget"]
}
JSON
It suits long values, such as custom_css and custom_js, which need no URL encoding in JSON, and values you’d rather keep out of URLs, which servers and proxies often log.
- Use JSON types:
true, not"true". Unknown properties are rejected. - Put every option in the body. A
POSTthat also has query parameters is rejected. - Authenticate with your secret key. Signed URLs work with
GETonly.
Try it on your own pages.
Everything in this changelog is live. 100 free screenshots a month, no credit card needed.