langchain-webz
Search global news with Webz.io from Python - in natural language, with the most relevant articles first.
Webz.io News Search covers news and current events from sources worldwide. Ask a question in plain language, narrow results with filters (language, country, date, sentiment, domain, ticker, and more), and get back focused article excerpts with titles, URLs, and metadata.
Use this package on its own, or plug it into LangChain / LangGraph agents.
What you get
- Natural-language search - no keyword hacking. Example:
"EU AI Act enforcement updates"or"How is Tesla stock reacting to earnings?" - Worldwide coverage - semantic search over Webz.io's global news index.
- Rich filters - language, country, days, sentiment, domain, ticker, person, organization, topic, and more. See the MCP tool reference.
- Live schema - filters are loaded from the hosted MCP server (
tools/list). New Webz filters appear automatically, without republishing this package.
Install
pip install langchain-webz
export WEBZ_API_TOKEN="your-webz-api-token"
Get a token from your Webz.io dashboard (same token as the News Search API).
Full setup and client options: MCP Server docs.
Direct search (no agent required)
from langchain_webz import WebzNewsSearch
tool = WebzNewsSearch() # reads WEBZ_API_TOKEN from the environment
# tool = WebzNewsSearch(api_token="your-webz-api-token")
print(tool.invoke({
"query": "recent developments on EU AI regulation",
"k": 10,
"days": 30,
}))
Filtered search
from langchain_webz import WebzNewsSearch
tool = WebzNewsSearch()
# language, country, and date window
print(tool.invoke({
"query": "trade agreements between USA and Germany",
"k": 10,
"days": 7,
"language": ["english"],
"country": ["US", "GR"],
}))
# ticker and trusted publishers
print(tool.invoke({
"query": "earnings guidance and analyst reactions",
"ticker": ["NVDA"],
"domain": ["yahoo.com", "cnn.com"],
"k": 5,
}))
To see every filter your connection supports:
print(sorted(WebzNewsSearch().args))
With a LangChain / LangGraph agent
from langchain.agents import create_agent
from langchain_webz import get_webz_tools
tools = get_webz_tools()
agent = create_agent("openai:gpt-4.1-mini", tools)
result = agent.invoke({
"messages": [{
"role": "user",
"content": (
"Search Webz news for renewable energy investments "
"from the past 30 days and summarize with sources."
),
}]
})
print(result["messages"][-1].content)
Async helpers (when you already run inside an event loop):
from langchain_webz import aget_webz_tools, awebz_news_search
tools = await aget_webz_tools()
tool = await awebz_news_search()
How it works
This package connects to the hosted Webz News Search MCP server at https://news-search-mcp.webz.io/mcp. Each call runs a regular News Search API request with your token (same credits and rate limits). It does not hardcode filter fields - the tool schema comes from the live server.
Configuration
| Name | Default | Purpose |
|---|---|---|
WEBZ_API_TOKEN |
required | Webz API token from the dashboard |
WEBZ_MCP_URL |
https://news-search-mcp.webz.io/mcp |
Override for local MCP testing |
You can also pass api_token= and mcp_url= to the helpers.
Links
Metadata
Release files for langchain-webz 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| langchain_webz-0.1.1.tar.gz | 7.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| langchain_webz-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.8 kB
Release files / langchain_webz-0.1.1.tar.gz
| Download URL | langchain_webz-0.1.1.tar.gz |
|---|---|
| Size | 7.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e48560624f8748c407a7b9fc44038b281b6d8030331abbfb3d55204f0f2a791a
|
|
BLAKE2b-256 checksum How to use checksums |
329407d43e8687198ed35e5f88386438e6873eb0b5ffbbd497693d023248def5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.12
|
Release files / langchain_webz-0.1.1-py3-none-any.whl
| Download URL | langchain_webz-0.1.1-py3-none-any.whl |
|---|---|
| Size | 6.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d2ff8f8c3a4b72ad22bc8916cb1b34cd81d2caf68d86e37a0a5412300757da71
|
|
BLAKE2b-256 checksum How to use checksums |
c19768b355f4c32502fd70d934b6a0f09c272317e1644235b38200b9d80d09c3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.12
|