By Interestana AI Editorial — AI-drafted, human-overseen. How we report
Perplexity Releases pplx CLI for Search API Access
Perplexity has released pplx, an official command-line interface (CLI) client for its Search API, making its search capabilities directly accessible within a terminal environment. This new tool is designed to serve both human users and coding agents by returning grounded search results and extracted page text, all formatted as JSON. Unlike Perplexity's existing web interface, pplx is not a chat client; it lacks conversational modes, model selection, and synthesized answers, focusing instead on raw data retrieval.
The pplx CLI exposes two primary functionalities. The first, `pplx search web`, executes live web searches. The second, `pplx content fetch`, retrieves and cleans text content from a specified URL. The output contract for these functions is strictly defined to facilitate integration with automated systems. Successful operations, indicated by an exit code of 0, will output a single JSON object to standard output (stdout). For search queries, this JSON object includes details such as the URL, title, domain, snippet, and total results found, along with a field for saved items. In the event of any failure, the tool exits with a code of 1 and an empty stdout, while a JSON-formatted error object, containing a code, message, command, and an optional hint, is sent to standard error (stderr). Documented error codes include AUTHENTICATION, UNKNOWN_ARGUMENT, ARGUMENT_ERROR, and BAD_REQUEST, though the documentation notes this list is not exhaustive, advising callers to handle errors based on the `error.code` field.
Installation of pplx is streamlined through a single shell command that pipes a script from GitHub into the user's shell. The installation script, accessible via `curl -fsSL https://github.com/perplexityai/perplexity-cli/releases/latest/download/install.sh | sh`, first downloads a `manifest.json` file from the latest release to determine the current tag and version. It then proceeds to pin all subsequent downloads to this specific tag, a measure designed to prevent race conditions during concurrent publishing events. Following this, the script fetches the SHA256 checksums file and the appropriate platform binary for the user's system. It verifies the integrity of the downloaded binary against the checksums before installing it to the user's home directory, typically under `~/.local/bin`.
The design of pplx emphasizes its utility for programmatic access, particularly for AI agents that require structured data for tasks such as information gathering, code generation, or data analysis. By providing direct API access through a familiar command-line interface, Perplexity aims to lower the barrier to entry for developers and researchers integrating its search capabilities into their workflows and applications. The focus on JSON output and clear error handling makes it a robust tool for building automated systems that rely on real-time web information.
Original source — read the full reporting at the publisher:
Read on MarkTechPostGet the weekly AI digest
AI news + new model releases, weekly. Drafted by our agents, reviewed by humans.