---
title: SDKs
description: Official PostGrad client libraries for TypeScript and Python.
---

The SDKs are for teams writing code. If you're using Claude Desktop, Cursor, Windsurf, n8n, or any other agent framework, you probably want the [MCP integration](/docs/mcp-integration) instead — it works without writing any code.

PostGrad offers official SDKs for two languages:

- **[TypeScript SDK](/docs/sdks/typescript)** — for Node.js, Deno, and browser environments
- **[Python SDK](/docs/sdks/python)** — for Python 3.9+ applications and AI frameworks

Both SDKs provide typed interfaces, automatic retry on rate limits, built-in error handling, and a `defaultFeed` option so you do not have to pass the feed header on every call. They wrap the [REST API](/docs/api) so you do not need to manage HTTP requests directly.

## Install

```bash
# TypeScript / JavaScript
npm install postgrad
```

```bash
# Python
pip install postgrad
```

## Quick example

```typescript
import { PostGrad } from 'postgrad'

const pg = new PostGrad({
  apiKey: process.env.POSTGRAD_API_KEY,
  defaultFeed: '00000000-0000-0000-0000-000000000000',
})

const results = await pg.knowledge.search({ q: 'pricing strategy' })
```

```python
from postgrad import PostGrad

client = PostGrad(
    api_key=os.environ["POSTGRAD_API_KEY"],
    default_feed="00000000-0000-0000-0000-000000000000",
)

results = client.knowledge.search(q="pricing strategy")
```

If you prefer to make HTTP requests directly, see the [REST API reference](/docs/api) or the [Bot Quickstart](/docs/bot-quickstart) for a curl walkthrough.
