Learn how to capture website screenshots programmatically using a REST API. Step-by-step guide with code examples in Python, Node.js, and cURL.
curl "https://snapapi.tech/v1/screenshot?url=https://example.com&api_key=YOUR_KEY&format=png" -o screenshot.pngimport requests
response = requests.get("https://snapapi.tech/v1/screenshot", params={
"url": "https://example.com",
"api_key": "YOUR_KEY"
})
with open("screenshot.png", "wb") as f:
f.write(response.content)const res = await fetch(
"https://snapapi.tech/v1/screenshot?" + new URLSearchParams({
url: "https://example.com",
api_key: "YOUR_KEY"
})
);
require("fs").writeFileSync("screenshot.png", Buffer.from(await res.arrayBuffer()));