extract tool is the final step of the pipeline. It pulls structured values out of markdown content according to a schema.
Prerequisites
- An AiQL API key in the
AIQL_API_KEYenvironment variable - Markdown content to extract from, and a schema describing what to pull
Extract structured data
Send the markdown to extract from and the schema that describes the data. Use the schema from Shape, or supply your own. Tool requests authenticate with a Bearer token and do not need a workspace.schema is made of classes, properties, and relationships:
- A class has a
nameand adefinition. - A property has a
name, adefinition, and adomain(the class or classes it applies to). - A relationship has a
name, adefinition, adomain(the class or classes it starts from), and arange(the class or classes it points to).
nodes and relationships pulled from the markdown according to the schema:
- A node has a required
idandname, plus apropertiesobject of extracted values. - A relationship has an
id, aname, and thesourceandtargetnode ids it connects.
Next step
To run all four steps as one managed job and load the result into a workspace, see Run a full ingestion.extract is billed at 30 credits per 1,000 words, with a minimum of 1 credit. See Pricing for details.