Thordata Python SDK
The Official Python Client for Thordata APIs
Proxy Network • SERP API • Web Unlocker • Web Scraper API
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.mddocs/serp_reference.mddocs/universal_reference.mddocs/browser_reference.mddocs/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.pyscripts/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)
| File | Size | Uploaded | |
|---|---|---|---|
| thordata_sdk-1.8.5.tar.gz | 109.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 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 logRelease 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