Skip to main content

Basic Usage

index.ts

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 response object with matched documents:
See Control content length to set a ceiling on how much content each result returns.

Limiting Results

Use the maxResults field to limit results:

CommonJS Support

The SDK works with both ESM and CommonJS:
index.js

Error Handling

Next Steps

Client Reference

Full API reference and configuration options.

Guides

Real-world usage patterns and recipes.