Skip to main content

A Python SDK for TalorData SERP API.

Project description

TalorData Python SDK

A lightweight Python SDK for the TalorData SERP API, inspired by the developer experience of serpapi-python.

Repository: Talordata/talordata-serp-python

Install

pip install -e .

For development and publishing helpers:

pip install -e ".[dev]"

Quick Start

import os

from talordata_serp import Client

client = Client(api_token=os.getenv("TALORDATA_API_TOKEN"))

results = client.search(
    engine="google",
    q="pizza",
)

print(results["search_metadata"]["status"])
print(results["search_information"]["query_displayed"])

You can also set the token once in your shell:

export TALORDATA_API_TOKEN=your_token

Then use the top-level helper:

import talordata_serp

results = talordata_serp.search(q="pizza", engine="google")
print(results)

Examples

Runnable examples are included in the examples/ directory:

  • examples/basic_search.py
  • examples/search_with_url.py
  • examples/html_output.py

Run one with:

python examples/basic_search.py

API Design

  • Client(api_token=...): create a reusable client.
  • client.search(...): send a form-encoded POST request to /request and parse JSON automatically.
  • client.search_json(...): same as search(), but always returns a plain dict.
  • client.search_html(...): return raw HTML/text output.
  • talordata_serp.search(...): convenience helper for one-off requests.

Example With URL

The official docs also show url-based requests. The SDK supports that directly:

from talordata_serp import Client

client = Client(api_token="your_token")

results = client.search(
    url="https://www.google.com/search",
    q="pizza",
    json=1,
)

print(results.as_dict())

Notes

  • Auth uses the Authorization: Bearer <token> header.
  • Requests are sent as application/x-www-form-urlencoded.
  • Boolean params are normalized to "1" and "0" to match common form API expectations.

Build And Publish

Build distributions locally:

python -m build

Check the generated artifacts:

python -m twine check dist/*

Upload to PyPI:

python -m twine upload dist/*

Project details


Download files

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

Source Distribution

talordata_serp-0.1.0.tar.gz (8.5 kB view details)

Uploaded Source

Built Distribution

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

talordata_serp-0.1.0-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file talordata_serp-0.1.0.tar.gz.

File metadata

  • Download URL: talordata_serp-0.1.0.tar.gz
  • Upload date:
  • Size: 8.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for talordata_serp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0536df8df304cb29c38f2f5b87044436a4c557daf294d2bf2ef9e7931b8b1cd6
MD5 216a4eddecc8f32c501145da1d9a12e7
BLAKE2b-256 cab84b7d97b4f178b32291123d31eed37a31f62213a2f0f281d435bb4f62cff0

See more details on using hashes here.

Provenance

The following attestation bundles were made for talordata_serp-0.1.0.tar.gz:

Publisher: workflow.yml on Talordata/talordata-serp-python

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

File details

Details for the file talordata_serp-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: talordata_serp-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for talordata_serp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7bb7f0c450643452f2b78fbbb4c8d90de8cc938a132bea384551f9514702c7ec
MD5 d71caedac761d3bf49c165b87fc38d86
BLAKE2b-256 f06331a8dea90fde2e3504809117786cc23acf38b44e81752fcc5a0587983e18

See more details on using hashes here.

Provenance

The following attestation bundles were made for talordata_serp-0.1.0-py3-none-any.whl:

Publisher: workflow.yml on Talordata/talordata-serp-python

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 Pingdom Monitoring Sentry Error logging StatusPage Status page