Prerequisites
- Kadoa account with API key
- SDK installed:
npm install @kadoa/node-sdkoruv 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
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:- Regular fields - Structured data extraction (shown above)
- Classification fields - Categorize content into predefined labels
- Source fields - Capture values Kadoa already holds, such as the page URL or the full page HTML
- Function fields - Fields Kadoa computes for you, such as a stable unique ID
Available Data Types
For regular fields, specify thedataType:
STRING • NUMBER • BOOLEAN • DATE • DATETIME • MONEY • IMAGE • LINK • OBJECT • ARRAY
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 regularSCHEMA 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 regularSCHEMA field with a params.sourceKey instead of an extraction. Supported source keys: link (page URL), allExtracts.fullHtml, and allExtracts.fullMarkdown.