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-search
yarn add @deepagent/google-custom-search
pnpm add @deepagent/google-custom-search
Usage
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.