exa-search
4
总安装量
3
周安装量
#54198
全站排名
安装命令
npx skills add https://github.com/tristanmanchester/agent-skills --skill exa-search
Agent 安装分布
amp
3
cline
3
opencode
3
cursor
3
continue
3
kimi-cli
3
Skill 文档
Searching with Exa (Search API)
This skill is a recipe for consistent web research using Exaâs Search API: you choose the right search mode, apply the right filters, request only the content you need (highlights/text/summary), and return clean citations.
Quick start (default path)
- Ensure an API key is available as an environment variable:
EXA_API_KEY(preferred)- or pass
--api-keyto the scripts.
- Run a search (JSON response to stdout):
python {baseDir}/scripts/exa_search.py --query "latest research in LLMs" --type auto --category "research paper" --num-results 5 --highlights --highlights-per-url 3 --num-sentences 2
Operating principles (always follow)
- Always return URLs. Prefer also returning title + a 1â2 sentence âwhy this sourceâ note.
- Prefer
highlightsfirst for agentic workflows. Escalate to fulltextonly when necessary. - Use filters aggressively: domain allowlists, date windows, and
categoryimprove relevance and reduce noise. - Freshness is explicit: if the user asks for âlatestâ, âtodayâ, âcurrentâ, etc., set a freshness policy (see below).
- Donât overfetch: cap content length with
maxCharacterswhen requestingtext. - If the user needs hard evidence (numbers, quotes), fetch full text for the top 1â3 pages and verify.
Workflow
Step 1 â Translate the user task into a search plan
Decide:
-
Search type
auto(default): best general quality.instant: lowest latency, for autocomplete / live suggestions.deep: more comprehensive; can useadditionalQueries.fast/neural: streamlined alternatives.
-
Category (when appropriate)
news,research paper,company,people,tweet,personal site,financial report, etc.
-
Freshness
- If âreal-time / latestâ: consider live crawling via
maxAgeHours(see Freshness). - If âhistorical/staticâ: use cache only (e.g.,
maxAgeHours: -1).
- If âreal-time / latestâ: consider live crawling via
-
Content mode
highlights: token-efficient evidence snippets.text: deep reading (cap viamaxCharacters).summary: quick structured overviews (optionally with a guidingquery).
Step 2 â Build the request payload
Start from this template and fill only what you need:
{
"query": "...",
"type": "auto",
"category": "news",
"numResults": 10,
"includeDomains": ["..."],
"excludeDomains": ["..."],
"startPublishedDate": "2025-01-01T00:00:00.000Z",
"endPublishedDate": "2025-12-31T23:59:59.999Z",
"includeText": ["must contain phrase"],
"excludeText": ["must not contain phrase"],
"contents": {
"highlights": true,
"text": { "maxCharacters": 8000, "includeHtmlTags": false },
"summary": { "query": "..." },
"subpages": 0,
"extras": { "links": 0, "imageLinks": 0 },
"maxAgeHours": 24
}
}
Notes:
contentsis optional. If omitted, youâll only get metadata (title,url, etc.).maxAgeHourscontrols when Exa should live-crawl vs use cached content (see below).contextis deprecated; usehighlightsortextinstead.
Step 3 â Execute the request
Option A (recommended): use the bundled script so requests are consistent and validated.
python {baseDir}/scripts/exa_search.py --query "..." --highlights --num-results 10
Option B: call the HTTP endpoint directly.
curl --request POST --url https://api.exa.ai/search --header "content-type: application/json" --header "x-api-key: $EXA_API_KEY" --data '{"query":"...","type":"auto","numResults":5}'
Step 4 â Post-process results into an answer with citations
- De-duplicate near-identical domains/pages when the user wants breadth.
- Select the top sources (usually 3â7) that jointly cover the claim space.
- For each selected result, extract:
- title, url
- key highlight(s) or a short quote from
text - published date (if available)
- Write the response with inline citations (URLs) and clear uncertainty where needed.
- If the user wants a deliverable (report, memo), preserve a âSourcesâ section listing all URLs.
Freshness policy (use this when âlatest/current/todayâ appears)
Use contents.maxAgeHours (or the maxAgeHours top-level alias if the API accepts it):
24: daily-fresh content (use cache if <24h else livecrawl)1: near-real-time (cache if <1h else livecrawl)0: always livecrawl (slowest, most current)-1: never livecrawl (fastest; cache only)- omit: default behaviour (livecrawl only when cache missing)
Common patterns
Pattern A â âGive me sources for Xâ (fast + token efficient)
type: auto,numResults: 5â10contents.highlights: true- Optional:
categoryandincludeDomains
Pattern B â âDo deep research on Xâ (read a few pages thoroughly)
- Start with highlights on 10â20 results.
- Then fetch full
textfor the top 3â5 URLs with amaxCharacterscap. - Summarise with citations.
Pattern C â âLatest news about Xâ
category: news- Apply a date window (
startPublishedDate) if the question is time-bound. - Use a freshness setting (often
maxAgeHours: 1â24).
Pattern D â âFind a company / person pageâ
category: companyorpeople- If using
people, allowlist LinkedIn domains when needed. - IMPORTANT: some filters are unsupported for
company/people; see troubleshooting.
Troubleshooting
401 / 403 (auth)
- Confirm
x-api-keyheader is present and valid. - Confirm you arenât accidentally using a placeholder like
YOUR-EXA-API-KEY.
400 (invalid parameters)
companyandpeoplecategories support a limited set of filters; unsupported parameters can trigger 400 errors.- If in doubt, remove date and text filters first, then re-add one-by-one.
Too much content / token blow-ups
- Prefer
highlightsovertext. - Cap
text.maxCharacters. - Reduce
numResults.
Bundled references
- API + parameter cheat sheet:
references/exa-search-api.md - Best-practice recipes:
references/exa-search-best-practices.md - Quickstart snippets (SDK + curl):
references/exa-search-quickstart.md