Metadata-Version: 2.4
Name: osint_search_engine_pkg
Version: 0.1.5
Summary: A unified wrapper for search engines like Serper, DuckDuckGo, etc.
Project-URL: Homepage, https://bitbucket.org/inits/osint-search-engines-pkg
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: httpx>=0.20.0
Requires-Dist: beautifulsoup4
Requires-Dist: playwright

# OSINT Search Engine Wrapper

A lightweight, async wrapper around multiple search engine APIs (Serper/Google, DuckDuckGo, Bing). This package provides a unified, opinionated interface for running OSINT text and image searches.

## Features

- **Async-first:** Built on `httpx` and `aiohttp` for high-performance concurrent searching.
- **Multiple Engines:**
  - **Google** (via Serper API)
  - **DuckDuckGo** (No API key required)
  - **Bing** (via Playwright/Headless Browser)
- **Standardized Results:** Returns clean, consistent JSON-like dictionaries across all engines.

## Installation

Install the package directly from PyPI:

```bash
pip install osint-search-engine-pkg

## Quick start

1. Setup API Keys
For Google (Serper), you need an API key. DuckDuckGo and Bing do not require keys.

```powershell
$env:GOOGLE_SERPER_API_KEY = "your_api_key_here"
```
```Mac/Linux
export GOOGLE_SERPER_API_KEY="your_serper_api_key"
```

2. Usage Example
Here is how to search using all three engines asynchronously:

```python
import asyncio
from search_wrapper import GoogleSearchFromSerper, DuckDuckGoSearch, BingSearch

async def main():
    # --- 1. Google Search (Requires API Key) ---
    # You can pass the key explicitly or rely on the env variable
    async with GoogleSearchFromSerper() as google:
        results = await google.search("OSINT tools python")
        print(f"Google found {len(results.get('data', []))} results")

    # --- 2. DuckDuckGo (No Key Needed) ---
    async with DuckDuckGoSearch() as ddg:
        results = await ddg.search("latest cybersecurity news")
        print(f"DuckDuckGo found {len(results.get('data', []))} results")

    # --- 3. Bing (Headless Browser) ---
    # use headless=False to see the browser action
    async with BingSearch(headless=True) as bing:
        results = await bing.search("site:linkedin.com python developer")
        print(f"Bing found {len(results.get('data', []))} results")

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



## Development notes
If you want to contribute or modify the source code:
1. Clone the repository.
2. Install in editable mode:
```bash 
pip install -e
```
3. Run tests using pytest (if available) or run the example scripts in tests/.



## Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

---
