Skip to main content

Search-Tool

A unified interface and CLI for performing web searches across various search engines using Playwright.

Installation

uv tool install search-tool

Or use pip/pipx:

pip install search-tool
pipx install search-tool

Usage

CLI

# Basic search
st python decorator

# get first page
st -p1 current weather dallas tx

# Search with a specific engine
st -e brave "Python async programming"

# Sync cookies from Chrome to bypass logins (e.g., for Twitter/X)
st --sync-cookies chrome --sync-domains .x.com .twitter.com

Python API

import asyncio
from search_tool import SearchTool, SearchConfig

async def main():
    config = SearchConfig(search_engine="google", num_results=5)
    async with SearchTool(config) as tool:
        results = await tool.search("OpenAI o3-mini")
        for result in results.web_results:
            print(f"{result.title}: {result.url}")

if __name__ == "__main__":
    asyncio.run(main())

Cookie Syncing

The --sync-cookies flag allows you to import logged-in sessions from your existing browser (Chrome, Firefox, Edge, Brave, Safari, Opera) into Playwright's isolated persistent profile. This is particularly useful for:

  • Bypassing login screens on social media sites.
  • Avoiding captchas.
  • Searching authenticated content.

Metadata

Release files for search-tool 0.2.0

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

Source distribution (sdist)

Source distribution for search-tool 0.2.0
File Size Uploaded Provenance
search_tool-0.2.0.tar.gz 27.3 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for search-tool 0.2.0
File Interpreter ABI Platform
search_tool-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 66.6 kB

Release files / search_tool-0.2.0.tar.gz

Download URL search_tool-0.2.0.tar.gz
Size 27.3 kB
Tags Source
SHA-256 checksum
How to use checksums
23a07f3be244e43e133a07bac843abdd755cfb163371b8c9a476203eca007961
BLAKE2b-256 checksum
How to use checksums
3a75dab997c8472f902040381d3ac94d7aab89b565ce21bc69ab34e1063ce0e0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.2 CPython/3.10.12 Linux/5.15.0-164-generic

Release files / search_tool-0.2.0-py3-none-any.whl

Download URL search_tool-0.2.0-py3-none-any.whl
Size 39.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
48ea3f3d21a4f95a5b4ec363724b7e08fccfcc26b3547b44befea0176983461f
BLAKE2b-256 checksum
How to use checksums
4fd4231526868ece055eae27c54658ead5bc8056d3ee02afcf6ec8739b4c8599
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.2 CPython/3.10.12 Linux/5.15.0-164-generic

Security for search-tool 0.2.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

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