anddev
anddev

Reputation: 3204

Get google search data without using google in Android?

Hello All I want to search Images from the google search but I dont want to use google site/ browser. I want to make my own layout in that when user searched for any images then it will display the result which is displaed when we searched the same image in google.

Can any one tell me the intent for that.

Thanks in advance.

Upvotes: 0

Views: 463

Answers (2)

Paresh Mayani
Paresh Mayani

Reputation: 128428

You can use the Google Image Search API (FYI, its now deprecated).

For example, search images of me using this URL: https://ajax.googleapis.com/ajax/services/search/images?v=1.0&q=paresh%20mayani'

You just have to make a call on this URL and get a JSON response. Once you have JSON response, then you have to parse it and display wherever you want, may you display it inside the GridView or GalleryView.

FYI, i have already did this in one of my application and its working fine even today (After its deprecation even).

Result set on Browser:

enter image description here

Upvotes: 1

Ajinkya
Ajinkya

Reputation: 22710

You can try Google search API. http://google.com/complete/search?output=json&q=YOURSEARCHEDTERM or for XML output http://google.com/complete/search?output=toolbar&q=YOURSEARCHEDTERM. Not sure how it can be used with images. May be with little changes you can get it work.

Upvotes: 0

Related Questions