> SpecStream is the live web data engine for teams and agents. This is the Markdown copy of https://specstream.ai/docs/sdk. Every page, with what SpecStream does and costs: https://specstream.ai/llms.txt

# SDKs and command line

Read a request, work with quotes, and continue saved research from your own code. Install the latest of either client from PyPI or npm. Building an agent with [LangChain](https://specstream.ai/docs/langchain.md), [LlamaIndex](https://specstream.ai/docs/llamaindex.md), [CrewAI](https://specstream.ai/docs/crewai.md), or the [Vercel AI SDK](https://specstream.ai/docs/vercel-ai-sdk.md)? Use its package.

## Python

Terminal

```bash
pip install specstream-client
```

Set `SPECSTREAM_API_KEY` to a key from your workspace, then create a client:

Python

```python
import os
from specstream_client import Client

client = Client(api_key=os.environ["SPECSTREAM_API_KEY"])
catalog = client.get_capacity_catalog()
request = client.compile("Find software companies in Germany with 50 to 500 employees that are hiring salespeople")
```

Compiling reads the request. It doesn't authorize paid work.

## TypeScript

Use Node.js 22 or later.

Terminal

```bash
npm install @specstream/sdk
```

typescript

```typescript
import { Client } from "@specstream/sdk"

const client = new Client({ apiKey: process.env.SPECSTREAM_API_KEY! })
const catalog = await client.getCapacityCatalog()
const request = await client.compile("Find software companies in Germany with 50 to 500 employees that are hiring salespeople")
```

## Command line

The Python package installs the `specstream` command. Configure the same API key in your environment.

Terminal

```bash
specstream --help
specstream families
specstream compile "Find software companies in Germany with 50 to 500 employees that are hiring salespeople"
```

## Homebrew

On a Mac, the SpecStream Homebrew tap installs the same `specstream` command, with Python set up for it.

## Packages for pipelines and agents

| Package | Install | What it does |
| --- | --- | --- |
| `specstream-mcp-stdio` | `uvx specstream-mcp-stdio` | A stdio bridge to the [MCP server](https://specstream.ai/docs/mcp.md#stdio), for clients that only run local servers. |
| `specstream-haystack` | `pip install specstream-haystack` | A fetcher and an agent tool for Haystack. Each row becomes a Document that carries its source URL. |
| `@specstream/convex` | `npm install @specstream/convex` | A Convex component. Ask for a list from your backend, cap the price in code, and the rows land in your tables while your UI watches. |
| `tap-specstream` | `pip install tap-specstream` | A Singer tap for Meltano and any Singer target. It reads every list your key can open, with each value's source page and read time. It only reads, so give its key a spending limit of $0. |

The framework packages have their own pages: [LangChain](https://specstream.ai/docs/langchain.md), [LlamaIndex](https://specstream.ai/docs/llamaindex.md), [CrewAI](https://specstream.ai/docs/crewai.md), and the [Vercel AI SDK](https://specstream.ai/docs/vercel-ai-sdk.md). [All frameworks](https://specstream.ai/docs/frameworks.md)

## GitHub Action

The SpecStream Find action runs a request inside a workflow. It reads the request, gets the price, stops if the price is above the maximum you set, runs it otherwise, and uploads the results as a CSV artifact named `specstream-results`. Nothing runs without `confirm_max_usd`.

| Input | What it sets |
| --- | --- |
| `request` | What you need, in your own words. Required. |
| `api_key` | A SpecStream API key. Keep it in a repository secret. Required. |
| `confirm_max_usd` | The most this step may spend, in US dollars. The step stops if the price is higher, and it never fills this in for you. Required. |
| `idempotency_key` | A stable identity for the run. It defaults to the workflow run and job, so a re-run picks up the same work and never pays twice. |
| `base_url` | The API origin. It defaults to https://api.specstream.ai. |
| `locale` | The language and region of the request. It defaults to en-US. |

The action has two outputs: `find_id`, the run's ID for the workspace and the API, and `csv_path`, the path to the results file.

## Install from a file

Prefer a file? [Download the Python wheel](https://specstream.ai/downloads/ed682decf9be3fe9/specstream_client-1.5.1-py3-none-any.whl) or [the TypeScript archive](https://specstream.ai/downloads/4015f00d6a0aa7f2/specstream-sdk-1.3.4.tgz). The [download manifest](https://specstream.ai/downloads/manifest.json) includes the filename, byte count, and SHA-256 hash for each file.

[Read the API guide and OpenAPI schema →](https://specstream.ai/docs/api.md)
