diff options
author | Elias Fleckenstein <54945686+EliasFleckenstein03@users.noreply.github.com> | 2022-03-04 21:51:51 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-04 21:51:51 +0100 |
commit | 9ce3e65de157c71a1bfd9a5e6e1242ffd55f6a79 (patch) | |
tree | 762335af2649c9fdd75f52c9a95585837ecc88c4 | |
parent | 54e53ae3e1dccbfdb3937a63e99bcc9d523f24ba (diff) | |
download | google_images-9ce3e65de157c71a1bfd9a5e6e1242ffd55f6a79.tar.xz |
Create README.md
-rw-r--r-- | README.md | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..ac1c7c3 --- /dev/null +++ b/README.md @@ -0,0 +1,31 @@ +# google_images +Reverse Engineered Google Image Search API + +## Usage + +Exports `search` function that takes query string as first argument and optionally user agent as second. Usage of the user agent argument has not been tested. +`search` returns an promise that resolves to an array with objects like this (should be self-explanatory): + +```js +{ + preview: { + url: 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQpttHz6N94mnwy5NbULk733B3srNYPMsmaYQ&usqp=CAU', + size: { width: 168, height: 300 } + }, + image: { + url: 'https://en.free-wallpapers.su/data/media/3/big/anm5679.jpg', + size: { width: 1080, height: 1920 } + }, + color: 'rgb(232,190,194)', + link: 'https://en.free-wallpapers.su/img116919.htm', + title: 'Astolfo. Desktop wallpaper. 1920x1080' +} +``` + +### Example + +```js +const {search} = require("google_images"); +search("astolfo+images").then(results => results.forEach(r => console.log(r.image.url))) +``` + |