https://github.com/matthiasunt/simple-google-image-search
https://github.com/matthiasunt/simple-google-image-search
google-image-search google-images google-search javascript typescript
Last synced: 7 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/matthiasunt/simple-google-image-search
- Owner: matthiasunt
- Created: 2019-12-17T17:31:30.000Z (almost 6 years ago)
- Default Branch: development
- Last Pushed: 2023-03-04T05:27:41.000Z (over 2 years ago)
- Last Synced: 2025-01-10T08:45:02.778Z (9 months ago)
- Topics: google-image-search, google-images, google-search, javascript, typescript
- Language: TypeScript
- Size: 157 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Google Image Search
This is a simple library to get an image URL from a search string via Google search.
### Prerequisites
1. Create a new search engine [here](https://cse.google.com/cse/all), check image search and copy your search engine key
2. Create a new Google Custom Search API key [here](https://console.cloud.google.com/apis/api/customsearch.googleapis.com)### 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);
});
```