Google Custom Search
Google Custom Search for online trends, news, current events, real-time information, or research topics.
- package:
@deepagent/google-custom-search - exports:
class GoogleCustomSearchClient,namespace googleCustomSearch - env vars:
GOOGLE_API_KEY,GOOGLE_CSE_ID - source
- google custom search docs
Install
npm install @deepagent/google-custom-searchyarn add @deepagent/google-custom-searchpnpm add @deepagent/google-custom-searchUsage
import { GoogleCustomSearchClient } from '@deepagent/google-custom-search'
const googleCustomSearch = new GoogleCustomSearchClient()
const results = await googleCustomSearch.search('latest news about openai')Make sure to set the GOOGLE_API_KEY and GOOGLE_CSE_ID environment variables or pass them to the constructor using the apiKey and cseId options.