Google Image Search API Image Search returns no results

Just set up CSE with image search support in the Basics tab, but still don't get results.

If I do not use searchType = image in the request, it works, if I return it, it will stop working without errors, just no results.

Any inputs?

+6
source share
2 answers

There seem to be two elements needed to use the Google Search API, the API key setting, and credentials.

Install the API key here https://console.developers.google.com/project

and create your own CSE here https://www.google.co.uk/cse/all

I made a mistake, like many people ignoring the CSE part of the installation (it was logical not to search only my own site).

You need to create a CSE, although you need to point to a search for any URL (I don’t think it matters very much), and then where it says "Sites to search" chose "Search the entire network, but select the included sites" . Then set the image search to β€œOn”.

Once you navigate to the new CSE, the URL should contain your CX code, for example. cx = 014341056213260336986: v4fl8n8sabc, you need to use this in the query string of the request.

Your API request should now start returning results.

+11
source

Image search should be switched ON to Custom Search Settings β†’ Basics

+1
source

All Articles