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   # not yet on PyPI; until then:
pip install git+https://github.com/perplexityai/perplexity-search-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.0.1-cp312-abi3-manylinux2014_x86_64.whl (3.3 MB view details)

Uploaded CPython 3.12+

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

Uploaded CPython 3.12+

pplx_srch_sdk-0.0.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.0.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.0.1-cp312-abi3-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pplx_srch_sdk-0.0.1-cp312-abi3-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6581448bcdc5e381806ba0d80420d816c733e4d8a019dd4264ff552a824cd191
MD5 b1e1d7752768dd260eacbd327de8b4fc
BLAKE2b-256 8b90f354958798dc6fde5faf12013ea68e0f0550c869b3230ea08073f8d0c1dd

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pplx_srch_sdk-0.0.1-cp312-abi3-manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 1c866dba686990757d8b6f411daf49cb3500a8f80ed104a5df3f9be6ba870f2d
MD5 4b2ff54802ebca8dd399e21da4e86e3d
BLAKE2b-256 8f3bf81b8a4d46fe4054691c2101891dd49e4f062309eeb0062529069d8a0f3b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pplx_srch_sdk-0.0.1-cp312-abi3-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 5523ef6fb7448f1c0522477598d45f86839aaa1981b2caba399abdc673167186
MD5 e5453412f0f996b501c0bb94bddcd691
BLAKE2b-256 e2636af345466da58d4f4b687f588fd8b0a5f8630ffd3e98beb36b2be95f9e3c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pplx_srch_sdk-0.0.1-cp312-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 871c2f86e23f385dd2b8d49a9a56ee02713bde84dbc624bafb0897ce4e47a9a2
MD5 38c0efb05f60033ca783c8a1dcd6c578
BLAKE2b-256 eb0f2a3da217e90c6c59c5f8b9003a117985f4e44c1c56c6469cc7c600221b47

See more details on using hashes here.

Provenance

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