Image Search Abstraction Layer - Modules to use for image search with Node JS?

Hi, working on the Image Search Abstraction Layer basejump here. Curious to know which modules everyone is using for searching images in a Node app. Currently researching https://github.com/google/google-api-nodejs-client and https://www.npmjs.com/package/node-google-image-search

I used the Bing image search API. It didn’t need a seperate module.

I heard that Google can be a bit of a headache. I tried Imgur before Bing, but it didn’t have the info I wanted.

Actually, I just double checked, Sinai better clarify: While I didn’t use a module specifically tailored to an image API, I did use a module to handle http requests…

Allright, so just finished this app:

https://image-abstraction-laya.herokuapp.com/

I ended up using Google Custom Search JSON API, which is a RESTful API. It wasn’t that hard to implement actually. Just need an API key and APP ID and then can start getting JSON data with a http request. I used the request node module! Any feedback welcome!

Good work!

You can split your routes from your db operations for a little more modularity. Also, I noticed you have routes spread across 2 files. It would make more sense to me to have all the routes in one file so if you needed to modify them it’s easier to find them.

Here’s mine for comparison:

Good advice Jackson! Let me play with that

If you spot anything you’d do better in my code, please pass on your thoughts - I’m still a newbie, too :slight_smile:

Hi, chemok78,

First of all I would like to apologise for my English ! :slight_smile: I did my project based on yours and I learned so much from it. What i am realized is that your solution didn’t handle the situation when in the database are less than ten collection.
I solved this problem that way:

collection.find().count({}, function (error,count) {
if (error){
console.log(error);
}
// data handling
if (array.length == count || array.length==10) {
res.send(array);
}
});

Thank you.

Hey can anyone help me. Bing Azure market is not allowing to create any api keys.

nice one, thanks! thanks for the feedback

nore sure about the Bing Azure API, but i used the Google API