exa-search

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Exa Web Toolkit

Exa Web工具包

A skill for web-powered research tasks backed by Exa: web search and URL extraction. Exa's index combines high-quality keyword and semantic retrieval, which makes it well-suited to scientific, technical, and conceptual queries.
这是一款由Exa支持的、用于网页驱动研究任务的技能:包含网页搜索和URL提取功能。Exa的索引结合了高质量的关键词检索与语义检索,非常适合科学、技术和概念类查询。

Routing — pick the right capability

路由选择——挑选合适的功能

Read the user's request and match it to one of the capabilities below. Read the corresponding reference file for detailed instructions before running commands.
User wants to...CapabilityWhere
Look something up, research a topic, find current infoWeb Search
references/web-search.md
Fetch content from a specific URL (webpage, article, PDF)Web Extract
references/web-extract.md
Install or authenticateSetupBelow
读取用户的请求并匹配到以下功能之一。在运行命令前,请阅读对应的参考文件获取详细说明。
用户需求...功能位置
查找信息、研究主题、获取实时资讯网页搜索
references/web-search.md
从特定URL获取内容(网页、文章、PDF)网页提取
references/web-extract.md
安装或认证设置下方

Decision guide

决策指南

  • Default to Web Search for topic lookups, research questions, or "what is X?" queries. When the topic is scientific or technical, pass
    --category "research paper"
    to bias toward scholarly sources, and/or an academic
    --include-domains
    allowlist. See
    references/web-search.md
    for the two-pass academic strategy.
  • Use Web Extract when the user provides a URL or asks you to read/fetch a specific page. Prefer this over the built-in WebFetch for batch extraction (multiple URLs in one call) and for academic PDFs.
  • 默认使用网页搜索处理主题查找、研究问题或"X是什么?"类查询。当主题为科学或技术类时,传递
    --category "research paper"
    参数以偏向学术来源,和/或设置学术
    --include-domains
    白名单。请查看
    references/web-search.md
    了解两步式学术检索策略。
  • 使用网页提取当用户提供URL或要求读取/获取特定页面时。相较于内置的WebFetch,此功能更适合批量提取(一次调用处理多个URL)和学术PDF提取。

Academic source priority

学术来源优先级

For technical or scientific queries, prefer academic and scientific sources:
  • Peer-reviewed journal articles and conference proceedings over blog posts or news
  • Preprints (arXiv, bioRxiv, medRxiv) when peer-reviewed versions aren't available
  • Institutional and government sources (NIH, WHO, NASA, NIST) over commercial sites
  • Primary research over secondary summaries
Two levers to steer Exa toward scholarly content:
  1. --category "research paper"
    biases retrieval toward scholarly sources.
  2. --include-domains
    with a scholarly allowlist (arxiv.org, nature.com, pubmed.ncbi.nlm.nih.gov, etc.) restricts the domain pool.
Combine both for strictly academic results. See
references/web-search.md
for the full pattern.
When citing academic sources, include author names and publication year where available (e.g., Smith et al., 2025) in addition to the standard citation format. If a DOI is present, prefer the DOI link.

对于技术或科学类查询,优先选择学术和科学来源:
  • 优先选择同行评审期刊文章和会议论文,而非博客文章或新闻
  • 当没有同行评审版本时,选择预印本(arXiv、bioRxiv、medRxiv)
  • 优先选择机构和政府来源(NIH、WHO、NASA、NIST),而非商业网站
  • 优先选择原始研究,而非二次摘要
引导Exa偏向学术内容的两个方法:
  1. --category "research paper"
    参数会让检索结果偏向学术来源。
  2. --include-domains
    搭配学术白名单(arxiv.org、nature.com、pubmed.ncbi.nlm.nih.gov等)限制检索的域名范围。
同时使用这两个参数可获得严格的学术结果。请查看
references/web-search.md
了解完整模式。
引用学术来源时,若有可用信息,除标准引用格式外,还需包含作者姓名和发表年份(例如Smith等人,2025)。如果存在DOI,优先使用DOI链接。

Setup

设置

This skill uses the
exa-py
Python SDK. The scripts in
scripts/
declare their dependencies via PEP 723 inline metadata, so you can run them directly with
uv run
without a separate install step:
bash
uv run --with exa-py python "$SKILL_PATH/scripts/exa_search.py" --help
If you prefer a persistent install:
bash
uv pip install "exa-py>=1.14.0"
此技能使用
exa-py
Python SDK。
scripts/
目录下的脚本通过PEP 723内联元数据声明依赖,因此无需单独安装步骤,可直接使用
uv run
运行:
bash
uv run --with exa-py python "$SKILL_PATH/scripts/exa_search.py" --help
如果偏好持久化安装:
bash
uv pip install "exa-py>=1.14.0"

Authentication

认证

All commands read the API key from the
EXA_API_KEY
environment variable. Get your Exa API key at dashboard.exa.ai/api-keys.
First, check if a
.env
file exists in the project root and contains
EXA_API_KEY
. If so, load it:
bash
dotenv -f .env run -- uv run --with exa-py python "$SKILL_PATH/scripts/exa_search.py" "your query"
If
dotenv
isn't available, install it:
pip install python-dotenv[cli]
or
uv pip install python-dotenv[cli]
.
If there's no
.env
, export the key for the session:
bash
export EXA_API_KEY="your-key"
Verify by running any script with
--help
— it will exit cleanly if the key is set and auth-check runs only when a real query is made.
所有命令从
EXA_API_KEY
环境变量读取API密钥。可在dashboard.exa.ai/api-keys获取Exa API密钥。
首先,检查项目根目录是否存在包含
EXA_API_KEY
.env
文件。如果存在,加载它:
bash
dotenv -f .env run -- uv run --with exa-py python "$SKILL_PATH/scripts/exa_search.py" "your query"
如果
dotenv
不可用,安装它:
pip install python-dotenv[cli]
uv pip install python-dotenv[cli]
如果没有
.env
文件,在会话中导出密钥:
bash
export EXA_API_KEY="your-key"
通过运行任意带
--help
参数的脚本验证——如果密钥已设置,脚本会正常退出;认证检查仅在执行真实查询时进行。

Files in this skill

此技能包含的文件

  • SKILL.md
    — this file (routing and setup)
  • references/web-search.md
    — detailed web search reference with academic strategy
  • references/web-extract.md
    — URL content extraction reference
  • scripts/exa_search.py
    — CLI wrapper around
    client.search_and_contents
  • scripts/exa_extract.py
    — CLI wrapper around
    client.get_contents
  • SKILL.md
    — 本文件(路由和设置说明)
  • references/web-search.md
    — 包含学术检索策略的详细网页搜索参考文档
  • references/web-extract.md
    — URL内容提取参考文档
  • scripts/exa_search.py
    — 基于
    client.search_and_contents
    的CLI封装脚本
  • scripts/exa_extract.py
    — 基于
    client.get_contents
    的CLI封装脚本