> ## Documentation Index
> Fetch the complete documentation index at: https://docs.truscan.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Page content

> Extract readable text and markdown from URLs you already have.

`POST /api/search/contents` runs Truscan's extractor on URLs you supply, the
same extractor that populates `content` on search results.

```bash theme={null}
curl https://api.truscan.co/api/search/contents \
  -H "Authorization: Bearer $TRUSCAN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "urls": [
      "https://example.com/article",
      "https://example.org/paper"
    ]
  }'
```

<ParamField body="urls" type="string[]" required>
  Between 1 and 8 absolute URLs.
</ParamField>

## Response

`result` is an object keyed by the URL you submitted, so you can look each one
up directly:

```json theme={null}
{
  "success": true,
  "message": "ok",
  "result": {
    "https://example.com/article": {
      "text": "Plain readable text...",
      "markdown": "## Heading\n\nReadable markdown...",
      "excerpt": "First meaningful paragraph...",
      "words": 1420,
      "lang": "en",
      "author": "Jane Doe",
      "site_name": "Example",
      "truncated": false
    }
  }
}
```

| Field       | Meaning                                                    |
| ----------- | ---------------------------------------------------------- |
| `text`      | Body copy with navigation, ads, and boilerplate removed    |
| `markdown`  | The same content with headings, lists, and links preserved |
| `excerpt`   | A short summary-length opening extract                     |
| `words`     | Word count of `text`                                       |
| `lang`      | Detected language                                          |
| `truncated` | `true` if the page exceeded the extraction limit           |
| `error`     | Present only when that URL could not be extracted          |

## Partial failures

A URL that cannot be fetched or parsed does not fail the request. Its entry
carries an `error` instead of content, so always check before reading `text`:

```json theme={null}
{
  "https://example.com/paywalled": { "error": "content_unavailable" }
}
```

<Warning>
  Requests to private, loopback, and link-local addresses are refused. Only
  publicly routable URLs can be extracted.
</Warning>

## Cost

Extraction is billed at **\$1.00 per 1,000 pages**, counted per URL successfully
extracted. Setting `enrich: false` on a search skips this cost entirely if you
only need links.
