# Extract

Give it URLs and get each page back as clean text an agent can read.

```text
POST https://api.millionshort.com/v1/extract
```

Extract takes up to 20 URLs and returns, for each, the page's main content as Markdown or plain text, with its title, metadata and links. The call is synchronous. Each URL succeeds or fails on its own, and a URL that fails costs nothing, except a page that does not exist in a browser mode ([pricing](https://millionshort.com/docs/extract/pricing)).

## What it is for

- **Reading what a search found.** Search chooses the pages; Extract returns their text as it is now.
- **Reading a page you already know.** Documentation, a product page, a filing, a PDF.
- **Sorting pages without reading them.** Every page comes back with [labels](https://millionshort.com/docs/extract/labels): its topic, its kind, and the source that holds pages like it.
- **Many pages at once.** A [batch](https://millionshort.com/docs/extract/batch) takes up to 1,000 URLs as one job.

## How a page is obtained

One field, `mode`, decides. The modes differ in what reaches the site and in price:

| Mode | What it does | Who can use it |
|---|---|---|
| `live` | Fetches the page now, as our declared bot, within robots.txt | Every plan |
| `rendered` | Loads the page in a browser, so content built by scripts appears | Starter and up |
| `unblock` | A rendered fetch for sites that refuse automated requests | Growth and up |
| `stealth` | A rendered fetch for sites that refuse even `unblock` | Not switched on yet |
| `cached` | Returns a copy we already hold; nothing reaches the site | Switched off |
| `auto` | `cached` when a fresh enough copy exists, otherwise `live` | Behaves as `live` |

We identify ourselves to sites as `MillionShortBot`, honour robots.txt in every mode, and there is no option to ignore it. A caller cannot send cookies or headers to a site.

## In this section

| Part | Page |
|---|---|
| Quickstart | [One page as Markdown, then its failures and labels](https://millionshort.com/docs/extract/quickstart) |
| Parameters | [Every request field, the modes, and the response](https://millionshort.com/docs/extract/parameters) |
| Guides | [Search then read, keep only some pages, many pages](https://millionshort.com/docs/extract/guides) |
| Pricing and limits | [What a page costs in each mode, and the limits](https://millionshort.com/docs/extract/pricing) |
| Errors | [Per-URL errors and request errors](https://millionshort.com/docs/extract/errors) |

Two more pages cover what Extract can do: [Batch](https://millionshort.com/docs/extract/batch) and [Labels](https://millionshort.com/docs/extract/labels).

## Page text without a fetch

A search can also return the page text we hold for web and news results, with [`include_content`](https://millionshort.com/docs/search/highlights), and up to 2,000 characters of snippet per result with `max_chars_per_result`. No request is made to the site for either.

## With the other endpoints

[Monitor](https://millionshort.com/docs/monitor) watches a page with the same fetcher and the same rules, and its events carry the same labels. [Map](https://millionshort.com/docs/map) and [Crawl](https://millionshort.com/docs/crawl) fetch the same way: a crawl is a batch that finds its own URLs, and each of its pages is an Extract result.
