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 is pplx_sdk.

Quick start

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

import pplx_sdk

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

snippets = pplx_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_sdk.AsyncPplxClient.

Development

The Python wrapper (src/pplx_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.1.1-cp312-abi3-manylinux2014_x86_64.whl (3.3 MB view details)

Uploaded CPython 3.12+

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

Uploaded CPython 3.12+

pplx_srch_sdk-0.1.1-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.1.1-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.1.1-cp312-abi3-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pplx_srch_sdk-0.1.1-cp312-abi3-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 19a65c6b48ad562a713cf8a634931e26a92cc700a69af68ecc59a6332c2cb79c
MD5 c1f1b538e2f62e17f3d559771b790431
BLAKE2b-256 94b7d69fc0630c2452356735f1c0e0fa4c85e65291e71da42f87a4bf09bdd895

See more details on using hashes here.

Provenance

The following attestation bundles were made for pplx_srch_sdk-0.1.1-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.1.1-cp312-abi3-manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for pplx_srch_sdk-0.1.1-cp312-abi3-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 bd0b9a921d134e73e2098f140411b0a9b3e8cb8ce1986412dfb56db483c8ccb2
MD5 09875316d6d4cfc014d4f298db447954
BLAKE2b-256 1438599b4469a13ce96fed7fd4e69180bb47443f9962a8bcae001927dd5bf888

See more details on using hashes here.

Provenance

The following attestation bundles were made for pplx_srch_sdk-0.1.1-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.1.1-cp312-abi3-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for pplx_srch_sdk-0.1.1-cp312-abi3-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 43aa6dd314a0cad29e0607a79c7f8956492dfbb97fc3470e8805bd0d3b3ba06f
MD5 05cf4807242d985bf38a841af5081169
BLAKE2b-256 f79b758c607a56a37ac51130e54a9e54c49c382fb75125d6be61edb449bf496d

See more details on using hashes here.

Provenance

The following attestation bundles were made for pplx_srch_sdk-0.1.1-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.1.1-cp312-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pplx_srch_sdk-0.1.1-cp312-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f90afaf61b2a175ab2ff38459e7a7a38aeb4bf8599004d658603030d3b97b350
MD5 6abebcc091cc883f19b745fdda7e55bf
BLAKE2b-256 b36050853f11ea48e70fbd62922c1e552756c13ce6df969cbceb50e87f13a3bd

See more details on using hashes here.

Provenance

The following attestation bundles were made for pplx_srch_sdk-0.1.1-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