---
title: "Transform unstructured text to structured JSON"
method: POST
path: "/v1/utils/text-to-json"
tags: ["Utilities"]
---

# Transform unstructured text to structured JSON

`POST /v1/utils/text-to-json`

Transforms unstructured text into structured JSON according to a provided schema. This utility endpoint extracts specific data patterns from free-form content.

## Request body

- TextToJsonPayload — Request payload for transforming unstructured text into structured JSON
  - `text` string, required — Unstructured text to transform
  - `schema` object, required — JSON Schema for transforming text into structured data

## Response `200`

JSON data extracted from text

- TextToJsonResponse — Response containing the structured JSON data extracted from text
  - `data` object — Extracted structured data that conforms to the provided schema

## Other responses

- `400` — Invalid input or schema
- `500` — Server-side processing error

## Changes

- **2025-05-09** `87ed6bc1a434` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/sullyai/apis/sully-api/changes/v1/utils/text-to-json/post.md)

---

[API](https://skmtc.dev/sullyai/apis/sully-api.md) · [All operations](https://skmtc.dev/sullyai/apis/sully-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/sullyai/sully-api/revisions/a6ecf503233c/schema)
