Skip to main content

Search the web anonymously through the Tor network

Project description

Tor Search

Search the web anonymously through the Tor network. This Python package allows you to make search queries to Google, DuckDuckGo, and Yandex via the Tor network, protecting your privacy.

Features

  • Anonymous web searching through Tor network
  • Support for multiple search engines:
    • DuckDuckGo (most reliable through Tor)
    • Google
    • Yandex
  • Command line interface
  • Python API for integration into your own projects
  • User agent rotation
  • CAPTCHA detection for Yandex

Installation

Prerequisites

You need to have Tor running on your system:

  • On Mac/Linux: brew install tor then brew services start tor
  • On Ubuntu/Debian: apt-get install tor then service tor start
  • On Windows: Install the Tor Browser Bundle and ensure it's running

Install from PyPI

pip install tor-search

Usage

Command Line

# Basic search with DuckDuckGo (default)
tor-search "python programming"

# Search with Google and show 5 results
tor-search "python programming" -e google -n 5

# Search with Yandex
tor-search "machine learning" -e yandex

Python Module

from tor_search import TorSearcher

# Create a searcher instance
searcher = TorSearcher()

try:
    # Connect to Tor and search
    results = searcher.search("python programming", num_results=3, engine="duckduckgo")
    
    # Process results
    for result in results:
        print(f"Title: {result['title']}")
        print(f"URL: {result['link']}")
        print(f"Snippet: {result.get('snippet', '')}")
        print()
        
    # You can perform additional searches without reconnecting
    more_results = searcher.search("machine learning", engine="google")
finally:
    # Always disconnect when done to restore original socket
    searcher.disconnect()

License

MIT License

Disclaimer

This tool is meant for legitimate privacy-focused research. Please use responsibly and respect search engines' terms of service.

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

tor_search-0.1.2.tar.gz (8.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tor_search-0.1.2-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

Details for the file tor_search-0.1.2.tar.gz.

File metadata

  • Download URL: tor_search-0.1.2.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for tor_search-0.1.2.tar.gz
Algorithm Hash digest
SHA256 0d331c6df29fbec971864151a931605abe8efdc4ebddf99ec9b93b777a2402ad
MD5 9251bf4dc28c2dc0583f006cca8debe6
BLAKE2b-256 05a7e90a2ae62e0f883027f9000676a1a306b14b611f01a55031da60250fd472

See more details on using hashes here.

File details

Details for the file tor_search-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: tor_search-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 8.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for tor_search-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d180ed48be21db297ec4806845ecd70ce3de630e5dfb155ae3799c0ebea69df3
MD5 7f07d25e6378ecfdc57d04c18af85656
BLAKE2b-256 318c32f5d3b5405bb44b5dd646a257d808cf6617d0ca65b47f67da7cda75b133

See more details on using hashes here.

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