Skip to main content
Use aiExtractRules to define custom rules for extracting structured data from any web page using large language models (LLMs). This is ideal when you don’t want to write manual CSS selectors and need clean, field-level data in JSON format. Each key you define represents a field you want to extract. You provide a type and (optionally) a description to help the model understand what data to look for.

Supported Types

  • string – plain text value
  • number – numeric value
  • boolean – true or false
  • list – an array of values
  • item – a nested object (with its own structure under output)
You can also use enum to restrict a string to a fixed set of values.

Example Request

Example Response

Notes

  • Descriptions are optional but highly recommended for accuracy.
  • list fields can output flat values ("output": "string") or objects ("output": { ... }).
  • Fields with no match will return null.