Image search abstraction layer challenge: google cse gives 403 error

Image search abstraction layer challenge: google cse gives 403 error
0

#1

For some reason google CSE sends a XML with 403 error and no reject reason given. I double checked my CSE ID, tried to switch https back and forth, tried with and without KEY parameter, tried to send request to www.google.com/search and to cse.google.com/cse nothing worked.
Here is request string example:
http://www.google.com/search?start=0&num=10&q=google&client=google-csbe&output=xml_no_dtd&ie=utf8&oe=utf8&cx=’ + CSE_ID + ‘&key=’ + KEY


#2

Have you checked out the CSE dashboard? There’s a link there that goes to the API explorer, where you can plug in parameters and it’ll give you a URL.

At the minimum, the URL should look like

https://www.googleapis.com/customsearch/v1?q={SEARCH_TERM}&cx={CSE_ID}&key={YOUR_API_KEY}

#3

Thanks, sending request to googleapis.com worked! Though i looked at CSR dashboard again and din’t found any mentions of it there, or in any documentation i read about google CSE API.


#4

It’s the “Try this API in APIs Explorer” link on the right
(it goes here: https://developers.google.com/apis-explorer/?hl=en_US#p/customsearch/v1/)


#5

I see. Seems like i looked at the wrong API. Thanks again.