- name
- moark-web-search
- description
- Search web content such as webpages, images, and videos using the /web-search API with an Access Token.
- metadata
Web Search
This skill allows users to search web content through the /web-search API. It is suitable for information lookup, recent content discovery, webpage search, image search, and video search.
Usage
Ensure you have installed the required dependency (pip install requests). Use the bundled script to perform the search.
python {baseDir}/scripts/perform_web_search.py \
--query "阿里巴巴2024年的ESG报告" \
--summary true \
--freshness noLimit \
--count 10 \
--api-key YOUR_API_KEYOptions
--query- Search keywords or a natural language question.--summary- Whether to include summaries in the results. Acceptstrueorfalse. Default istrue.--freshness- Time filter. Options:noLimit,oneDay,oneWeek,oneMonth,oneYear.--count- Number of results to return. Default is10.--api-key- API key used in theAuthorization: Bearerheader. If omitted, read fromGITEEAI_API_KEY.
Workflow
- Execute
perform_web_search.pywith the user parameters. - Parse the script output and find the line starting with
SEARCH_RESULTS_JSON:. - Extract the JSON payload from that line.
- Summarize the most relevant results for the user, prioritizing
webPages.value.
Notes
- The response language should be consistent with the user's question.
- Prefer
webPages.valueunless the user explicitly asks for images or videos. - If the user asks for recent information, set
--freshnessaccordingly. - If the API returns no results, say that directly instead of fabricating answers.
- If
GITEEAI_API_KEYis missing, the user must provide--api-key. - The script prints
SEARCH_RESULTS_JSON:in the output. Always parse that line.