Screenshot

Scraping Fish API allows you to retrieve a screenshot of a webpage as a PNG image file. To do so, you need to provide the screenshot query parameter and set it to true.

Example

To get a screenshot of the website example.com, send a request with screenshot=true query parameter.

GET
/api/v1/
import requests

payload = {
  "api_key": "[your API key]",
  "url": "https://www.example.com",
  "screenshot": "true",
}

response = requests.get("https://scraping.narf.ai/api/v1/", params=payload)
with open("./screenshot.png", "wb") as f:
  f.write(response.content)

The resulting website screenshot will be returned as bytes. In the examples above it's saved to screenshot.png.