Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

pplx-search-sdk

Skill by perplexityai

Installs and uses pplx-srch-sdk, a Python SDK for the Perplexity Search API. Use it to run web searches, fan out many queries concurrently, and get query-relevant excerpts from URLs in scripts or notebooks.

  • Score 65
  • 84 stars
  • Apache-2.0
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install pplx-search-sdk

Built from the published package, never by AI.

git clone --depth 1 https://github.com/perplexityai/api-platform-developers /tmp/api-platform-developers && mkdir -p ~/.claude/skills && cp -r /tmp/api-platform-developers/skills/pplx-search-sdk ~/.claude/skills/pplx-search-sdk

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install pplx-search-sdk in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

The pplx-srch-sdk package is a public Python SDK for the Perplexity Search API. It lets code run live web searches with search.web, run many independent queries concurrently with search.web_many, and pull query-relevant excerpts from known URLs with content.snippets. A synchronous facade covers most work, and AsyncPplxClient offers the same surface for async code.

Search results come back as typed records such as WebHit. API failures raise typed exceptions that derive from APIError, and errors inside a fan-out batch are reported per query instead of stopping the run. The skill also lists common pitfalls, such as checking the error field on snippet results before using their text. It suits developers, data analysts and researchers who want web search inside Python scripts or notebooks.

Written from the project's SKILL.md and checked against it.

What it can do

  • search.webRuns a live web search from Python and returns a list of WebHit records.
  • search.web_manyRuns one independent search per query with bounded concurrency, returning one result per query.
  • content.snippetsReturns query-relevant text excerpts for a list of specific URLs, one result per URL.
  • AsyncPplxClientProvides the same search surface for async code, for custom concurrency or long-lived clients.
  • Typed error handlingRaises typed exceptions such as RateLimitError and AuthenticationError derived from APIError.
  • Fan-out utilitiesIncludes pplx_srch_sdk.utils helpers for partitioning, flattening, deduplication and JSONL artifacts.

What you need

  • Python 3.12 or newer
  • Linux (x86_64 or aarch64) or macOS
  • Perplexity API key
  • PERPLEXITY_API_KEY environment variable

Try asking

  • Search the web for recent Rust async runtime news and list the top 5 hits.
  • Run parallel searches on three national parks and count hits per query.
  • Get query-relevant excerpts from these URLs about Python 3.13 changes.

Good to know

  • The SDK never retries or throttles, so each call sends one billable request.
  • Client-side timeouts are about 10 seconds for search and 30 seconds for snippets, and are not configurable.
  • Date filters use MM/DD/YYYY strings and cannot be combined with recency_filter.
  • There is no async version of web_many; use the fanout utility with the async client instead.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: skills/pplx-search-sdk/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Alternatives to pplx-search-sdk

All alternatives →

Compare with box, n8n-mcp-tools-expert or citation-management

pplx-search-sdk: common questions

Does importing pplx_srch_sdk require an API key?

No. Import succeeds without a key, but the first call raises AuthenticationError if PERPLEXITY_API_KEY is not set.

Does search.web return a list or a wrapped response?

It returns a bare list of WebHit objects, with no results wrapper, so hits can be indexed directly.

Why check the error field on snippet results?

A successful content.snippets call can still contain per-URL failures, which set error and leave text unset.

How do I install pplx-search-sdk?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is pplx-search-sdk free?

The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.

Is pplx-search-sdk safe to use?

It scores 65 of 100. Grades: maintenance B, licence A, quality B. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to pplx-search-sdk?

Similar skills: box, n8n-mcp-tools-expert, citation-management, exa-search.

pplx-search-sdk Install

Add to stack

Loading.