Docs
Scraping workflows

Screenshots and files

Capture durable screenshots and understand Berrycrawl's CDN asset URLs.

Use POST /screenshot when the image itself is the result. Use the screenshot format on POST /scrape when you also need page content from the same render.

curl https://api.berrycrawl.com/api/v1/screenshot \
  -H "Authorization: Bearer $BERRYCRAWL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://berrycrawl.com",
    "fullPage": true,
    "type": "png"
  }'

Screenshot options include image type, JPEG quality, full-page capture, viewport dimensions, device scale factor, and a clip rectangle.

Durable delivery

Production screenshots and other persisted artifacts are mirrored to Berrycrawl's general Cloudflare R2 bucket and served from https://cdn.berrycrawl.com. The same CDN is used for brand logos and backdrops. API responses return a CDN URL rather than a temporary origin hotlink.

Use the returned URL as an immutable artifact reference. Do not derive bucket keys or depend on internal object names.

Choosing an image configuration

  • Prefer PNG for text, diagrams, and UI captures.
  • Prefer JPEG for photographic pages when file size matters.
  • Use full-page capture only when the entire document is needed; tall pages cost more memory and bandwidth.
  • Set a viewport explicitly when visual regression or repeatability matters.
  • Use a clip rectangle for one stable region instead of cropping a large image afterward.