+ Start a Discussion
sfdcDeveloper 12sfdcDeveloper 12 

Show result from google search

I have one requirement where I need to create one vf page where I will enter some input and then it will search it in google and show me that result in vf page. I don't know from where I need to start. If anyone share some dummy code it will be great help.
Thank you
Jason D. WilliamsJason D. Williams

Hi Narenda-

The Google Custom Search API would be a good place to start:

https://developers.google.com/custom-search/

Specifically the JSON/Atom Custom Search API, which allows you to embed search into your custom page.

This could probably be done on the client side entirely with AJAX calls to the API, parsing the resulting JSON and updating a component on your VF page.

Alternatively, all the API calls could be done via Apex. You could have a method that made the calls, parsed the results and stuffed them into a List based on a custom class. That List could then be bound to a VF control, such as a dataTable.

Hope this helps.

Jason
sfdcDeveloper 12sfdcDeveloper 12
Thanks Jason
But can you please explain it by some code.