---
title: "Extract document content from a URL"
method: POST
path: "/api/processor/extract-content-from-url"
tags: ["processor"]
---

# Extract document content from a URL

`POST /api/processor/extract-content-from-url`

## Request

- Base URL: `https://localhost:8080`
- URL: `https://localhost:8080/api/processor/extract-content-from-url`
- Auth: `bearer` (a scheme the document does not define)

Server-side proxy to processor POST /custom-documents/extract-content-from-url. Caller must be authenticated.

## Request body

- ExtractContentFromUrlDto
  - `url` string, required: HTTPS URL of the document to fetch and extract
  - `max_pages` object, nullable: Max PDF pages; an over-limit PDF is refused. Send null for no per-request cap (the processor's own ceiling still applies). Omit to use the processor default (10).
  - `truncate_to_max_pages` boolean: Read the first max_pages pages of a longer PDF instead of refusing it.
  - `text_format` 'markdown' | 'plain': PDF text format. `plain` is much faster; `markdown` keeps headings and tables.
  - `deadline_seconds` number: Seconds the caller will wait; work past it is skipped.

## Response `200`

Processor extract-content-from-url response

## Other responses

- `400`: Validation error
- `401`: Unauthorized
- `502`: Processor unreachable or error

---

[API](https://skmtc.dev/opencase/apis/opencase-backend-api.md) · [All operations](https://skmtc.dev/opencase/apis/opencase-backend-api/llms.txt) · [OpenAPI document](https://skmtc.dev/opencase/apis/opencase-backend-api/revisions/f16c77cfd9a8?raw)
