Dashboard

SDK Installation

The official Scrayle SDK for Node.js (TypeScript/JavaScript). Wraps all API endpoints and provides direct browser automation integration.

Install

npm install @scrayle/sdk

Or with other package managers:

pnpm add @scrayle/sdk
yarn add @scrayle/sdk

Requirements

Quick Setup

import { ScrayleClient } from '@scrayle/sdk';

// Reads SCRAYLE_API_KEY from environment
const client = new ScrayleClient();

// Or configure explicitly
const client = new ScrayleClient({
  apiKey: 'your-api-key',
  timeout: 60000,
});

Environment Variables

VariableDescriptionDefault
SCRAYLE_API_KEYAPI authentication keyRequired
SCRAYLE_HUBCompute hub: eu, us, asiaeu
SCRAYLE_IS_ONLINEUse HTTP storage (true) or local storage (false)false
LOG_LEVELLogging level: trace, debug, info, warn, errorinfo

Package Exports

// Main client
import { ScrayleClient, Scrayle } from '@scrayle/sdk';

// Browser automation
import { Playwright, Puppeteer, SeleniumBrowser } from '@scrayle/sdk';

// Error class
import { ScrayleError } from '@scrayle/sdk';

// Utilities
import { sleep, retry, log, createLogger } from '@scrayle/sdk';

Peer Dependencies

For browser automation, install the corresponding library:

# For Playwright
npm install playwright-core

# For Puppeteer
npm install puppeteer-core

# Selenium is included in the SDK

Next Steps