langchain-webz
LangChain and LangGraph tools for Webz.io News Search.
This package does not hardcode search filters. It connects to the hosted MCP server and loads the live tool schema with tools/list. When the MCP adds a filter, agents see it on the next connection.
pip install langchain-webz
export WEBZ_API_TOKEN="your-webz-api-token"
Direct tool call
from langchain_webz import WebzNewsSearch
# env: WEBZ_API_TOKEN
tool = WebzNewsSearch()
# or pass the token in code
tool = WebzNewsSearch(api_token="your-webz-api-token")
print(tool.invoke({"query": "AI regulation Europe"}))
Agent / LangGraph
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": "What is the latest EU AI news?"}]})
print(result["messages"][-1].content)
Inside an already running event loop, use the async helpers:
from langchain_webz import aget_webz_tools, awebz_news_search
tools = await aget_webz_tools()
tool = await awebz_news_search()
Config
| 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 |
You can also pass api_token= and mcp_url= to the helpers.
Get a token: https://webz.io
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file langchain_webz-0.1.0.tar.gz.
File metadata
- Download URL: langchain_webz-0.1.0.tar.gz
- Upload date:
- Size: 6.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7bc470f18ec7509dbbd9cb230df08cc08abcc904c1f6ab88648e76648f912e6b
|
|
| MD5 |
f3910306f09f0bf2cc24dae9bb1cff9c
|
|
| BLAKE2b-256 |
a8946b3877f733fe0a7f537f5777ab002ccde423869d8ab5d6a63cb301c19dbd
|
File details
Details for the file langchain_webz-0.1.0-py3-none-any.whl.
File metadata
- Download URL: langchain_webz-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5a6335379ea60787619d4cc0f515d9cd83f40a1ab69f3d0e0490ac8479deaa72
|
|
| MD5 |
907e8984f127953779e19e93144a4f2c
|
|
| BLAKE2b-256 |
19535228c0745b164bff1c0bafd87293cefb682493e6676eac6922f719985480
|