Skill Tracer
Skills › Scientific Agent Skills › exa-search › web-search.md

web-search.md

139 lines · skills/exa-search/references/web-search.md at 5f2bc03

Open on GitHub

Most marks come from matching words in the file, so treat them as pointers.

1# Web Search
2
3Search the web for: $ARGUMENTS
4

Web Search

Search the web for: $ARGUMENTS

Raw lines 1 to 4
5## Command
6
7Choose a short, descriptive filename based on the query (e.g., `ai-chip-news`, `crispr-off-target`). Use lowercase with hyphens, no spaces.
8
9```bash
10uv run "$SKILL_PATH/scripts/exa_search.py" "$ARGUMENTS" \
11 --text --highlights \
12 -o "$FILENAME.json"
13```
15`$SKILL_PATH` is the path to this skill directory. The `-o` flag saves the full results to a JSON file so follow-up questions can reuse them without re-querying.
17**Search type selection** — `--type` controls retrieval mode:
19| Mode | When to use |
20|---|---|
21| `auto` (default) | Exa's general-purpose search. Use this unless you have a reason not to. |
22| `fast` | Low-latency interactive search. |
23| `instant` | Minimum response time, trading some depth for speed. |
24| `deep-lite` | Lightweight research with lower latency than deep. |
25| `deep` | Multi-step research for complex queries. |
26| `deep-reasoning` | Higher-effort reasoning for complex analysis. |
28**Content modes** — add any combination:
30- `--text` returns full-text content per result
31- `--highlights` returns the most relevant passages (good signal-to-noise, lower token cost than full text)
33Default to `--highlights` for broad searches (less text to process). Add `--text` only when you need to quote or extract in detail.
35**Filtering options** — Exa supports rich filtering via the SDK:
37- `--start-published-date 2026-01-01T00:00:00Z` / `--end-published-date 2026-10-01T00:00:00Z` for ISO 8601 publication-date bounds
38- `--include-domains domain1.com,domain2.com` to restrict to an allowlist
39- `--exclude-domains spam.com,low-quality.com` to drop a blocklist
40- `--category publication` to bias toward scholarly content (also: `company`, `news`, `personal site`, `financial report`, `people`; other strings are category hints)
41- `--user-location US` for locale-specific results
43`--num-results` accepts 1–100 (individual modes may impose lower limits). There
44is no documented offset/cursor pagination; reformulate a query or partition by
45supported filters when more coverage is needed. Neither method establishes an
46exhaustive literature search. `company` and `people` reject publication-date and
47exclude-domain filters; the wrapper catches these combinations before calling.
48Use `--include-domains github.com` instead of the deprecated `github` category.
49Domain filters also support paths and wildcard subdomains. No content flag
50means metadata only, despite the SDK's default text retrieval.

Command

Choose a short, descriptive filename based on the query (e.g., ai-chip-news, crispr-off-target). Use lowercase with hyphens, no spaces.

uv run "$SKILL_PATH/scripts/exa_search.py" "$ARGUMENTS" \
  --text --highlights \
  -o "$FILENAME.json"

$SKILL_PATH is the path to this skill directory. The -o flag saves the full results to a JSON file so follow-up questions can reuse them without re-querying.

Search type selection — --type controls retrieval mode:

ModeWhen to use
auto (default)Exa's general-purpose search. Use this unless you have a reason not to.
fastLow-latency interactive search.
instantMinimum response time, trading some depth for speed.
deep-liteLightweight research with lower latency than deep.
deepMulti-step research for complex queries.
deep-reasoningHigher-effort reasoning for complex analysis.

Content modes — add any combination:

  • --text returns full-text content per result
  • --highlights returns the most relevant passages (good signal-to-noise, lower token cost than full text)

Default to --highlights for broad searches (less text to process). Add --text only when you need to quote or extract in detail.

Filtering options — Exa supports rich filtering via the SDK:

  • --start-published-date 2026-01-01T00:00:00Z / --end-published-date 2026-10-01T00:00:00Z for ISO 8601 publication-date bounds
  • --include-domains domain1.com,domain2.com to restrict to an allowlist
  • --exclude-domains spam.com,low-quality.com to drop a blocklist
  • --category publication to bias toward scholarly content (also: company, news, personal site, financial report, people; other strings are category hints)
  • --user-location US for locale-specific results

--num-results accepts 1–100 (individual modes may impose lower limits). There is no documented offset/cursor pagination; reformulate a query or partition by supported filters when more coverage is needed. Neither method establishes an exhaustive literature search. company and people reject publication-date and exclude-domain filters; the wrapper catches these combinations before calling. Use --include-domains github.com instead of the deprecated github category. Domain filters also support paths and wildcard subdomains. No content flag means metadata only, despite the SDK's default text retrieval.

Raw lines 5 to 51
Runs code scripts/exa_search.py :10
52## Academic source strategy
54For scientific or technical queries, Exa has two strong levers:

Academic source strategy

For scientific or technical queries, Exa has two strong levers:

Raw lines 52 to 55
56### 1. Use `--category publication`
58```bash
59uv run "$SKILL_PATH/scripts/exa_search.py" "$ARGUMENTS" \
60 --category publication \
61 --text --highlights \
62 -o "$FILENAME-academic.json"
63```
65This selects the current scholarly-publication category (papers, preprints, and journal articles). Verify peer review, publication metadata, and relevance on the source; the category does not establish evidence quality.

1. Use --category publication

uv run "$SKILL_PATH/scripts/exa_search.py" "$ARGUMENTS" \
  --category publication \
  --text --highlights \
  -o "$FILENAME-academic.json"

This selects the current scholarly-publication category (papers, preprints, and journal articles). Verify peer review, publication metadata, and relevance on the source; the category does not establish evidence quality.

Raw lines 56 to 66
Runs code scripts/exa_search.py :59
67### 2. Restrict to scholarly domains
69For stricter academic filtering, combine the category with an explicit domain allowlist:
71```bash
72uv run "$SKILL_PATH/scripts/exa_search.py" "$ARGUMENTS" \
73 --category publication \
74 --include-domains "arxiv.org,biorxiv.org,medrxiv.org,pubmed.ncbi.nlm.nih.gov,nature.com,science.org" \
75 --text --highlights \
76 -o "$FILENAME-academic.json"
77```

2. Restrict to scholarly domains

For stricter academic filtering, combine the category with an explicit domain allowlist:

uv run "$SKILL_PATH/scripts/exa_search.py" "$ARGUMENTS" \
  --category publication \
  --include-domains "arxiv.org,biorxiv.org,medrxiv.org,pubmed.ncbi.nlm.nih.gov,nature.com,science.org" \
  --text --highlights \
  -o "$FILENAME-academic.json"
Raw lines 67 to 78
Runs code scripts/exa_search.py :72
79### Two-pass pattern for comprehensive coverage
81Run **both** an academic-focused search and an unrestricted one, then merge with academic sources first:
831. Academic pass: `--category publication` with the scholarly domain allowlist above.
842. General pass: the standard command without `--category` or `--include-domains`, to catch relevant non-academic sources (news coverage, lab blogs, institutional pages).
86Merge results, leading with academic sources. If the query is clearly non-scientific, skip the academic pass.
88**When to use the two-search pattern:** Any query involving scientific claims, medical information, research findings, technical mechanisms, statistical data, or anything where primary literature would be more reliable than secondary reporting.

Two-pass pattern for comprehensive coverage

Run both an academic-focused search and an unrestricted one, then merge with academic sources first:

  1. Academic pass: --category publication with the scholarly domain allowlist above.
  2. General pass: the standard command without --category or --include-domains, to catch relevant non-academic sources (news coverage, lab blogs, institutional pages).

Merge results, leading with academic sources. If the query is clearly non-scientific, skip the academic pass.

When to use the two-search pattern: Any query involving scientific claims, medical information, research findings, technical mechanisms, statistical data, or anything where primary literature would be more reliable than secondary reporting.

Raw lines 79 to 89
90## Parsing results
92Parse the JSON output. Each result includes:
94- `title`, `url`, `published_date`, `author`
95- `text` (if `--text`) and `highlights` (if `--highlights`)
96- Legacy compatibility fields `score`, `highlight_scores`, and top-level
97 `autoprompt_string` may be null/empty; never require them or infer evidence
98 quality from a retrieval score. Exa's changelog says `highlightScores` was
99 removed in May 2026 although the generated reference still lists it.
101Missing author/date/text metadata is normal. The wrapper exports a selected
102subset of the SDK response, not raw API JSON or structured publication entities.
104**Snippet fallback** — any combination of content fields may be present. Cascade through them: prefer `highlights` (tight, pre-selected passages), fall back to a truncated slice of `text`. Never assume exactly one is present.

Parsing results

Parse the JSON output. Each result includes:

  • title, url, published_date, author
  • text (if --text) and highlights (if --highlights)
  • Legacy compatibility fields score, highlight_scores, and top-level autoprompt_string may be null/empty; never require them or infer evidence quality from a retrieval score. Exa's changelog says highlightScores was removed in May 2026 although the generated reference still lists it.

Missing author/date/text metadata is normal. The wrapper exports a selected subset of the SDK response, not raw API JSON or structured publication entities.

Snippet fallback — any combination of content fields may be present. Cascade through them: prefer highlights (tight, pre-selected passages), fall back to a truncated slice of text. Never assume exactly one is present.

Raw lines 90 to 105
106## Response format
108**CRITICAL: Every claim must have an inline citation.** Use markdown links pulling only from the JSON output. Never invent or guess URLs.
110For academic sources, use author-year citation style where metadata is available:
111- Academic: [Smith et al., 2025](url) or [Smith & Jones, 2024](url)
112- Non-academic: [Source Title](url)
114Synthesize a response that:
115- Leads with findings from peer-reviewed or preprint sources when available
116- Clearly distinguishes between claims backed by primary research vs. secondary reporting
117- Includes specific facts, names, numbers, dates
118- Cites every fact inline — do not leave any claim uncited
119- Organizes by theme if multiple topics
120- Notes the evidence quality (e.g., "a randomized controlled trial found..." vs. "a blog post reports...")
122**End with a Sources section** listing every URL referenced, grouped by type:
124```
125Sources:
127Academic / Peer-reviewed:
128- [Smith et al., 2025 — Title of Paper](https://doi.org/...) (Nature, 2025)
129- [Jones & Lee, 2024 — Title of Paper](https://arxiv.org/...) (arXiv preprint)
131Other:
132- [Source Title](https://example.com/article) (Feb 2026)
133```
135This Sources section is mandatory. Do not omit it. If no academic sources were found, report the search coverage and filters used; do not infer that the topic has not been studied.
137After the Sources section, mention the output file path (`$FILENAME.json`) so the user knows it's available for follow-up questions.
139Verified against the [Search API](https://exa.ai/docs/reference/search) and [changelog](https://exa.ai/docs/changelog) on 2026-09-30; authenticated commands are illustrative.

Response format

CRITICAL: Every claim must have an inline citation. Use markdown links pulling only from the JSON output. Never invent or guess URLs.

For academic sources, use author-year citation style where metadata is available:

  • Academic: Smith et al., 2025 or Smith & Jones, 2024
  • Non-academic: Source Title

Synthesize a response that:

  • Leads with findings from peer-reviewed or preprint sources when available
  • Clearly distinguishes between claims backed by primary research vs. secondary reporting
  • Includes specific facts, names, numbers, dates
  • Cites every fact inline — do not leave any claim uncited
  • Organizes by theme if multiple topics
  • Notes the evidence quality (e.g., "a randomized controlled trial found..." vs. "a blog post reports...")

End with a Sources section listing every URL referenced, grouped by type:

Sources:

Academic / Peer-reviewed:
- [Smith et al., 2025 — Title of Paper](https://doi.org/...) (Nature, 2025)
- [Jones & Lee, 2024 — Title of Paper](https://arxiv.org/...) (arXiv preprint)

Other:
- [Source Title](https://example.com/article) (Feb 2026)

This Sources section is mandatory. Do not omit it. If no academic sources were found, report the search coverage and filters used; do not infer that the topic has not been studied.

After the Sources section, mention the output file path ($FILENAME.json) so the user knows it's available for follow-up questions.

Verified against the Search API and changelog on 2026-09-30; authenticated commands are illustrative.

Raw lines 106 to 139