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

# SDKs

> Search your data from your own code with the Python or TypeScript SDK.

The Raily SDKs call your search endpoint from your own code — a backend service or an
agent you build. Install, add your endpoint URL and API key, and get back ranked,
structured results. (Third-party agents like Claude and ChatGPT connect to the same
endpoint over MCP instead — see [Connect](/connect/sdk).)

<CardGroup cols={2}>
  <Card title="Python" icon="python" href="/sdks/python">
    `pip install raily-ai`
  </Card>

  <Card title="TypeScript / JavaScript" icon="js" href="/sdks/javascript">
    `npm install @raily/sdk`
  </Card>
</CardGroup>

Both SDKs share the same shape (Python shown):

```python theme={null}
client.search("your search query", limit=5)  # → ranked results with display fields
```

New to it? Start with the [SDK quickstart](/connect/sdk) — get a key and run your first search
in a couple of minutes.

## What you get

* **One method** — `search(query, limit)` returns ranked results; no setup beyond a key.
* **Typed results** — each hit has a `score`, the `source_collection` it came from, and
  your data's display `fields` (title, text, dates, …).
* **Sync and async** (Python) and **promise-based** (TypeScript), safe to reuse across requests.
* **Clear errors** — a dedicated `RailyAuthError` for key problems, `RailyError` for the rest.
