8

Just setup my CSE with Image Search enabled in the Basics tab, but still ain't getting results.

If I don't use searchType=image in the query it works, if I put it back it stops working with no errors, just no results.

Any inputs?

2 Answers 2

13

It seems there are two elements required to consume the Google search API, the configuration of the API key and credentials.

Setup 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 the mistake like a lot of people of ignoring the CSE side of the setup (it didn't seem logical to search only my own site).

You need to create a CSE though, point it to search any url (I don't think it matters greatly), and then where it says "Sites to search" chose "Search the entire web but emphasise included sites". Also then set image search to "On".

Once you've done this browse to your new CSE, the url should contain your CX code e.g. cx=014341056213260336986:v4fl8n8sabc, you then need to use this in your request query string.

Your API query should now start returning results.

Sign up to request clarification or add additional context in comments.

1 Comment

wasted 2 hours, this ans saved me. Thanx @Russ Taylor. Hey user3573043 pls mark this as accepted ans man.
2

Image search needs to be switched to ON at the Custom Search Setup->Basics

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.