beginner
6 min read
API Integration

Web Search in Python

A complete guide to integrating SearchHive web search into your Python applications.

1

Install the SDK

Install the SearchHive Python package.

pip install searchhive
2

Initialize the client

Set up your API key and make your first search.

from searchhive import SearchHive
client = SearchHive(api_key="sk_live_xxx")
results = client.search(query="latest AI developments", max_results=10)
3

Process results

Loop through search results and extract the data you need.

for result in results['search_results']:
    print(f"{result['title']} - {result['url']}")
4

Build a search tool

Wrap it in a CLI tool or web app for easy access.

Ready to try it?

Get your free API key and start building in minutes.

Get Free API Key →