Communitygithub.com

个人网站搜索(Exa Python SDK)

使用 Exa 高级搜索功能搜索个人网站和博客。支持全面的筛选参数,帮助寻找个人观点、作品集和个人博客。当需要搜索个人网站、博客文章或作品集网站时使用。

个人网站搜索(Exa Python SDK) 是什么?

该技能通过 Exa Python SDK 实现高效的个人网站搜索。它专门用于从个人博客、作品集网站和个人视角中获取结果,避免聚合内容。支持完整的 Exa 搜索参数,包括结果数量、搜索类型(auto、fast、deep 等)、域名包含/排除、发布日期范围、爬取日期范围、文本/摘要/高亮内容请求,以及现场爬取等高级选项。使用该技能时,应通过 `ctx_execute` 调用 Exa,并分配 Task Agent 来执行搜索,只返回提炼后的结果,不要在主线上下文中直接运行。适合需要个人见解、项目展示或独立创作者内容的场景。

兼容平台~Claude Code~Codex CLI~Cursor✓OpenCode
npx skills add https://github.com/iamvtor/opencode-setup/tree/HEAD/skills/exa-personal-site-search

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

个人网站搜索 (Exa Python SDK)

前置条件

uv pip install exa-py

设置 EXA_API_KEY 环境变量。在 https://dashboard.exa.ai/api-keys 获取。

方法

使用 ctx_execute(language: "python", code: "...") 调用 Exa。切勿在主上下文中运行 Exa 搜索——始终生成只返回提炼输出的 Task Agent。

支持的参数

personal site 类别支持所有可用参数:

from exa_py import Exa
import os, json

exa = Exa(os.environ["EXA_API_KEY"])

response = exa.search(
    "building side projects indie hacking journey 2025",
    num_results=15,
    category="personal site",
    type="auto",
    exclude_domains=["medium.com"],  # 排除聚合器,获取独立博客
    contents={"highlights": True}
)

results = []
for r in response.results:
    results.append({
        "title": r.title,
        "url": r.url,
        "highlights": getattr(r, 'highlights', [])
    })
print(json.dumps(results, indent=2))

完整参数支持

  • query (必需)
  • num_results
  • type ("auto", "fast", "instant", "deep-lite", "deep", "deep-reasoning")
  • include_domains / exclude_domains
  • start_published_date / end_published_date (ISO 8601)
  • start_crawl_date / end_crawl_date (ISO 8601)
  • include_text / exclude_text (仅单个元素的数组;多个元素会导致 400 错误)
  • contents={"text": {"max_characters": N}}
  • contents={"highlights": True} / contents={"highlights": {"query": "..."}}
  • contents={"summary": True} / contents={"summary": {"query": "..."}}
  • user_location
  • moderation
  • additional_queries
  • contents={"livecrawl_timeout": 10000, "max_age_hours": 0} 用于获取新鲜内容

相关技能