Skip to main content

exa-search-cli

Research automation through a command-line integration with Exa: search, page-text retrieval, and research tasks.

中文 · Русский · Português · Español · 日本語 · 한국어

PyPI Python 3.11+ License: MIT

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

Four commands wrap Exa services:

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-research Submit a research task to Exa
exa-research-status Check the task and retrieve its result

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-research "document review workflow approaches"
exa-research-status <research-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 (default 5000), --query, --max-age-hours, --json, --compact, --timeout, --version.
  • exa-research: -m / --model (exa-research-fast, exa-research, exa-research-pro), --json. Model availability depends on Exa.
  • exa-research-status: --json.

See full usage documentation and the installed commands' --help for additional details.

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-research "topic" --json
exa-research-status <research-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. Research commands create 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.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for exa-search-cli 0.1.6
File Size Uploaded Provenance Actions
exa_search_cli-0.1.6.tar.gz 65.3 kB Without provenance Details for exa_search_cli-0.1.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for exa-search-cli 0.1.6
File Interpreter ABI Platform Actions
exa_search_cli-0.1.6-py3-none-any.whl Python 3 none any Details for exa_search_cli-0.1.6-py3-none-any.whl

Total release size: 77.8 kB

Release files / exa_search_cli-0.1.6.tar.gz

Download URL exa_search_cli-0.1.6.tar.gz
Size 65.3 kB
Tags Source
SHA-256 checksum
How to use checksums
ab1a20aca90c606a82758579d2d7589d75c591cba38e2bc17e4700359597f2f3
BLAKE2b-256 checksum
How to use checksums
7ec423d885142d45649963007cbd58ee243dd462308aa86e9068518428e62359
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.6-py3-none-any.whl

Download URL exa_search_cli-0.1.6-py3-none-any.whl
Size 12.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1de1d09b81254e06da1af599e11d6b1544af3f0c531be6e87be8ea0cc6c091c1
BLAKE2b-256 checksum
How to use checksums
955c8badbb795b51e6b02ea0855fc0ccd1317ecee5162afefd3996684541d58c
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.6

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page