exa-search-cli
Research automation through a command-line integration with Exa: search, page-text retrieval, and research tasks.
中文 · Русский · Português · Español · 日本語 · 한국어
Practical purpose
Turn recurring web research into a repeatable workflow: find relevant sources, retrieve readable text, and pass structured results to scripts or AI agents. Potential uses include gathering background information, comparing sources, and preparing research inputs for a document or decision.
Exa supplies the underlying search and research services. This repository is a focused CLI integration, not a new search engine or AI model.
Project contribution
Built with AI coding agents as part of Nolan Vale's independent product and workflow-automation work. My contribution is defining the task and interface, directing AI-assisted implementation, checking results, and iterating. Nolan Vale Tools is the label for these independent public projects.
What it does
Five active commands wrap Exa services; two retired Research commands remain as migration helpers:
| Command | Purpose |
|---|---|
exa-search |
Search the web or find pages similar to a reference URL |
exa-crawl |
Retrieve readable page text or query-focused excerpts through Exa |
exa-agent |
Create an asynchronous, usage-billed Agent run |
exa-agent-status |
Retrieve an Agent run, its output, sources, and cost |
exa-agent-cancel |
Cancel a queued or running Agent run |
exa-research, exa-research-status |
Retired API; exit with migration guidance without a network call |
The commands support --json for scripts and AI-agent workflows. Search can be narrowed by date, domain, and content category. Retrieval depends on the provider and the accessibility of the source; it is not guaranteed to work for every URL.
Installation
uv tool install exa-search-cli
Alternatively, use pip install exa-search-cli in a suitable Python environment.
Quick start
Obtain an Exa API key and keep it out of source control:
export EXA_API_KEY=your-key-here
exa-search "document processing workflow" --json
Usage
# Search
exa-search "vision language models" -n 10
# Find similar pages
exa-search --similar https://github.com/astral-sh/uv
# Filter by content type and publication date
exa-search "AI papers" --category publication --start-date 2025-01-01
# Include or exclude domains
exa-search "documentation" --include-domain docs.python.org,docs.rs
exa-search "tutorial" --exclude-domain medium.com,dev.to
# Retrieve page text
exa-crawl https://example.com -c 8000
# Submit and retrieve an external research task
exa-agent "document review workflow approaches" --max-cost 1
exa-agent-status agent_run_REPLACE_WITH_RETURNED_ID
# Extract URLs from structured output
exa-search "topic" --json | jq -r '(if type=="array" then . else (.results // []) end)[] | .url'
Search flags
| Flag | Default | Description |
|---|---|---|
-n / --num-results |
8 |
Number of results (1–100) |
-t / --type |
auto |
auto · lite · fast · instant · deep-lite · deep · deep-reasoning · keyword · neural |
--text |
off | Fetch page text; terminal preview defaults to 2000 characters |
--max-chars |
— | Text limit per result, used with --text |
--objective |
— | Broader search goal and source preferences, up to 4096 characters |
--max-age-hours |
— | Content freshness: 0 fresh fetch, -1 cache only, 1–720 max age |
--category |
— | publication · people · company · news · personal site · financial report; legacy flags remain accepted |
--start-date |
— | Published on or after YYYY-MM-DD |
--end-date |
— | Published on or before YYYY-MM-DD |
--include-domain |
— | Comma-separated domains to include |
--exclude-domain |
— | Comma-separated domains to exclude |
--similar |
— | Find pages similar to this URL |
--json |
off | Structured JSON output |
--compact |
off | Compact source JSON; implies --json |
--timeout |
60 |
HTTP connect/read timeout in seconds |
--version |
— | Show package version without authentication |
Other options:
exa-crawl:-c/--max-chars(default5000),--query,--max-age-hours,--json,--compact,--timeout,--version.exa-agent:--effort,--max-cost,--system-prompt,--output-schema,--dry-run,--json.exa-agent-status,exa-agent-cancel: Agent run ID,--json,--timeout,--version.exa-research,exa-research-status: deprecated migration helpers; they never create Agent runs.
See full usage documentation and the installed commands' --help for additional details.
Research API migration
Exa retired /research; a working search key does not restore that endpoint.
Use exa-agent for new asynchronous Agent runs. Old Research model names and IDs
are not automatically converted into a differently billed Agent request.
See Exa's changelog and
Agent guide.
# Preview the exact create body without a key or network call.
exa-agent "Compare local home watch providers" --max-cost 1 --dry-run
# Explicitly submit a billed run, then save the returned ID.
exa-agent "Compare local home watch providers" --max-cost 1 --json
exa-agent-status agent_run_REPLACE_WITH_RETURNED_ID --json
Agent creation returns immediately and does not poll or retry automatically.
Completed output uses output.text, output.structured, and output.grounding;
JSON also retains cost and stop-reason metadata. --max-cost accepts $1–$100 for
auto and ultra effort. Without it, Exa currently defaults to $5 for auto and
$20 for ultra. Other effort tiers use their provider pricing.
Validation scope: search/crawl have live API checks. Agent create/get/cancel have
SDK request/response contract tests, credential-free dry runs, and a live read-only
Agent API access check. A paid Agent run was not submitted or completed in this
validation; --version alone is not an API functionality test.
AI-agent workflows
# Search and collect source URLs
exa-search "topic" --json | jq -r '(if type=="array" then . else (.results // []) end)[] | .url'
# Retrieve the first source
exa-search "topic" --json \
| jq -r '(if type=="array" then . else (.results // []) end)[0].url // empty' \
| xargs exa-crawl -c 6000
# Submit a research task, then retrieve the result
exa-agent "topic" --max-cost 1 --json
exa-agent-status agent_run_REPLACE_WITH_RETURNED_ID --json
Example search output:
{
"results": [
{
"title": "...",
"url": "...",
"published_date": "2025-01-15T00:00:00.000Z",
"author": "...",
"highlights": ["excerpt..."],
"text": "page text when requested and available"
}
]
}
See the usage guide for schemas, exit codes, and environment reference.
Focused source reading
# Tell search what the broader task needs, without expanding the query itself.
exa-search "home watch Tampa Bay pricing" \
--objective "Prefer local providers with published prices; exclude directories." \
-n 5 --compact
# Extract relevant passages across a long page instead of only its opening text.
exa-crawl https://www2.myfloridalicense.com/electrical-contractors/faqs/ \
--query "Is a license required to install low voltage network wiring?" \
-c 2500 --compact
# Refresh a changing pricing page if cached content is older than a day.
exa-crawl https://example.com/pricing --max-age-hours 24 --compact
--query requests highlights only and explicitly disables full text. Excerpts
help locate evidence; they do not replace a full reading when context matters.
When bounded full text reaches its limit, stderr warns that it may be incomplete.
--max-age-hours is available on search and crawl; omit it to keep existing API
defaults. Search mode lite does not accept freshness controls. --objective
cannot be combined with --similar.
--compact uses one-line JSON, removes empty values, duplicate URL IDs and
decorative fields, and retains substantive data, costs, warnings and per-URL
statuses. Existing --json output is unchanged. Neither mode saves state or
automatically repeats a request. See full details.
Scope and review
Queries and retrieval requests are sent to Exa. Agent creation creates tasks on that external service; this is not an entirely offline or read-only workflow. Keep API keys private, check source material, and review generated research before using it in a business decision.
This project demonstrates a practical AI-assisted integration. It does not claim independently measured time savings, enterprise deployments, or an independent security audit. The provider's capabilities and availability remain outside this repository's control.
License
MIT — Nolan Vale. See LICENSE.
Metadata
Release files for exa-search-cli 0.1.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| exa_search_cli-0.1.7.tar.gz | 71.0 kB | Without provenance | Details for exa_search_cli-0.1.7.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| exa_search_cli-0.1.7-py3-none-any.whl | Python 3 | none | any | Details for exa_search_cli-0.1.7-py3-none-any.whl |
Total release size: 86.2 kB
Release files / exa_search_cli-0.1.7.tar.gz
| Download URL | exa_search_cli-0.1.7.tar.gz |
|---|---|
| Size | 71.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9dcfe4bc8e59ade1f90e3860729cd15d9dd59b3dc3937d893ba2e4ec2bb397fa
|
|
BLAKE2b-256 checksum How to use checksums |
330df11f82b1ca169d9e99615fee26908c7e98aef1b32938a1d2ec582267410f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / exa_search_cli-0.1.7-py3-none-any.whl
| Download URL | exa_search_cli-0.1.7-py3-none-any.whl |
|---|---|
| Size | 15.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3ed6088b8210c09ecabeb67e8258cdb27c61c0b9b84c07247113b779bf976c66
|
|
BLAKE2b-256 checksum How to use checksums |
00293b56755bc75039d46cd85fec6d58af74fbb4012da61e084bea0bd473a364
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for exa-search-cli 0.1.7
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.