Skip to main content

llama-index-tools-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 LlamaIndex 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 llama-index-tools-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 llama_index.tools.webz import WebzNewsSearch, flatten_tool_result

tool = WebzNewsSearch()  # reads WEBZ_API_TOKEN from the environment
# tool = WebzNewsSearch(api_token="your-webz-api-token")

result = tool.call(
    query="recent developments on EU AI regulation",
    k=10,
    days=30,
)
print(flatten_tool_result(result))

To see every filter your connection supports:

print(sorted(WebzNewsSearch().metadata.fn_schema.model_fields))

With a LlamaIndex agent

The agent discovers the live tool schema and picks filters itself. Any tool-calling LLM works (Llama, GPT, Claude, and others). The snippet uses Llama via OpenRouter.

from llama_index.core.agent.workflow import FunctionAgent
from llama_index.llms.openai_like import OpenAILike
from llama_index.tools.webz import get_webz_tools

tools = get_webz_tools()
# OpenAI-compatible client; any tool-calling LLM works (Llama shown here)
llm = OpenAILike(
    model="meta-llama/llama-3.3-70b-instruct",
    api_key="your-openrouter-key",
    api_base="https://openrouter.ai/api/v1",
    is_chat_model=True,
    is_function_calling_model=True,
)
agent = FunctionAgent(
    tools=tools,
    llm=llm,
    system_prompt="You are a helpful assistant that searches global news with Webz.",
)
response = await agent.run(
    "Search Webz news for renewable energy investments "
    "from the past 30 days and summarize with sources."
)
print(str(response))

Async helpers (when you already run inside an event loop):

from llama_index.tools.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 using llama-index-tools-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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

llama_index_tools_webz-0.1.0.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

llama_index_tools_webz-0.1.0-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file llama_index_tools_webz-0.1.0.tar.gz.

File metadata

  • Download URL: llama_index_tools_webz-0.1.0.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.10.12

File hashes

Hashes for llama_index_tools_webz-0.1.0.tar.gz
Algorithm Hash digest
SHA256 109f8edccedbe35f5bea6864569b955b08f09d3d7fc85fdcd2258b9f011ceb32
MD5 099eb4af27a3241490638161bf1614d7
BLAKE2b-256 eff2c6a322603fc070ca55672ae13250ac4fe56ce847595542490e0d00da6bef

See more details on using hashes here.

File details

Details for the file llama_index_tools_webz-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for llama_index_tools_webz-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6b1a1e19ee06fba0ad981d57ceb1b1fce72377c96bee203553d5a40fc4d598f4
MD5 b1aa9a1e23d12a5e98c6ebf201d81237
BLAKE2b-256 b22b172e40c3076110684456f3f9276045c7dbf03d1787e8066641fe317721ad

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 files

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