web-search

Perform web searches via CLI or SDK and return structured result items.

Updated Jan 7, 2026
One-click install
npx skills add https://github.com/ashishkushwaha-mpu/ChocoWrap --skill web-search-ashishkushwaha-mpu
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: web-search
Source: https://github.com/ashishkushwaha-mpu/ChocoWrap/tree/main/skills/web-search
Command: npx skills add https://github.com/ashishkushwaha-mpu/ChocoWrap --skill web-search-ashishkushwaha-mpu

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires z-ai-web-dev-sdk, and includes scripts (resource) components.

What problem does it solve?

This Skill enables applications to perform web searches and retrieve current information using the z-ai-web-dev-sdk. It returns structured search results that include URLs, snippets, host names, dates, and other metadata, enabling dynamic content discovery and up-to-date information retrieval.

Core Features & Use Cases

  • CLI-driven searches for quick information retrieval and testing.
  • SDK-based programmatic web_search invocations in production apps.
  • Structured result shape: SearchFunctionResultItem with fields url, name, snippet, host_name, rank, date, favicon.
  • Use cases include real-time news gathering, research, content discovery, and competitive analysis.

Quick Start

Use the web search skill to perform a simple query via CLI: z-ai function --name "web_search" --args '{"query": "artificial intelligence"}' Or integrate into your app with the SDK: const zai = await ZAI.create(); const results = await zai.functions.invoke('web_search', { query: 'machine learning', num: 5 }); Save results to a JSON file: z-ai function -n web_search -a '{"query": "climate change", "num": 5}' -o results.json

Frequently Asked Questions about web-search

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I integrate real-time web search into a backend application?▼

Real-time web search integration uses the z-ai-web-dev-sdk to return structured results like URLs, snippets, and dates. You can programmatically invoke the web_search function within your production app to retrieve current information.

What is the best way to perform quick web searches during development?▼

Quick web searches during development are best performed using the CLI. You can execute z-ai function commands with a query argument to instantly retrieve and test search results without modifying your application code.

Does the z-ai-web-dev-sdk support structured search results?▼

The z-ai-web-dev-sdk supports structured search results by returning SearchFunctionResultItem objects. These items contain specific fields including url, name, snippet, host_name, rank, date, and favicon for dynamic content discovery.

How do I save web search results to a JSON file via CLI?▼

Saving web search results to a JSON file via CLI requires the -o flag. Execute the z-ai function command with the web_search name, pass your query arguments, and specify an output file path to store the retrieved data.

Can I use web search for news gathering and competitive analysis?▼

Web search is applicable for news gathering and competitive analysis. It satisfies backend integration with z-ai-web-dev-sdk, enabling real-time information retrieval, research, and up-to-date content discovery for dynamic applications.

What limitations exist when retrieving current information through web search?▼

Limitations of retrieving current information through web search include dependency on the z-ai-web-dev-sdk environment. Results are structured as SearchFunctionResultItem objects, so you must handle the specific returned fields like url and snippet within your application logic.