extract_structured
Extract data from web pages using a JSON schema to define the structure. Supports LLM extraction with CSS selector fallback for reliability.
Instructions
Use this when you need a specific data shape extracted from a page using a JSON schema — e.g. product details, job listings, event data. Uses LLM by default; falls back to CSS selectors when no LLM is configured. Example: extract_structured({url: "https://jobs.example.com/post/123", schema: {properties: {title: {type:"string"}, salary: {type:"string"}}, required:["title"]}})
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | The URL to extract structured data from | |
| prompt | No | Natural language instructions for extraction | |
| schema | Yes | JSON schema defining the data structure to extract | |
| llmConfig | No | LLM provider configuration for AI-powered extraction | |
| selectorHints | No | CSS selector hints to guide extraction | |
| fallbackToSelectors | No | Fall back to CSS selector extraction if LLM is unavailable |