Skip to main content

Basic Extraction

CLI

TypeScript SDK

Python SDK

Extraction Modes

Scoped Extraction

Limit extraction to a specific container to avoid pulling data from sidebars or navigation:
Scoped extraction is important on pages with complex layouts. Without a scope selector, the extractor may pick up sidebar items, footer links, or navigation elements that match your schema.

Source References

Track which DOM elements contributed to each extracted value:

Pagination

For multi-page scraping, combine extraction with navigation:

CLI Pagination

Confidence Scores

Extraction results include an optional confidence score (0-1):
The extract method uses heuristic-based DOM analysis, not LLM reasoning. For complex pages where the schema fields do not map cleanly to visible text, extraction accuracy may be lower. Consider using observe/content with your own parsing logic for edge cases.