Use SerpAPI to fetch search results with support for multiple engines (Google, Google AI Mode, Bing, Yahoo, etc.). Requires a SerpAPI key.
query (required): Search query string.engine (optional): Search engine (default: google). Options: google, google_ai_mode, google_images, google_maps, youtube# Search with Google
serpapi_search(query="2026年2月24日A股市场表现", engine="google")
# Use Google AI Mode
serpapi_search(query="AI最新进展", engine="google_ai_mode")
# Use Google Image for image search
serpapi_search(query="Sunflowers", engine="google_images")
serpapi_search.py with your SerpAPI key.pip install serpapiSERPAPI_API_KEY for security.共 1 个版本