---
ref: tool:perplexity/get-page-snippets
name: Get page snippets
company: company:perplexity
workflows: []
access: [cli]
tags: [capability:scrape-web, category:web-search, has:cli]
docs: https://docs.perplexity.ai/docs/cli/overview
updated: 2026-09-27
---

# Get page snippets

Returns only the passages of one or more web pages that are relevant to a query, as JSON.

Pass the query, then up to 50 URLs; each page is snipped on its own.
`--max-tokens` (4096 by default) and `--max-tokens-per-page` cap the text. A
page that can't be snipped returns an `error` instead of `text` without failing
the command, so check every result. Needs CLI v0.2.3 or later.

## Set up

Use the first option your agent supports.

### CLI (official)

Install the command, then confirm it runs.

```sh
curl -fsSL https://github.com/perplexityai/perplexity-cli/releases/latest/download/install.sh | sh
pplx --version
```

Run `pplx content snippets`.

Set `$PERPLEXITY_API_KEY` in your environment first (get a key: https://console.perplexity.ai/project/keys).

Before doing anything else, make one read-only call to confirm access.

## Rules

- Ask the user before anything that sends messages, costs money, or changes data.
- Never print API keys.
