Freecodecamp: Basejump: Image Search Abstraction Layer - Much harder than other API Projects

Created on 7 Jan 2016  Â·  19Comments  Â·  Source: freeCodeCamp/freeCodeCamp

I've been working my way through the API Basejump projects and I found the Image Search Abstraction Layer to be significantly more difficult than the other 4 projects.

There are several compounding factors:
1) Google's API docs are huge and confusing.
2) There are hard limits on Google's free API usage of 100/day for free
a) If there is another recommended search API, it should be included in the description.
b) Tin Eye, for example, offers 30 req/hour: https://services.tineye.com/developers/tineyeapi/
3) Building a test harness is non-trivial. It's not strictly speaking required, but in order to stay under the 100/day, I felt that I needed to.
4) I ignored the specifc requirement that you use ?output=2 and instead used /2 - it's unclear if that needs to be a "hard" requirement or if it should be more generic.

I don't know that it necessarily needs to be made easier - I'm not really sure how you would do that - but it is by and far the most difficult and should be the 5th in the list.

Most helpful comment

I found a good module to use for access bing search in node.js here: https://github.com/dudleycarr/bing-search/blob/master/README.md

It actually made this much easier than some of the other projects

All 19 comments

I definitely got frustrated with this API. I think it could be improved by better describing what the api is about, and that you have to set up a custom search engine with google. Links to https://developers.google.com/custom-search/json-api/v1/overview and https://developers.google.com/custom-search/json-api/v1/reference/cse/list (perhaps explaining that the "start" parameter lets you implement pagination).

There are at least 3 potentially better APIs:
1) TinEye - allows 30 requests/hour (better than Google by 24x)
2) Bing - Allows 5k requests/day (50x Google)
3) Imgur = Allows 12.5k requests/dat (125x Google)

I've heard really good things about the Imgur API for being easy to use, too.

Is it a hard requirement to use the google image search API? I'm just getting started on this and it doesn't seem to suggest you use any particular one. Actually the whole challenge description seems a little vague..

@Deftwun No, there is no hard requirement to use Google. Many others have used the APIs I list above.

@SaintPeter Thanks a lot. Just wanted to point out after looking into the Bing search API that it is actually 5000 requests per MONTH not per day. Still works out to be a bit better than Google though. Think I'll go with Imgur myself.

@SaintPeter I actually found the file upload project much harder than the image search project, which is why I suggested putting that one as no 5...

But yes, setting up a google api key and enabling image search for your account is somewhat obscure. It might helpful adding a hint that suggests an easier to use api? On the other hand, though, basejumps are _meant_ to be more advanced than ziplines, so selecting a suitable api might be an important part of the challenge?

@george-stepanek I think that's a good point. If you ever needed (or just wanted) to make an API project no one would ever spell out to you what the "best" API for your use case is. Perhaps a good compromise would be to point the user at a couple APIs and leave them to do a little research on which they want to use?

I think it may be valuable to explicitly spell out that you may use any API and, BTW, here are some examples. Part of these projects is building dev skills and one of those skills will be finding and evaluating APIs.

Newbie point of view:

I just got this project to work using the Bing API.(https://bing-image-search-api.herokuapp.com/) I tried Imgur but I thought that the search results it gives are mostly silly/not relevant enough and I didn't find their API easy to use. I don't think the number of search requests is that important when choosing an API for this exercise. I managed to get the app working with less than 30 search requests.

I don't understand the user story: "I can paginate through the responses by adding a ?offset=2 parameter to the URL." Paginating through the responses I get but the offset=2 part not.

I think that just means your "page offset" ie what page of results to
display. That's how I did it anyway, I could be wrong though.

On Sun, Jan 31, 2016 at 1:34 PM Manolo [email protected] wrote:

Newbie point of view:

I just got this project to work using the Bing API.(
https://bing-image-search-api.herokuapp.com/) I tried Imgur but I thought
that the search results it gives are mostly silly/not relevant enough and I
didn't find their API easy to use. I don't think the number of search
requests is that important when choosing an API for this exercise. I
managed to get the app working with less than 30 search requests.

I don't understand the user story: "I can paginate through the responses
by adding a ?offset=2 parameter to the URL." Paginating through the
responses I get but the offset=2 part not.

—
Reply to this email directly or view it on GitHub
https://github.com/FreeCodeCamp/FreeCodeCamp/issues/5934#issuecomment-177573848
.

@Deftwun: Thanks, I might implement it like that.

I found a good module to use for access bing search in node.js here: https://github.com/dudleycarr/bing-search/blob/master/README.md

It actually made this much easier than some of the other projects

@jessjo
good find! That's really great

What about Flickr's api? It seems to be very generous and easy to use. Only problem is that it only returns results from its own collection / its not a full www search. Is that an issue, or would it be ok to use?

@jessjo That Bing API module made this project a snap (relatively speaking). Thanks!

I am a newbie and in my own opinion, this project was a real pain. There was no proper description of what the project should do giving that we should obviously be using a third party api and not building our own api from scratch. I hope I don't get frustrated out of this :(

The project description should be improved. I have been a developer for 25 years and it was not at all clear that you need to use a 3rd party API to do the searching.

This challenge has been removed in the beta, so I'm closing this issue.

This challenge is still on the curriculum for backend development certification. I think this should be reopened because the description on the challenge still doesn't make it clear that you can use a 3rd party API nor does it list any suggested 3rd party APIs to use.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

danielonodje picture danielonodje  Â·  3Comments

MelissaManning picture MelissaManning  Â·  3Comments

vaibsharma picture vaibsharma  Â·  3Comments

kokushozero picture kokushozero  Â·  3Comments

robwelan picture robwelan  Â·  3Comments