Skip to main content

Thordata Python SDK

Thordata Logo

The Official Python Client for Thordata APIs

Proxy Network • SERP API • Web Unlocker • Web Scraper API

PyPI version Python Versions License CI Status


Overview

The Thordata Python SDK is an officially supported client library for Thordata APIs: SERP, Universal Scrape (Web Unlocker), Web Scraper Tasks, and Proxy Network.

Installation

pip install thordata-sdk

Configuration

Use environment variables (recommended). For local development, copy .env.example to .env and fill in values (never commit .env).

# [Scraping APIs]
export THORDATA_SCRAPER_TOKEN="your_scraper_token"

# [Management APIs]
export THORDATA_PUBLIC_TOKEN="your_public_token"
export THORDATA_PUBLIC_KEY="your_public_key"

# [Proxy: Residential / Unlimited / Datacenter / Mobile / ISP]
export THORDATA_RESIDENTIAL_USERNAME="your_username"
export THORDATA_RESIDENTIAL_PASSWORD="your_password"

Loading .env (optional)

The SDK does not automatically load a .env file. If you want .env support:

from thordata import load_env_file

load_env_file()  # loads ./.env if present, without overriding existing env vars

Quick Start

SERP Search

from thordata import Engine, ThordataClient

client = ThordataClient()
results = client.serp_search(query="latest AI trends", engine=Engine.GOOGLE, num=10)
for item in results.get("organic", []):
    print(item.get("title"), item.get("link"))

Universal Scrape

from thordata import ThordataClient

client = ThordataClient()
html = client.universal_scrape(url="https://example.com", js_render=True, country="us")
print(type(html), len(str(html)))

Web Scraper Tools

from thordata import ThordataClient
from thordata.tools import Amazon

client = ThordataClient()
task_id = client.run_tool(Amazon.ProductByAsin(asin="B0BZYCJK89"))
status = client.wait_for_task(task_id, max_wait=300)
if status == "ready":
    print(client.get_task_result(task_id))

See examples/ for more runnable scripts.

Documentation

  • docs/README.md (index)
  • docs/SDK_FEATURES_AND_USAGE.md
  • docs/serp_reference.md
  • docs/universal_reference.md
  • docs/browser_reference.md
  • docs/web_scraper_tasks_reference.md

Development & Testing

pip install -e ".[dev]"
ruff check src tests examples
black --check src tests examples
mypy src --ignore-missing-imports
pytest

Live / Integration tests

Integration tests are skipped by default. Enable them explicitly:

THORDATA_INTEGRATION=true pytest -m integration -v

For live end-to-end checks (requires real credentials in .env), see:

  • scripts/run_comprehensive_acceptance.py
  • scripts/acceptance/ (targeted read-only acceptance scripts)

License

MIT License. See LICENSE for details.

Metadata

Release files for thordata-sdk 1.8.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for thordata-sdk 1.8.5
File Size Uploaded
thordata_sdk-1.8.5.tar.gz 109.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for thordata-sdk 1.8.5
File Interpreter ABI Platform
thordata_sdk-1.8.5-py3-none-any.whl Python 3 none any Details

Total release size: 204.1 kB

Release files / thordata_sdk-1.8.5.tar.gz

Download URL thordata_sdk-1.8.5.tar.gz
Size 109.1 kB
Tags Source
SHA-256 checksum
How to use checksums
fe0df882e3ac270452694c6c47f2267229d93d6d619ea35095164c2ce77283ad
BLAKE2b-256 checksum
How to use checksums
46b5d13d437be4148dd307f9d4334e67720016fc302ae5dab3ef4082fceee347
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 27, 2026.

Transparency log

Release files / thordata_sdk-1.8.5-py3-none-any.whl

Download URL thordata_sdk-1.8.5-py3-none-any.whl
Size 95.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a6891165c5db43bfb2f9ff3a922961efc0c326f2d5687fe6623601271dad2af3
BLAKE2b-256 checksum
How to use checksums
bb23df541898972e5b94a24f0901a90b23108bdc8d9e026c0ce564205254c0b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 27, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.8.5 This release

2 release files

1.8.4

2 release files

1.8.3

2 release files

1.8.1

2 release files

1.8.0

2 release files

1.7.0

2 release files

1.6.0

2 release files

1.5.0

2 release files

1.4.0

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.8.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page