> ## 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](https://docs.raily.ai/connect/sdk.md).)

> [card] [Python](https://docs.raily.ai/sdks/python.md)
>
> `pip install raily-ai`

> [card] [TypeScript / JavaScript](https://docs.raily.ai/sdks/javascript.md)
>
> `npm install @raily/sdk`

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](https://docs.raily.ai/connect/sdk.md) — 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.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.