Extracts structured data from the page based on a natural language instruction and a JSON schema. This uses AI to understand the instruction and locate the relevant information. Example:Documentation Index
Fetch the complete documentation index at: https://docs.extractbase.com/llms.txt
Use this file to discover all available pages before exploring further.
extract(instruction: "Extract the product name and price", schema: { type: "object", properties: { name: { type: "string" }, price: { type: "number" } } })
Returns the extracted data as a JSON object.
Definition
Arguments
instruction
String!
A natural language instruction describing what data to extract.
Example: "Get the user's name and email from the profile page."
schema
JSONObject!
A JSON schema defining the structure of the data to be extracted.
Example: { "type": "object", "properties": { "productName": { "type": "string" }, "price": { "type": "number" } } }
options
ExtractOptions
Options for the extraction process, like specifying a root selector or timeout.
Returns
JSON! TheJSON scalar type represents JSON values as specified by ECMA-404.