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.