1.2.0 • Published 4 years ago
simple-google-image-search v1.2.0
Google Image Search
This is a simple library to get an image URL from a search string via Google search.
Prerequisites
- Create a new search engine here, check image search and copy your search engine key
- Create a new Google Custom Search API key here
Install
npm i -S simple-google-image-search
Usage
import {GoogleImageSearch} from 'simple-google-image-search';
const imageSearch = new GoogleImageSearch("your API key", "your search engine key");
// Get an image URL of a banana
imageSearch.getImageUrl('banana').then((res) => {
console.log(res);
});