lingtai-search
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "lingtai-search" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-ce7e165414c3d84f601b76f440383d02b55d01eb59da669ae9d9d6379572071d. Verify the upstream source and version against https://skillhub.cn/skills/user_90a020b6/erdong-lingtai-search before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
skillhub.cn
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
A connected search solution that prefers Doubao Custom (domestic direct ~700ms), falls back to TAVILY, and uses ANYSEARCH as a last resort. It requires no Lingtai server or external dependencies—just one API key. It supports both command-line and Python import triggers and responds to user prompts like “search,” “search for,” “help me check,” or “web search.”
Introduction source: third_party · user_90a020b6 · 1.2.2 Reference
SkillPi interpretation
- Tasks
- Translation pending; see source documentation.
- Audience
- Not specified in the source documentation.
- Inputs and outputs
- Translation pending; see source documentation.
- Software, accounts and paid services
- Not specified in the source documentation.
- Limits and differences
- Not specified in the source documentation.
- Testing
- Not tested
Browse files
Frontmatter
name: lingtai-search
description: 联网搜索——豆包 Custom 优先(国内直连 ~700ms)、TAVILY 降级、ANYSEARCH 兜底。无需灵台服务器,零外部依赖,一个 API Key 就能用。支持命令行和 Python import 两种方式触发:用户说"搜索""搜一下""帮我查""web search"。
slug: erdong-lingtai-search
displayName: 灵台搜索 — 三引擎联网搜索
version: 1.2.2
summary: 独立的联网搜索工具,豆包 Custom API 优先(国内直连 ~700ms,正文全文 + 权威度),Tavily 降级(带 AI 摘要),Anysearch 兜底。网络失败自动重试一次。支持命令行和 Python import 两种调用方式。标准库实现,零 pip 依赖。支持 --help / --max-results / --timeout 参数。
license: MIT
tags: ["搜索", "search", "联网", "灵台", "lingtai", "豆包", "Doubao", "Tavily", "Anysearch", "国内直连"]灵台搜索 — 三引擎联网搜索
来自灵台生态的独立搜索工具。豆包 Custom 版优先(正文全文 + 权威度评分),挂了自动降级 Tavily(带 AI 摘要),最后兜底 Anysearch。不需要装灵台。
阅读指引:第一次用只看「快速上手 → 设置 → 用法」三步即可;进阶内容(降级策略、引擎对比、FAQ、常见错误)按需查阅。
快速上手
- 设一个 Key:
export DOUBAO_API_KEY="你的Key"(豆包国内直连最快,~700ms) - 搜:
python search.py "量子计算的最新进展" - 看结果:输出 JSON,
results数组就是结果列表
三个 Key 设任意一个就能用;全不设会报错并提示。详细说明见下文。
特性
- 豆包 Custom 版作为主引擎(正文全文 markdown + 权威度 1-4 级 + RankScore 0-1 相关度评分)
- Tavily 作为降级引擎(深度搜索、带 AI 摘要)
- Anysearch 作为最终兜底
- 仅需标准库,无需
pip install任何东西 - 不依赖灵台服务器——独立运行
- 输出结构化 JSON,AI 客户端直接消费
设置
# 设置你有的 Key(推荐设豆包,国内延迟最低 ~700ms,正文全文质量最高)
export DOUBAO_API_KEY="Q9CN..." # 火山引擎控制台,500次/月免费(与 Global 版共用)
export TAVILY_API_KEY="tvly-xxxx" # https://tavily.com 注册免费额度
export ANYSEARCH_API_KEY="sk-xxxx" # https://anysearch.io 注册免费额度
# Anysearch 也支持别名
export ANYSEARCH_API_KEY="sk-xxxx"
Python 无额外依赖——只用标准库 urllib。
用法
搜索词限制:单次搜索词最长 100 字符,超长会自动截断;一次只搜一个主题,多个不相关的主题请分开调用。这是搜索引擎服务端的限制,不是 bug。
命令行
# 命令行传参
python search.py "量子计算的最新进展"
# 查看帮助(列出所有参数)
python search.py --help
# 自定义结果数量和超时
python search.py "量子计算" --max-results 10 --timeout 20
# 管道传入
echo "比特币价格 2026" | python search.py
参数说明:--max-results N(最多返回 N 条,默认 5)、--timeout N(超时秒数,默认 15)、--help(参数说明)。
Python 代码调用
import search as lingtai_search
# 直接调用 search() 函数
result = lingtai_search.search("量子计算", max_results=5)
print(result["source"]) # "doubao" / "tavily" / "anysearch"
print(result["results"]) # list of {title, url, snippet, score, ...}
# 控制超时和重试
result = lingtai_search.search(
"人工智能",
max_results=10,
timeout=20,
retry=2, # 网络失败最多重试 2 次
)
输出示例
豆包 Custom 版(主引擎):
{
"source": "doubao",
"total": 5,
"time_cost_ms": 150,
"results": [
{
"title": "人工智能最新进展",
"url": "https://example.com/ai",
"snippet": "人工智能在 2026 年取得重大突破…(markdown 格式全文)",
"score": 0.9999,
"auth_level": 1,
"auth_des": "非常权威",
"publish_time": "2026-07-25T10:00:00+08:00",
"site_name": "新华网"
}
]
}
Tavily 降级(带 AI 摘要):
{
"source": "tavily",
"answer": "截至2026年7月,比特币价格在…",
"results": [
{
"title": "比特币最新行情",
"url": "https://example.com/btc",
"snippet": "比特币价格今日…",
"score": 0.95
}
]
}
降级策略
豆包 Custom 有 Key 且请求成功 → 用豆包(正文全文 + 权威度 + RankScore)
豆包挂了或没 Key → 自动降级 Tavily(带 AI 摘要)
Tavily 也挂了或没 Key → 自动降级 Anysearch
Anysearch 也挂了 → 报错,列出所有失败原因
都没设 Key → 提示设置环境变量
引擎对比
| 引擎 | 免费额度 | 时延 | 正文全文 | 权威度 | AI 摘要 | 推荐 |
|---|---|---|---|---|---|---|
| 豆包 Custom | 500次/月 | ~700ms | ✅ markdown | ✅ 4级 | ❌ | ⭐首选 |
| Tavily | 1000次/月 | ~800ms | ❌ 仅摘要 | ❌ | ✅ | 降级 |
| Anysearch | 1000次/天 | ~1s | ❌ 仅摘要 | ❌ | ❌ | 兜底 |
何时用
- 用户在对话中要求"搜索""查一下""网上找找"
- 需要实时信息(AI 训练数据外的内容)
- 需要多个来源交叉验证
- AI 客户端想给回答附上引用来源
触发话术
| 用户说 | 动作 |
|---|---|
| "搜索 xxx""搜一下 xxx""帮我查 xxx" | 调 python search.py "xxx" |
| "最近关于 xxx 有什么新闻" | 同上 |
| "xxx 的最新进展/数据/价格" | 同上 |
| "有没有关于 xxx 的资料" | 同上 |
排障 FAQ
Q:豆包 Custom 版和 Tavily / Anysearch 有什么区别? A:豆包是火山引擎的国内搜索服务,对中文和中国网络更友好(延迟 ~700ms),而且返回正文全文(markdown 格式)+ 权威度评分(1-4 级)+ 相关度评分(RankScore 0-1)。Tavily 和 Anysearch 是国外服务,只返回摘要片段。
Q:如何获取豆包 API Key? A:前往火山引擎联网搜索控制台,创建按量后付费的 API Key。每个火山账号每月 500 次免费调用。
Q:国内用 Tavily / Anysearch 访问慢或连不上? A:这正是豆包成为首选引擎的原因——豆包国内直连延迟更低。如果豆包 Key 未设置,可尝试通过代理或 VPN 使用 Tavily/Anysearch。
Q:为什么 Anysearch 返回的结果没有 AI 摘要?
A:Tavily 自带 answer 字段(AI 生成的摘要),豆包和 Anysearch 是纯搜索结果。两个 API 本身的能力差异,不是 bug。如果你需要 AI 摘要,确保设置了 TAVILY_API_KEY。
Q:搜索报"所有搜索引擎均失败"怎么办?
A:先确认至少设了一个 API Key(DOUBAO_API_KEY / TAVILY_API_KEY / ANYSEARCH_API_KEY);如果都设了,检查网络连通性;确认 Key 没有过期或额度用完。
Q:能自己加其他搜索引擎吗?
A:search.py 是开放的——豆包/Tavily/Anysearch 是内置的后端,你可以在代码里按同样模式追加新的 _search_xxx() 函数,只需 20 行。
Q:搜索词有什么限制? A:豆包和 Tavily 的搜索词最长 100 个字符(过长会自动截断),不支持一次搜索多个不相关的词。如果需要搜多个主题,请分开调用。
常见错误速查
| 错误现象 | 最可能的原因 | 解决方法 |
|---|---|---|
DOUBAO_API_KEY 未设置 |
环境变量没配 | 设置 export DOUBAO_API_KEY="..." |
豆包 API 错误 [700901] |
API Key 写错了或格式不对 | 确认 Authorization header 是 Bearer <Key> 格式,Key 无多余空格 |
豆包 API 错误 [10406] |
本月 500 次免费额度用完了 | 等下个月重置,或去控制台开通后付费 |
豆包 网络错误 |
连不上火山引擎服务器 | 检查网络,确认能访问 open.feedcoopapi.com |
所有搜索引擎均失败 |
三个引擎都没配 Key 或都失败了 | 至少设一个 API Key,检查网络 |
不要这样做
- 不要把 API Key 硬编码在代码里提交到公开仓库。 用环境变量。
- 不要在循环里不加间隔地疯狂调搜索。 豆包默认 QPS 5,超了会限流(错误码 700429)。
- 不要期望 Anysearch 返回 AI 摘要。 Anysearch 是兜底引擎,只给标题+链接+片段。需要 AI 摘要请设
TAVILY_API_KEY。 - 不要搜索超过 100 个字符的长文本。 搜索引擎对 query 长度有限制,过长会自动截断。
- 不要拿这个当网页爬虫用。 返回的是搜索结果,不是网站的全部内容。豆包虽然返回正文全文,但也是第三方网站的摘要版本。
和灵台的关系
本工具是 灵台知识管理系统 生态的一部分。灵台内部有一个同款但更完整的 web_search MCP 工具,直接集成在知识管理流程里。
你还可能感兴趣(均可在 SkillHub 搜索安装):
lingtai-onboarding— 灵台新用户入门向导- 灵台更多拆分子 Skill 即将上线
Current listing version
1.2.2
Safety and assessment details
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 三引擎联网搜索解决用户实时信息获取高频需求
- 支持豆包 Custom(国内直连 ~700ms)、Tavily、Anysearch 多级降级
- 零外部依赖,标准库实现,部署简单
Highlights
- 触发词覆盖全面:"搜索""搜一下""帮我查""web search" 等自然表达
- 边界清晰,不易与其他 Skill 重叠
Highlights
- 文档结构完整:快速上手→设置→用法→降级策略→FAQ→常见错误
- 提供命令行和 Python 调用双模式示例
- frontmatter 信息完整,版本号明确
Highlights
- 三级引擎自动降级策略完善,提升成功率
- 覆盖主要异常场景:Key 未设置、网络错误、额度用完等
- 支持重试机制和超时控制
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
-
Install or fetch external dependencies
Use official sources and pin versions. Check install scripts in an isolated environment. This document check does not cover code downloaded later.
Mentioned in main document · lines 31 -
Accounts, secrets or authorization
Use a dedicated least-privilege account. Keep secrets out of public content and command logs; verify the receiving service and tenant.
Mentioned in main document · lines 3, 167, 168, 177, 190
Domains or addresses referenced in the document
These addresses may be documentation links or examples, not an approved network allowlist. Verify actual destinations and outgoing data before use.
- anysearch.io
- cnb.cool
- console.volcengine.com
- example.com
- tavily.com
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Not specified in the source documentation.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.