Skip to main content

Installation

To install the Spidra Node SDK, you can use npm:
npm install spidra-js
To use the SPK, get an API key from Spidra.io. You can find it in the API Keys section of your dashboard. The key is used to authenticate your requests to the Spidra API.🔒 Never hardcode your API key in source files — use environment variables instead.

Quickstart

This example shows how to initialize the SDK, submit a job, and log the job ID:
Code Block Example
import { Spidra } from 'spidra-js';

const client = Spidra('your-api-key');

const response = await client.submitScrapeJob({
	urls: [{ url: 'https://example.com' }],
	prompt: 'Summarize this page.',
	output: 'markdown',
});

console.log(response.jobId);