Skip to main content

perplexity-search-sdk

Python SDK for the Perplexity Search API: live web search and query-relevant page snippets. A thin Python wrapper over a compiled core built from Perplexity-internal source.

Install

pip install pplx-srch-sdk

CPython 3.12+ on Linux (x86_64, aarch64) and macOS. The import name matches: import pplx_srch_sdk.

Quick start

Get an API key at perplexity.ai/account/api and export it as PERPLEXITY_API_KEY.

import pplx_srch_sdk

hits = pplx_srch_sdk.search.web("rust async runtimes", limit=5)
for hit in hits:
    print(hit.title, hit.url)

snippets = pplx_srch_sdk.content.snippets(
    query="rust async runtimes",
    urls=[hit.url for hit in hits],
)
for s in snippets:
    print(s.url, s.error or (s.text or "")[:200])

An async client with the same surface is available as pplx_srch_sdk.AsyncPplxClient.

Development

The Python wrapper (src/pplx_srch_sdk/) is maintained in this repository; PRs welcome. bin/ holds the compiled core, delivered prebuilt by Perplexity's internal release pipeline — never edited by hand. pip install . packs the host platform's .so via scripts/hatch_build.py; wheels for any supported platform build on any host with PPLX_SDK_PLATFORM=<tag> python -m build --wheel.

Apache-2.0 — see LICENSE.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

pplx_srch_sdk-0.2.0-cp312-abi3-manylinux2014_x86_64.whl (3.3 MB view details)

Uploaded CPython 3.12+

pplx_srch_sdk-0.2.0-cp312-abi3-manylinux2014_aarch64.whl (3.1 MB view details)

Uploaded CPython 3.12+

pplx_srch_sdk-0.2.0-cp312-abi3-macosx_11_0_x86_64.whl (3.2 MB view details)

Uploaded CPython 3.12+macOS 11.0+ x86-64

pplx_srch_sdk-0.2.0-cp312-abi3-macosx_11_0_arm64.whl (3.0 MB view details)

Uploaded CPython 3.12+macOS 11.0+ ARM64

File details

Details for the file pplx_srch_sdk-0.2.0-cp312-abi3-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pplx_srch_sdk-0.2.0-cp312-abi3-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 290a5c33b1fec16a96b65ec23e1aab66743534d88f484a0fba621069e86eb077
MD5 8faa33a5bf9317ae17ca6868b197117e
BLAKE2b-256 37384f54e1cde7c318393bd76e2a0a728ef777b98eacbfc76b7d6e3a3ff707dd

See more details on using hashes here.

Provenance

The following attestation bundles were made for pplx_srch_sdk-0.2.0-cp312-abi3-manylinux2014_x86_64.whl:

Publisher: publish-pypi.yml on perplexityai/perplexity-search-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pplx_srch_sdk-0.2.0-cp312-abi3-manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for pplx_srch_sdk-0.2.0-cp312-abi3-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 3a83bcdc1255d1148cc0b7a1754c20e4a8b68a4d6efd65f1b95d7ec4cc22bd24
MD5 d946f7038312f9f92011ed810cb316da
BLAKE2b-256 6e4557a4c88e94a9a211765757a401364a5d9112467f43a54870f9513a20dd49

See more details on using hashes here.

Provenance

The following attestation bundles were made for pplx_srch_sdk-0.2.0-cp312-abi3-manylinux2014_aarch64.whl:

Publisher: publish-pypi.yml on perplexityai/perplexity-search-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pplx_srch_sdk-0.2.0-cp312-abi3-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for pplx_srch_sdk-0.2.0-cp312-abi3-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 f50df90ba3115d5555181f84aebada176646e9a12f0df45c57eb914fd4e08800
MD5 5647f3344565da144281509df8adc826
BLAKE2b-256 c278f386a16d4a138ca41971f7510a0fa526f3e084b778b41b6c9e4954b291a8

See more details on using hashes here.

Provenance

The following attestation bundles were made for pplx_srch_sdk-0.2.0-cp312-abi3-macosx_11_0_x86_64.whl:

Publisher: publish-pypi.yml on perplexityai/perplexity-search-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pplx_srch_sdk-0.2.0-cp312-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pplx_srch_sdk-0.2.0-cp312-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6ab98cfad55b65254c1e4817469f1ea51aecfc80627e95112e895fd73d55f06e
MD5 9303149395942bf8c41d50f4c38c85cf
BLAKE2b-256 c73d8909e37e1d129179d4ca65cd144ffe5fc06047af6f9c7762b952f1c0b94d

See more details on using hashes here.

Provenance

The following attestation bundles were made for pplx_srch_sdk-0.2.0-cp312-abi3-macosx_11_0_arm64.whl:

Publisher: publish-pypi.yml on perplexityai/perplexity-search-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page