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

# Onion Render

> Fetch a single .onion page over Tor and return its sanitized HTML plus extracted text, emails, linked onions, and outbound links.

## Authentication

Requires an API key in the `Authorization` header.

```bash theme={"dark"}
Authorization: Bearer YOUR_API_KEY
```

## Request

<ParamField body="url" type="string" required>
  The `.onion` URL to fetch typically a `url` returned by [Onion Search](/api-reference/endpoint/onion-search). Must contain `.onion`.
</ParamField>

## Response

<ResponseField name="url" type="string">The onion URL that was fetched.</ResponseField>
<ResponseField name="title" type="string">The page title.</ResponseField>
<ResponseField name="status" type="number">HTTP status returned by the onion service.</ResponseField>
<ResponseField name="live" type="boolean">Whether the service responded successfully.</ResponseField>
<ResponseField name="truncated" type="boolean">Whether the HTML was truncated to stay within size limits.</ResponseField>
<ResponseField name="html" type="string">Sanitized HTML scripts and active content stripped, safe to render in a sandboxed frame.</ResponseField>
<ResponseField name="text" type="string">Plain-text content extracted from the page.</ResponseField>
<ResponseField name="emails" type="string[]">Email addresses found on the page.</ResponseField>
<ResponseField name="phones" type="string[]">Phone numbers found on the page.</ResponseField>
<ResponseField name="links" type="string[]">Outbound links found on the page.</ResponseField>
<ResponseField name="onions" type="string[]">Other `.onion` addresses linked from the page.</ResponseField>
<ResponseField name="credits" type="number">Credits charged (`0` when served from cache).</ResponseField>

<ResponseExample>
  ```json theme={"dark"}
  {
    "url": "http://exampleonion...onion/",
    "title": "Acme leak archive",
    "status": 200,
    "live": true,
    "truncated": false,
    "html": "<html>...</html>",
    "text": "Acme corp internal documents...",
    "emails": ["admin@exampleonion.onion"],
    "phones": [],
    "links": ["http://exampleonion...onion/files"],
    "onions": ["http://another...onion"],
    "credits": 1
  }
  ```
</ResponseExample>

## Credits

1 credit per render. Repeat renders of the same URL are served from cache for free.
