Installation
To install the ScreenshotRender Node SDK, use npm:Node
Usage
- Get an API key from your dashboard. New accounts start with 100 free credits.
- Pass it to the client as
apiKey, or set it in theSCREENSHOTRENDER_API_KEYenvironment variable.
data, so you read fields like doc.markdown directly.
Taking a screenshot
Node
Node
Searching the web
Node
Scraping a URL
Node
Extracting structured data
Node
Parsing documents
From a URL:Node
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, usestartCrawl() and keep the id:
Node
Checking crawl status
Node
Cancelling a crawl
Node
Failed and blocked pages
Node
Error handling
Every failure is aScreenshotRenderError with the HTTP status, the API’s error code and its message. See Errors for every code.
Node