Skip to main content
The 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_KEY environment 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.
The schema is made of classes, properties, and relationships:
  • A class has a name and a definition.
  • A property has a name, a definition, and a domain (the class or classes it applies to).
  • A relationship has a name, a definition, a domain (the class or classes it starts from), and a range (the class or classes it points to).
The response is a graph of nodes and relationships pulled from the markdown according to the schema:
  • A node has a required id and name, plus a properties object of extracted values.
  • A relationship has an id, a name, and the source and target node 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.