---
title: "Pull named fields out of free text as JSON - names, dates, amounts, references, anything you list. Every field you ask for appears in the answer: one the text does not contain comes back null rather than guessed, so \"not in the text\" and \"model did not answer\" are never confused. Fixed price per call."
method: POST
path: "/v1/tools/extract-data"
---

# Pull named fields out of free text as JSON - names, dates, amounts, references, anything you list. Every field you ask for appears in the answer: one the text does not contain comes back null rather than guessed, so "not in the text" and "model did not answer" are never confused. Fixed price per call.

`POST /v1/tools/extract-data`

## Request

- Base URL: `https://agents.dexl.io`
- URL: `https://agents.dexl.io/v1/tools/extract-data`
- Auth: API key in header `X-Payment`

Paid per call via x402. Send without payment to get the exact price in the 402.

## Request body

- object
  - `text` string, required
  - `fields` union[], required
    - union
      - string: Field name
      - object
        - `name` string, required
        - `description` string
        - `type` 'string' | 'number' | 'boolean' | 'array'

## Response `200`

The tool output

## Other responses

- `400`: The input did not match the schema
- `402`: Payment required

---

[API](https://skmtc.dev/dexl/apis/dexl-agents.md) · [All operations](https://skmtc.dev/dexl/apis/dexl-agents/llms.txt) · [OpenAPI document](https://skmtc.dev/dexl/apis/dexl-agents/revisions/e3692765c3f7?raw)
