# async-g-i-s

> Async Google Image Search

Latest version **1.5.5** (published 2024-11-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install async-g-i-s
pnpm add async-g-i-s
yarn add async-g-i-s
bun add async-g-i-s
```

## Health

**Score 35/100 (D)** — status: maintenance-mode.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.5.5 |
| Published | 2024-11-30 |
| First published | 2022-04-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 6.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Akif9748 |
| Maintainers | akif9748 |
| Keywords | google, image, search |

## Links

- npm: https://www.npmjs.com/package/async-g-i-s
- Repository: https://github.com/Akif9748/async-g-i-s
- Issues: https://github.com/Akif9748/async-g-i-s/issues
- npm.io page: https://npm.io/package/async-g-i-s

## Alternatives

- [exif-parser](https://npm.io/package/exif-parser.md) — 3.8M weekly downloads
- [vite-plugin-compression](https://npm.io/package/vite-plugin-compression.md) — 569.5K weekly downloads
- [pica](https://npm.io/package/pica.md) — 442.4K weekly downloads
- [@reportportal/client-javascript](https://npm.io/package/@reportportal/client-javascript.md) — 408.8K weekly downloads
- [@tldraw/state](https://npm.io/package/@tldraw/state.md) — 316.0K weekly downloads

## Recent versions

- 1.5.5 (latest) — 2024-11-30
- 1.5.4 — 2024-08-04
- 1.5.3 — 2024-06-20
- 1.5.2 — 2024-02-01
- 1.5.1 — 2023-09-13
- 1.5.0 — 2023-07-11
- 1.4.0 — 2023-05-22
- 1.3.1 — 2023-05-22
- 1.3.0 — 2022-10-24
- 1.2.0 — 2022-08-28
- 1.1.0 — 2022-06-28
- 1.0.0 — 2022-04-02

## README

# async-g-i-s

Async and new alternative for the [g-i-s](https://www.npmjs.com/package/g-i-s).

## Installation
[![NPM](https://nodei.co/npm/async-g-i-s.png?mini=true)](https://npmjs.org/package/async-g-i-s)

## Note for old Node.js versions (below 18):
This package works with `fetch` api, if you use it on older versions of Node.js, you need to install `node-fetch` package defined in package.json.

## Usage

### Async/await Usage
```js
const gis = require('async-g-i-s');

(async () => {
  try {

    const results = await gis("akif");
    console.log(results.slice(0, 10));

  } catch (e) {
    console.error(e);
  }
})();
```
### Promise Usage
```js
const gis = require('async-g-i-s');

gis("akif").then(console.log).catch(console.error);
```


### Output:
```js
[
  {
    url: 'https://m.media-amazon.com/images/M/MV5BMWQwM2M4NDMtOTI3Ni00NTMyLWI4YzktYTNkMjcyYmYzNzY4XkEyXkFqcGdeQXVyMTMyMTYxODIy._V1_.jpg',
    height: 1477,
    width: 1034
  },
  {
    url: 'https://upload.wikimedia.org/wikipedia/tr/c/ca/AkifDizi.jpg',
    height: 350,
    width: 350
  },
  {
    url: 'https://upload.wikimedia.org/wikipedia/commons/7/7b/Mehmet_%C3%82kif_Ersoy.png',
    height: 1908,
    width: 1656
  },
  {
    url: 'https://erdemyayinlari.com.tr/wp-content/uploads/2021/12/akif.png',
    height: 450,
    width: 300
  },
  {
    url: 'https://cdnuploads.aa.com.tr/uploads/Contents/2021/12/26/thumbs_b_c_8d154765bbfa0e823854bff84badecad.jpg?v\\u003d132249',      
    height: 486,
    width: 864
  },
  {
    url: 'https://img.kitapyurdu.com/v1/getImage/fn:11653825/wh:true/wi:500',
    height: 779,
    width: 500
  },
  {
    url: 'https://img.a.transfermarkt.technology/portrait/big/526642-1629104912.jpg?lm\\u003d1',
    height: 390,
    width: 300
  },
  {
    url: 'https://i.ytimg.com/vi/Ycm31r2SaPo/maxresdefault.jpg',
    height: 720,
    width: 1280
  }
]
```
## Default Options 
```js
gis("", {
  query: {},
  userAgent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36'
});
```

- **User agent**: it is default user agent of Chrome. You can change it to anything you want.
- **Query**: You can add additional queries to URL. For example, you can add `safe: "on"` to filter out NSFW results.

```js
gis("akif", {
  query: { safe: "on" },
  userAgent: 'Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)'
});
```
Example, this will not fetch NSFW results. And change user agent to Googlebot.

---
_Source: https://npm.io/package/async-g-i-s · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
