Shape
Last updated
Last updated
We use Shape to specify what you want to extract from a document. It's an array where each element is a .
There are three main ways to build a Shape for your use case:
Use our intuitive in the dashboard.
Let us guess the shape you want to extract with our endpoint.
Define your own shape based on our type definition.
We extract the title of a provided newspaper article. The title should be a string.
We extract multiple fields. Let's assume we process and invoice. We extract the name of the recipient and the total amount to pay.
If we have a field with multiple answers, we can set isArray
to true. In this example, we process a conference paper and want to get back all the authors of that paper.
In this example, we want to process mechanical parts that are mentioned in our document. For these parts, we specify an object with two properties: part_id
and shipping_price
. Both properties could be saved separately like in the example , but in this case, we can simply save them as properties of this object:
This example is a more complex variation of the . Since our document can contain multiple parts to ship, we can simply set the isArray
property to true
and our results will contain a list of parts! Additionally, we can create another field called date that holds the current date.