Overview
Thejson_schema option lets you define a custom extraction schema so the parser returns only the structured fields you specify. This is powerful for extracting specific data points from any web page without writing custom parsing logic.
Schema Format
The schema is an object with aproperties array. Each property defines a field to extract:
Supported Types
| Type | Description |
|---|---|
string | Text content |
number | Numeric values |
boolean | True/false values |
map | Nested object — use properties for nested fields |
array | List of items — use items to define the item schema |
Examples
Extract Article Metadata
Extract Product Data
Nested Objects
Notes
- JSON schema extraction works with any URL, not just supported platforms
- The parser uses AI to intelligently match your schema fields to page content
- Field names should be descriptive — the parser uses them to understand what data to extract
- JSON schema extraction costs 1 token (standard) unless combined with AI options