📅 You're Invited: Meet the Socket team at RSAC (April 28 – May 1).RSVP
Socket
Sign inDemoInstall
Socket

multi-search-engine

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

multi-search-engine

A package for searching multiple search engines

1.0.1
PyPI
Maintainers
1

Multi-Engine Search Package

This package provides a unified interface to perform web searches across multiple popular search engines.

Features

  • Supports Google, Bing, DuckDuckGo, Yahoo, and Baidu search engines
  • Simple, consistent API for all supported search engines
  • Configurable number of results

Installation

To install the package, use pip:

pip install multi_search_engine

Usage

Here's a basic example of how to use the package:

from multi_engine_search import search

# Perform a Google search
results = search("Python programming", num_results=5)

# Perform a Bing search (requires API key)
bing_results = search("Machine learning", num_results=10, search_engine="bing", api_key="your_bing_api_key")

# Perform a DuckDuckGo search
ddg_results = search("Privacy", search_engine="duckduckgo")

# Perform a Google search
results = search("Python programming", num_results=5)

# Perform a Bing search (requires API key)
bing_results = search("Machine learning", num_results=10, search_engine="bing", api_key="your_bing_api_key")

# Perform a DuckDuckGo search
ddg_results = search("Privacy", search_engine="duckduckgo")

API Reference

search(query, num_results=10, search_engine="google")

Performs a web search using the specified search engine.

Parameters:

  • query (str): The search query.
  • num_results (int, optional): The number of results to return. Defaults to 10.
  • search_engine (str, optional): The search engine to use. Options are "google", "bing", "duckduckgo", "yahoo", and "baidu". Defaults to "google".

Returns:

A list of search results. The exact format may vary depending on the search engine used.

Raises:

ValueError: If an unsupported search engine is specified.

Supported Search Engines

  • Google
  • Bing
  • DuckDuckGo
  • Yahoo
  • Baidu

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts