---
title: "Unified Document Extract"
method: POST
path: "/v1/documents/extract"
tags: ["Unified Agent APIs"]
---

# Unified Document Extract

`POST /v1/documents/extract`

Unified document extraction.

Extracts structured data from a URL or raw content. Provide either:
- A URL (we scrape it first, then extract)
- Raw content (we extract directly)

And either:
- An extraction_prompt (natural language: "Extract all product prices")
- A JSON schema (we extract data matching the schema)

Uses the proven O-mega pattern: Firecrawl scrape + Claude LLM extraction.

## Request body

- DocumentExtractRequest
  - `url` string, nullable — URL to scrape and extract from
  - `content` string, nullable — Pre-scraped content to extract from (alternative to url)
  - `extraction_prompt` string, nullable — REQUIRED unless schema is provided. Natural language description of what to extract, e.g. 'Extract all product prices and features'
  - `schema` object, nullable — REQUIRED unless extraction_prompt is provided. JSON schema defining the structure of data to extract

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/suprsonic/apis/suprsonic-unified-agent-api.md) · [All operations](https://skmtc.net/suprsonic/apis/suprsonic-unified-agent-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/suprsonic/suprsonic-unified-agent-api/versions/2a1b6fcb4ef0/schema)
