Installation

To install the ScreenshotRender Node SDK, use npm:
Node
It runs on Node 18 or later, has no dependencies, and ships types.

Usage

  1. Get an API key from your dashboard. New accounts start with 100 free credits.
  2. Pass it to the client as apiKey, or set it in the SCREENSHOTRENDER_API_KEY environment variable.
Each method returns the response’s data, so you read fields like doc.markdown directly.

Taking a screenshot

Node
Capture the full page, at a window size you choose:
Node

Searching the web

Node

Scraping a URL

Node

Extracting structured data

Node

Parsing documents

From a URL:
Node
From a file you upload:
Node

Mapping a website

Node

Crawling a website

crawl() starts the crawl, waits for it and returns every page. onProgress is called after every status check.
Node

Start a crawl

To start a crawl without waiting, use startCrawl() and keep the id:
Node

Checking crawl status

Node

Cancelling a crawl

Node

Failed and blocked pages

Node

Error handling

Every failure is a ScreenshotRenderError with the HTTP status, the API’s error code and its message. See Errors for every code.
Node