Skip to content

An http client library to search the google custom search api. 0 dependencies

License

Notifications You must be signed in to change notification settings

you-got-bud/google-custom-search-node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Google Custom Search for Node.js

NPM Version npm bundle size

This is a simple wrapper for the Google Custom Search API. It allows you to search the web for images, web pages, and more. Built with TypeScript and 0 external dependencies.

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
)

About

An http client library to search the google custom search api. 0 dependencies

Resources

License

Stars

Watchers

Forks

Packages

No packages published