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 talordata-serp

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.1.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.1-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: talordata_serp-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 2f69b71ead1578223f2285f88625c47a275579bc0291d89ab63c2a827a0d4ac8
MD5 00bee420b4b251f4a312bc7d7928df50
BLAKE2b-256 fa95b0af9e0fef48990e6ff5564505d0d97b967d79341ce4edace1c090d3d8cd

See more details on using hashes here.

Provenance

The following attestation bundles were made for talordata_serp-0.1.1.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.1-py3-none-any.whl.

File metadata

  • Download URL: talordata_serp-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0707636b691baba866ae1a34e5e54657390940a0602fbd329e7fb5276e281a21
MD5 c40f5910a6301c4ae43bbec9bc3a44dd
BLAKE2b-256 a5d7dc753a7337375b65364f88802447cceb54401158ae65b5d6227a7f728c0b

See more details on using hashes here.

Provenance

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