function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ 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:

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.

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