What url should I use
I'm using this to search Google from my website:
<form method="get" actio开发者_运维百科n="http://www.google.nl/search">
What url should I use to search images and videos? I couldn't find anything on the internet.
To search Images: http://www.google.nl/imghp?hl=nl&tab=ni
To search Video: http://video.google.nl/?hl=nl&tab=wv
I believe you could just use the same URLs that show up after searching on Images/Videos. Here's the result for the string "cookies":
http://images.google.com/search?tbm=isch&hl=en&source=hp&biw=1280&bih=570&q=cookies&gbv=2&oq=cookies&aq=f&aqi=g10&aql=&gs_sm=e&gs_upl=1208l1498l0l1658l4l2l0l0l0l0l143l220l1.1l2l0
After messing around with the query parameters a bit, I was able to eliminate everything except the requirements for an image search:
http://www.google.com/search?q=cookies&tbm=isch
Looks as though &tbm needs to be passed in, and in your case could be a hidden input in HTML:
Change it to this for videos:
To search Images --- http://www.google.com/imghp
To search Videos --- http://video.google.com/?hl=en&tab=iv
But to integrate more efficiently in application better to use.
JSON/Atom Custom Search API
The JSON/Atom Custom Search API lets you develop websites and programs to retrieve and display search results from Google Custom Search programmatically. With this API, you can use RESTful requests to get search results in either JSON or Atom format
精彩评论