Skip to main content

langchain-specstream

SpecStream is the live web data engine. One platform to build, search, extract, enrich, map, and monitor data across the entire web.

Ask for any dataset in plain words, and SpecStream builds it from the entire live web: every match found, extracted and enriched into structured records, then monitored for change. This package gives your LangChain agent two tools and a retriever for it. A run starts only within a price you set in code, and the model can't raise it.

Source URL and read time on every value.

pip install -U langchain-specstream
export SPECSTREAM_API_KEY=ss_live_...   # Agents & API in your SpecStream workspace

A free account comes with $10 of credit to use within 30 days and needs no card: specstream.ai.

An agent that can find data

from langchain.agents import create_agent
from langchain_specstream import specstream_tools

agent = create_agent(
    "anthropic:claude-sonnet-5-5",
    tools=specstream_tools(max_price_usd=5),
)
agent.invoke({"messages": [{"role": "user", "content":
    "Find open-source vector databases on GitHub with more than 5,000 stars. Which licenses are most common?"}]})

The agent writes the request and picks how many rows. You decide what one list may cost.

What comes back

One flat row per match: the request's own columns, then where the row was read. For the request above, each row has this shape:

{
  "list_id": "fnd_...",
  "position": 1,
  "Repository": "<owner/name>",
  "Stars": "<star count>",
  "License": "<license>",
  "source_url": "https://github.com/<owner>/<name>",
  "checked_at": "<when SpecStream read the page>",
  "list_link": "https://specstream.ai/workspace/collections/fnd_..."
}

Columns follow the request, so a different request brings different columns. A fact a source doesn't publish comes back empty, never guessed.

The four tools

Tool The model gives What happens Cost
specstream_web_search q, passages Calls GET /v1/web-search and returns the answer, matching rows, ranked sources and optional page passages $5 per 1,000 searches
specstream_extract_pages urls, format Calls POST /v1/extract and returns the clean main text, title and published date of 1 to 20 web pages, PDFs, Word or Excel files $0.80 per 1,000 pages (empty pages free)
specstream_find_list request, max_results Reads the request, prices it, starts it only within max_price_usd, waits up to wait_seconds (7 minutes by default) and returns every row Only delivered rows
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:

from langchain_specstream import SpecStreamFindList, SpecStreamGetListResults

find = SpecStreamFindList(max_price_usd=20, wait_seconds=600)
results = SpecStreamGetListResults()

As a retriever

from langchain_specstream import SpecStreamRetriever

retriever = SpecStreamRetriever(max_price_usd=3, max_results=25)
docs = retriever.invoke("Breweries in Portland, Oregon that host events, with their website")

docs[0].page_content          # "Business location: Occidental Brewing Company\nPublished business website: http://occidentalbeers.com ..."
docs[0].metadata["source_url"]  # the page that row was read from

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_usd lives 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: specstream.ai/pricing.

When to reach for it

When the answer is many things that meet conditions: companies in a city, clinics with a service, funding filings, open grants, tenders, repositories, people in a role. For a single fact or a summary of one page, a search tool fits better.

More

MIT licensed. Made by SpecStream, the live web data engine for teams and agents.

Metadata

Release files for langchain-specstream 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for langchain-specstream 0.2.0
File Size Uploaded Provenance Actions
langchain_specstream-0.2.0.tar.gz 12.6 kB With provenance Details for langchain_specstream-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for langchain-specstream 0.2.0
File Interpreter ABI Platform Actions
langchain_specstream-0.2.0-py3-none-any.whl Python 3 none any Details for langchain_specstream-0.2.0-py3-none-any.whl

Total release size: 25.5 kB

Release files / langchain_specstream-0.2.0.tar.gz

Download URL langchain_specstream-0.2.0.tar.gz
Size 12.6 kB
Tags Source
SHA-256 checksum
How to use checksums
ebbe2d0896882e27f6992bf025953e75f535d4fcd75393235a1e6042d52351db
BLAKE2b-256 checksum
How to use checksums
f71b7e67ef2812db3ea8a88349cf9fa33b434f90c760150a1a30bd00fb623f0c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 7, 2026.

Transparency log

Release files / langchain_specstream-0.2.0-py3-none-any.whl

Download URL langchain_specstream-0.2.0-py3-none-any.whl
Size 12.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
01f426535c4b55e72361972640e29b36a6344e3cdbac94314899989e5c9eeddd
BLAKE2b-256 checksum
How to use checksums
967b70131a5190b1ea920cb564d6c8df056701695a92798ce5e41afbe4977600
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 7, 2026.

Transparency log

Security for langchain-specstream 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for langchain_specstream-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 7, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page