POST /v1/extract-structuredStructured data extractor from text
Agent Tools lf-agent-tools
Finds the important fields in a block of text and hands them back in a clean shape. Returns the extracted values, a confidence score, and any warnings.
Request Body
Content-Type: application/json
| Field | Type | Required | Description |
|---|---|---|---|
text | string | Yes | Unstructured text |
schema | object | Yes | Target fields and types |
Response Schema
extracted (object): Extracted field values
confidence (number): Extraction confidence
warnings (array): Extraction warnings
cURL Example
curl -X POST 'https://lf-agent-tools.laminarforge.dev/v1/extract-structured' -H 'Authorization: Bearer lf_YourApiKey' -H 'Content-Type: application/json' -d '{}'Python Example
import requests
url = 'https://lf-agent-tools.laminarforge.dev/v1/extract-structured'
headers = {'Authorization': 'Bearer lf_YourApiKey'}
data = {}
response = requests.post(url, headers=headers, json=data)
print(response.json())