Skip to main content

Prerequisites

Choose Your Approach

SDK

TypeScript/Node.js SDK for type-safe development

REST API

Language-agnostic HTTP API for any platform

Quick Start

// 1. Install
npm install @kadoa/node-sdk

// 2. Initialize
import { KadoaClient } from '@kadoa/node-sdk';

const client = new KadoaClient({
  apiKey: 'your-api-key'
});

// 3. Extract data
const result = await client.extraction.run({
  urls: ['https://sandbox.kadoa.com/ecommerce'],
  name: 'My First Extraction'
});

// 4. Fetch the extracted data
const response = await result.fetchData({});
console.log(response.data);
// Output: Array of products with auto-detected fields
That’s it! With the SDK, data is automatically extracted. With the API, you define the schema and then retrieve your structured data.

Define What to Extract

For more control, specify exactly what fields you want:
const workflow = await client
  .extract({
    urls: ['https://sandbox.kadoa.com/ecommerce'],
    name: 'Product Monitor',
    extraction: builder => builder
      .entity('Product')
      .field('name', 'Product name', 'STRING', { example: 'MacBook Pro' })
      .field('price', 'Price in USD', 'MONEY')
      .field('inStock', 'Is available', 'BOOLEAN')
  })
  .create();

const result = await workflow.run();
const response = await result.fetchData({});
console.log(response.data);
// Output: [{ name: "Laptop", price: "$999", inStock: true }, ...]

Next Steps

I