Skip to content
This repository was archived by the owner on Nov 19, 2026. It is now read-only.
ThordataPublic archive

About

> Official Python SDK for Thordata's global proxy and web data infrastructure. Production-ready client for web scraping, SERP APIs, and AI data pipelines.

Topics

Resources

Contributing

Stars

2 stars

Watchers

0 watching

Forks

Repository files navigation

Thordata Python SDK

Thordata Logo

The official Python SDK for Thordata's proxy and web data services

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

PyPI version Python Versions License CI Status

Deprecated: This repository is no longer the primary Thordata Python SDK and will not receive new feature development. For all new and future Python projects, use the next-generation Thordata Python SDK. This repository is retained for historical reference only. Do not start new integrations with this SDK.


Overview

The Thordata Python SDK is an officially supported client library for Thordata's proxy and web data services.

It provides a unified Python interface for:

  • SERP API
  • Universal Scrape and Web Unlocker
  • Web Scraper Tasks
  • Proxy Network access

Use the SDK to build proxy-enabled web data collection, web intelligence, automation, and AI data workflows.

Get API Access

Create a Thordata account and get the credentials required by the SDK:

The SDK supports SERP API, proxy, Web Unlocker, and Web Scraper services.

Installation

Python 3.9 or later is required.

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

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.

Thordata Resources

For data marketplace products, visit Thordata DataMall.

About

> Official Python SDK for Thordata's global proxy and web data infrastructure. Production-ready client for web scraping, SERP APIs, and AI data pipelines.

Topics

Resources

Contributing

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages