Skip to content

About

Python examples for Thordata proxy infrastructure, SERP API, and web data services

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Latest commit

 

History

14 Commits

Folders and files

Repository files navigation

Thordata Proxy Examples

Copy-paste examples for using Thordata proxy infrastructure and web data APIs.

Examples cover:

  • Residential proxies
  • Mobile proxies
  • Static ISP proxies
  • Datacenter proxies
  • SERP API
  • Web Unlocker
  • Web Scraper API
  • Geo-targeting
  • Sticky sessions
  • Concurrent requests
  • Error handling

Quick Links

Quick Setup

Clone the repository:

git clone https://github.com/Thordata/thordata-proxy-examples.git
cd thordata-proxy-examples

Install the Python SDK:

pip install thordata-sdk

For Python examples:

cp .env.example .env

Set your credentials in .env:

THORDATA_SCRAPER_TOKEN=your_scraper_token
THORDATA_RESIDENTIAL_USERNAME=your_username
THORDATA_RESIDENTIAL_PASSWORD=your_residential_password

Never commit .env or real credentials.

Examples By Language

Language Location
Python examples/python/
Node.js examples/nodejs/
Go examples/go/
Java examples/java/
curl examples/curl/

Examples By Use Case

Use case Examples
Basic proxy request examples/python/01_simple_ip_check.py
Geo-targeting examples/python/02_geo_targeting.py
Sticky session examples/python/03_sticky_session.py
Concurrent requests examples/python/04_concurrent_requests.py
Product comparison examples/python/05_different_products.py
Async geo-targeting examples/python/06_async_geo_targeting.py
Error handling examples/python/07_error_handling.py
curl proxy usage examples/curl/
Go proxy usage examples/go/
Node.js proxy usage examples/nodejs/
Java proxy usage examples/java/

Proxy Products

Product Typical use
Residential Proxies Localized access and sensitive web scraping
Mobile Proxies Mobile-network and carrier-specific workflows
Static ISP Proxies Stable identity and long sessions
Datacenter Proxies High-speed and high-volume requests

Review the product documentation for current availability, pricing, limits, and supported targeting options.

Web Data APIs

Use the examples and official documentation for:

Environment Variables

The examples use environment variables for credentials.

Common variables include:

THORDATA_SCRAPER_TOKEN=your_scraper_token
THORDATA_PUBLIC_TOKEN=your_public_token
THORDATA_PUBLIC_KEY=your_public_key
THORDATA_RESIDENTIAL_USERNAME=your_residential_username
THORDATA_RESIDENTIAL_PASSWORD=your_residential_password

Only set the variables required by the example you are running. Do not place real credentials directly in source files.

Running Examples

Python:

cd examples/python
python 01_simple_ip_check.py

curl:

bash examples/curl/01_basic_proxy.sh

Go:

cd examples/go
go run ./simple_ip_check

Node.js:

cd examples/nodejs
node 01_simple_ip_check.js

Java:

cd examples/java
javac SimpleIpCheck.java
java SimpleIpCheck

Some examples require product-specific credentials or account permissions. Check the example comments and the official documentation before running them.

Safety And Usage

Use these examples only for lawful and authorized web data workflows.

  • Respect website terms and access restrictions.
  • Do not commit API tokens, usernames, or passwords.
  • Do not use the examples to bypass access controls.
  • Follow applicable privacy and data protection requirements.
  • Respect rate limits and your account plan.
  • Review the applicable product terms before collecting or redistributing data.

Related Resources

Support

For technical questions, open an issue in this repository.

For account, product, licensing, or commercial questions, contact the Thordata team.

License

MIT License. See LICENSE.

About

Python examples for Thordata proxy infrastructure, SERP API, and web data services

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages