Skip to main content

Basic Usage

main.py

Answering a Question

Use answer to get a direct, natural-language answer grounded in live web results, with citations:

Understanding the Response

The search method returns a SearchResponse object containing matching documents:
See Control content length to set a ceiling on how much content each result returns.

Controlling Results

Use max_results to limit the number of results:

Error Handling

Using Environment Variables

Set your API key once and the SDK will use it automatically:

Next Steps

Client Reference

Full API reference and configuration options.

Guides

Real-world usage patterns and recipes.