使用阿里云IQS API进行实时网页搜索和页面读取。当用户需要最新信息、新闻、事实核查或访问URL时,请优先使用此技能。
readpagesearchFollow the best practices to determine parameter values. Use default values when uncertain:
Follow the best practices to determine parameter values. Use default values when uncertain:
You MUST execute the scripts via bash command (e.g., node scripts/search.mjs ... or node scripts/readpage.mjs ...). Do NOT use your built-in web_search, WebFetch, or any other internal tools as substitutes. If the script fails, retry or report the error — do NOT fall back to built-in tools.
ParameterTypeRequiredDefaultDescription--querystringYes-Search query (1-500 chars)--engineTypestringNoLiteAdvancedSearch engine type--timeRangestringNoNoLimitTime range filter--contentsstringNo-Type of return content--numResultsintNo10Number of search results (1-10)
1. Query Optimization ( --query)
2. Engine Selection ( --engineType)
The four engines differ significantly in latency, recall depth, content length, and cost. Pick the cheapest engine that meets the task — do NOT default to Deep; it is ~10× slower and 50× more expensive than the standard engine.
EngineAvg RTResult countsnippetmainTextAdvanced filtersMultilingualCost ratio (vs Standard)Use caseGeneric950ms10~150 chars≤3000 chars✗Medium1×General search, news/realtime, scene queries like weather (supports city/ ip)LiteAdvanced500ms1-50500 chars≤3000 chars✓GoodLite-tier 1×Default recommendation: low-latency semantic search; snippets are already rich enoughDeep~6s1-50≤500 chars≤50000 chars✓Good (CN/EN)**Vertical 50×**Complex multi-step reasoning, research reports, offline/Agent tasks needing deep browsing
Decision rules:
Default → LiteAdvanced: low latency + semantic search + snippet covers most Agent needs without needing extra mainText fetches.
Choose Generic when: the query is short and clearly informational (news, weather, simple facts), or when minimizing cost matters; also the only engine honoring city / ip for scene results (weather etc.).
Choose Deep ONLY when: the question is multi-hop / complex reasoning (FRAMES/BrowseComp-style), OR you need very long mainText (≤50000 characters, ~16× longer than other engines) for downstream LLM reasoning.
Deep for: real-time chat, simple lookups, high-QPS scenarios — latency (~6s) and cost (50×) are prohibitive.3. Time Range Selection ( --timeRange)
NoLimit: Default when uncertain - engine optimizes based on query relevanceOneDay: Today onlyOneWeek: Last 7 daysOneMonth: Last 30 daysOneYear: Last 365 days4. Content Return ( --contents)
mainText: Return full main text content - Use when detailed information is needed, such as technical documentation, research reports, or in-depth articlessummary: Return concise summary only - Use when a quick overview is sufficient, or when the page content is too large and token reduction is needed5. Result Count ( --numResults)
ParameterTypeRequiredDefaultDescription--urlstringYes-Target page URL--formatstringNomarkdownReturn format--timeoutnumberNo60000Total timeout in milliseconds--pageTimeoutnumberNo15000Page load timeout in milliseconds--stealthnumberNo0Enable stealth mode (0 or 1)--extractArticlebooleanNofalseExtract main article content only
1. Format Selection ( --format)
markdown: Best for articles, preserves structure (default)text: Best for data extractionhtml: When structure analysis needed2. Article Extraction ( --extractArticle)
3. Handling Failures ( --timeout, --stealth)
--timeout value--stealth 1bash
node scripts/search.mjs --query "量子计算原理" --engineType LiteAdvanced
bash
node scripts/search.mjs --query "最新金融政策" --engineType Generic --timeRange OneWeek
bash
node scripts/search.mjs --query "www.aliyun.com" --engineType LiteAdvanced --numResults 3
bash
node scripts/search.mjs --query "AI 法案" --engineType LiteAdvanced --contents mainText
bash
node scripts/search.mjs --query "人工智能行业年度报告" --engineType LiteAdvanced --contents summary
bash
# Returns up to 50000-char mainText per result; latency ~6s. Default timeout auto-bumps to 60s for Deep.
node scripts/search.mjs --query "对比 GPT-5 与 Claude Opus 4.7 的代码能力差异" --engineType Deep --numResults 5 --contents mainText
bash
node scripts/readpage.mjs --url "https://example.com/article" --format markdown --extractArticle true
bash
node scripts/readpage.mjs --url "https://example.com/article" --format text --timeout 60000
bash
node scripts/readpage.mjs --url "https://example.com/article" --format markdown --stealth 1 --extractArticle true
After executing any search.mjs or readpage.mjs command:
ls -la <filepath> and head -20 <filepath> to confirm the file exists and contains valid data.If the script returns an error about missing API key:
STOP the current task immediately. Do NOT fall back to built-in tools (WebFetch, web_search, curl, etc.) as substitutes.
Report the error to the user and ask the user to configure the API key:
Retry the task with following instruction: Method 1: Environment Variable
bash
export ALIYUN_IQS_API_KEY="your-api-key"
Method 2: Configuration File
Create or edit ~/.alibabacloud/iqs/env:
bash
ALIYUN_IQS_API_KEY=your-api-key