@you-got-bud/google-custom-search-node
v1.0.0
Published
Query Google Custom Search in NodeJS With full typescript support. 0 dependencies
Downloads
3
Maintainers
Readme
Google Custom Search for Node.js
This is a simple wrapper for the Google Custom Search API. It allows you to search the web for images, web pages, and more.
Installation
PNPM
pnpm add @you-got-bud/google-custom-search-node
Yarn
yarn add @you-got-bud/google-custom-search-node
Bun
bun add @you-got-bud/google-custom-search-node
NPM
npm i @you-got-bud/google-custom-search-node -S
Usage
import {search, Google} from '@you-got-bud/google-custom-search-node'
const GOOGLE_CX = '<GOOGLE SEARCH ENGINE ID>'
const GOOGLE_API_KEY = '<GOOGLE API KEY>'
const searchParameters = {
safe: 'active',
} satisfies Google.SearchParameters
const results = await search(
'cats',
{
cx: GOOGLE_CX,
key: GOOGLE_API_KEY,
},
searchParameters
)