Skip to main content
For an overview of schema concepts and available data types, see Schemas.

Prerequisites

  • Kadoa account with API key
  • SDK installed: npm install @kadoa/node-sdk or uv add kadoa-sdk

Working with Schemas

Define the structure of data you want to extract using the builder API:

Reusable Schemas

For consistent data extraction across multiple workflows, you can create and manage schemas separately using the Schema Management API. Schemas can also be bundled into templates along with a prompt and notification settings.

Schema Management API

The Schema Management API allows you to create, retrieve, and delete schemas programmatically. Saved schemas can be reused across multiple extractions, ensuring consistent data structure.

When to Use Saved Schemas

Use saved schemas when you:
  • Extract the same data structure from multiple websites
  • Want to maintain consistent field definitions across workflows
  • Need to programmatically manage schema lifecycle
  • Share schemas across different parts of your application
For one-off extractions, inline schema definitions (shown above) are simpler and don’t require separate schema management.
If you need to apply the same schema, prompt, and notifications to multiple workflows, consider using templates instead. Templates bundle all three into a versioned configuration.

Create a Schema

Get a Schema

Retrieve an existing schema by ID:

Delete a Schema

Remove a schema when it’s no longer needed:
Deleting a schema does not affect existing workflows or extractions that were created using it.

Update a Schema

Modify an existing schema’s name, entity, or fields:

Use a Saved Schema

Reference a saved schema in your extraction:

Field Types

Schemas support four types of fields:
  1. Regular fields - Structured data extraction (shown above)
  2. Classification fields - Categorize content into predefined labels
  3. Source fields - Capture values Kadoa already holds, such as the page URL or the full page HTML
  4. Function fields - Fields Kadoa computes for you, such as a stable unique ID

Available Data Types

For regular fields, specify the dataType: STRINGNUMBERBOOLEANDATEDATETIMEMONEYIMAGELINKOBJECTARRAY See data type details and examples →

Classification Fields

Categorize extracted content into predefined labels:

Function Fields

Functions add fields whose values Kadoa computes for you instead of extracting them from the page. A function field is a regular SCHEMA field with an output dataType, a top-level mapper, and optional mapperConfig. Configuration is flat: for example, mapper: "categoryClassifier" uses mapperConfig: { categoryName: "generic_english" }. Classification retains its own field shape (fieldType: CLASSIFICATION), covered above. The previous params.mapper representation remains accepted for compatibility. For example, add a stable unique ID to each record:
Functions vary by workspace; the API rejects fields yours isn’t enabled for.

Source Fields

To keep raw page content, add a regular SCHEMA field with a params.sourceKey instead of an extraction. Supported source keys: link (page URL), allExtracts.fullHtml, and allExtracts.fullMarkdown.