> ## 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 Search

> Find hidden-service (.onion) sites that mention a keyword, brand, domain, or email via Encrata's self-hosted onion index.

## Authentication

Requires an API key in the `Authorization` header.

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

## Request

<ParamField body="query" type="string" required>
  The keyword, brand, domain, or email to search for across onion services.
</ParamField>

<ParamField body="limit" type="number">
  Maximum number of onion services to return, `1`–`50`. Default: `20`.
</ParamField>

## Response

<ResponseField name="query" type="string">The query that was searched.</ResponseField>
<ResponseField name="count" type="number">Number of onion services returned.</ResponseField>

<ResponseField name="results" type="object[]">
  The matching onion services. Each entry contains `url`, `title`, and `snippet`.
</ResponseField>

<ResponseField name="credits" type="number">Credits charged (`0` when served from cache).</ResponseField>

<ResponseExample>
  ```json theme={"dark"}
  {
    "query": "acme corp",
    "count": 3,
    "results": [
      {
        "url": "http://exampleonion...onion/",
        "title": "Acme leak archive",
        "snippet": "Acme corp internal documents and credentials..."
      }
    ],
    "credits": 1
  }
  ```
</ResponseExample>

## Credits

1 credit per search. Cached results are free. Pass a discovered `url` to [Onion Render](/api-reference/endpoint/onion-render) to fetch a page.
