File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Google Custom Search REST API

 
Patrick Noah
Greenhorn
Posts: 28
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I am trying to consume the google custom search REST API with the following java code. I get an exception that says "bad request". What am I doing wrong? Here is the google api documentation I have been following: https://developers.google.com/custom-search/v1/getting_started

Thanks in advance.



[Added code tags - see UseCodeTags for details]
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just to make sure: You're passing in the actual values for the "key" and "cx" parameters, not the dummy values you posted, correct?
 
Patrick Noah
Greenhorn
Posts: 28
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, I am passing in the values provided to me by google.
 
Patrick Noah
Greenhorn
Posts: 28
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I figured it out, I did not have the query string argument "q="
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic