Perplexity Releases pplx CLI for Search API Access in the Terminal
Key Takeaways
- •pplx is a command-line client for Perplexity’s Search API that returns search and fetched page content in JSON rather than providing a chat interface.
- •The tool supports two working command surfaces: live web search and URL content fetching with cleaned page text.
- •Successful requests write one JSON object to stdout, while failures exit with code 1 and write a JSON error object to stderr.
- •Installation verifies downloaded binaries with SHA256 checksums and currently supports only macOS Apple Silicon, Linux x86_64, and Linux arm64.
- •Automated workflows can save full results to disk and use stdout previews for shorter output, but previews require an output directory to be configured.

Perplexity has released pplx, an official command-line client for its Search API that brings grounded web search results and extracted page text into the terminal as JSON. According to the project documentation, the tool is designed for both human users and coding agents.
The client is not a chat interface. It does not provide a conversational mode, model selection, or synthesized answers. Instead, it exposes Search API functionality through a constrained command-line workflow with a predictable output format. That distinction matters for automation: scripts and agents can consume search and fetch results as structured data without depending on a browser session or parsing a natural-language chat response.
Two Commands and a Strict JSON Contract
pplx provides exactly two working command surfaces. pplx search web runs a live web search, while pplx content fetch retrieves a URL and returns cleaned page text.
The official pplx-cli Agent Skill defines the output contract around those commands. A successful request exits with code 0 and writes exactly one JSON object to stdout. For search, the response takes the form {hits: [{url, title, domain, snippet, ...}], total, saved_to?}.
Failures are handled separately. Any failure exits with code 1, leaves stdout empty, and writes one JSON error object to stderr in the form {"error":{"code","message","command","hint"?}}. Documented error codes include AUTHENTICATION, UNKNOWN_ARGUMENT, ARGUMENT_ERROR, and BAD_REQUEST. The Agent Skill notes that the list is not exhaustive, so callers should branch on error.code rather than assuming only those codes will appear. The stdout-versus-stderr split also follows a common Unix pattern, making it easier for calling processes to separate successful data from operational errors.
Installation and Supported Platforms
Installation is provided through a single shell command that pipes an install script into sh. The install.sh script downloads manifest.json from the latest release and extracts the tag and version. It then pins all remaining downloads to that tag, explicitly to avoid racing a concurrent publish.
The script downloads SHA256SUMS and the appropriate platform binary, verifies the checksum, and installs the binary to ~/.local/bin/pplx. It does not require sudo. A receipt is written to ~/.config/pplx/pplx-receipt.json, but only after the installed binary runs successfully.
Platform support is limited to three targets: macOS on Apple Silicon, Linux x86_64, and Linux arm64. Unsupported platforms exit with an error. There is no Windows build and no Intel macOS build.
Token Budgeting for Agent Workflows
One of the most agent-focused features is token budgeting. The --output-dir option writes the full result set to a JSON file, while --stdout-preview[=<CHARS>] truncates long string fields in stdout and adds ...<truncated> markers.
The Agent Skill highlights an important limitation: --stdout-preview is a no-op unless a save directory is also configured. It truncates stdout only when the full result is saved through --output-dir or $PPLX_OUTPUT_DIR. If used alone, it returns full-size output, and individual hits can be multiple kilobytes each.
Saved search results are written to {dir}/web/{rand}.json, and fetch results are written to {dir}/fetch/{rand}.json. Files are written only after a successful request. The PPLX_OUTPUT_DIR environment variable can set a workspace default so the directory flag does not need to be repeated. This design lets automated workflows keep complete artifacts on disk while passing a smaller preview through the context window or log stream.
For content fetch, the documentation adds a correctness check rather than a cost control: users should verify error and is_paywall in the output before trusting fetched content. The --html option adds a raw_html field fetched live through the crawler, and --no-cache forces a live fetch.
Authentication is also relevant for automated use. pplx auth login is TTY-only, so agents and CI environments must export PERPLEXITY_API_KEY. Search API billing is listed at $5.00 per 1,000 requests, with a 50 QPS cap on every usage tier.
Sources cited by the original report include perplexityai/perplexity-cli, pplx-cli SKILL.md, api-platform-developers, Perplexity API pricing, Rate limits and usage tiers, and the Search API quickstart.