LangChain
Give a LangChain agent the live web. The langchain-specstream package adds four tools and a retriever: the Search API finds pages, the Extract API reads them (web pages, PDF, Word and Excel), and Deep Search returns the finished list. For a list, the agent asks in plain words, like “dental clinics in Lisbon with online booking”, and gets back every matching row, each with its source URL. You set what one list may cost, in code. The model can’t raise it.
Install
Create the key under Agents & API in your workspace (more on keys). A free account comes with $10 of credit and needs no card: sign up. The package works with LangChain 0.3 and 1.x on Python 3.10 or later.
An agent that finds lists
The agent writes the request and picks how many rows. You decide what one list may cost.
| Tool | The model gives | What happens |
|---|---|---|
specstream_find_list | request, max_results | Reads the request, prices it, starts it only within max_price_usd, waits up to seven minutes and returns every row. You pay per row that matches. |
specstream_get_list_results | list_id | Every row found so far, for a list that was still running. Free. |
When the price is above your maximum, nothing runs: the tool returns the price, so the agent can ask for fewer rows or tell the user. When a request is too vague to price (“clinics”), it returns how SpecStream read it, so the agent can add the place or the conditions.
Use the classes directly when you want different settings per tool:
What comes back
One flat row per match: the list’s own columns, then where the row was read. This is a real row from the request above.
Columns follow the request. Ask for breweries with their website and the rows carry the brewery and its website instead. A fact a source doesn’t publish comes back empty, never guessed. The list_link opens the same list in your workspace, where you can map it, export it or keep it current.
As a retriever
One document per row, its facts as text and its source in the metadata, so a chain can cite every claim. Above the maximum, the retriever raises SpecStreamError and nothing runs.
Money, plainly
max_price_usdlives on the tool, in your code. The model never sees it and can’t change it.- You pay for rows that match. Candidates SpecStream couldn’t confirm are left out and aren’t billed.
- A retried step asking for the same list within the hour gets the list it already started, not a second bill.
- Rates and plans: pricing. How charges work: billing.
Every tool over MCP
The package covers finding a list and reading it. For everything else (schedules, exports, sharing, enrichment of your own list), load the whole MCP server with langchain-mcp-adapters:
Source and issues: GitHub (opens in a new tab). Package: PyPI (opens in a new tab).
SearxSearchWrapper on the Search API
For code that already uses SearxSearchWrapper from langchain-community: it searches with the Search API once you change searx_host, or the SEARX_HOST environment variable. Use either value, with your key in place of YOUR_SPECSTREAM_KEY:
The address then holds your key, so keep it in a secret or an environment setting.
To check it, run one search. It prints a title and a link for each result, and search.run() returns the snippets as one string for a chain:
TavilySearch on the Search API
For code that uses TavilySearch from langchain-tavily: set api_base_url to https://api.specstream.ai/tavily and pass your key as tavily_api_key. The tool returns the results as a dictionary, each with a title, URL, and content:
ExaSearchRetriever on the Search API
For code that uses ExaSearchRetriever from langchain-exa: set exa_base_url to https://api.specstream.ai/exa and pass your key as exa_api_key. It returns one document per result:
BraveSearchWrapper on the Search API
For code that uses BraveSearchWrapper from langchain-community: set base_url to https://api.specstream.ai/res/v1/web/search and pass your key as api_key. Set a count: without one, Brave asks for 20 results and each search is priced as a search of 20 results.
BingSearchAPIWrapper on the Search API
For code that uses BingSearchAPIWrapper from langchain-community: set bing_search_url to https://api.specstream.ai/v7.0/search, or the BING_SEARCH_URL environment variable, and pass your key as bing_subscription_key:
Each search is one Search API call at $5 per 1,000 searches of up to 10 results. It comes out of your balance, with no quote and no approval. Search API has the details.
Get your key on the Search API screen of your SpecStream workspace. New accounts start with $10 of credit, no card.
The same setting works in other tools too: Search API by one setting.