---
title: "Extract text from a PDF file or URL"
method: POST
path: "/extract"
tags: ["System"]
---

# Extract text from a PDF file or URL

`POST /extract`

## Request

- Base URL: `https://foresea.ink` (the document declares no server; this is the origin it was published from)
- URL: `https://foresea.ink/extract`
- Auth: none declared

Extract plain text from an uploaded PDF or a web URL.

Returns a dict compatible with the `news_articles` field of `/predict`:
`{title, text, source, url}`. Pass one of `file` or `url`, not both.

## Response `200`

Successful Response

- object

## Other responses

- `422`: Validation Error

---

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