Supacrawler Docs

Quickstart

Official TypeScript/JavaScript SDK for Supacrawler API

Installation

pnpm add @supacrawler/js
npm install @supacrawler/js
bun add @supacrawler/js

Quick Start

import { SupacrawlerClient } from '@supacrawler/js'

// Initialize client
const client = new SupacrawlerClient({
  apiKey: process.env.SUPACRAWLER_API_KEY || 'YOUR_API_KEY'
})

// Scrape a website
const result = await client.scrape({
  url: 'https://example.com',
  format: 'markdown'
})

console.log(result.markdown)

Authentication

The SDK requires an API key for authentication. Get your API key from the dashboard.

import { SupacrawlerClient } from '@supacrawler/js'

const client = new SupacrawlerClient({
  apiKey: process.env.SUPACRAWLER_API_KEY,
  baseUrl: 'https://api.supacrawler.com/api' // Optional: custom base URL
})

Type Safety

The SDK is fully typed with TypeScript enums and interfaces:

import {
  SupacrawlerClient,
  ScreenshotCreateRequest
} from '@supacrawler/js'

const client = new SupacrawlerClient({ apiKey: 'YOUR_API_KEY' })

// Enum-based API with autocomplete
const job = await client.createScreenshotJob({
  url: 'https://example.com',
  device: ScreenshotCreateRequest.device.DESKTOP,
  format: ScreenshotCreateRequest.format.PNG
})

Features

The TypeScript SDK supports all Supacrawler endpoints:

  • Scrape - Extract content from single pages
  • Crawl - Recursively crawl websites
  • Parse - AI-powered data extraction (coming soon)
  • Screenshots - Capture website screenshots
  • Watch - Monitor websites for changes

Next Steps

Explore the SDK documentation for each endpoint:

Resources

Was this page helpful?