In Applescript, search the web How would I have Applescript display the first one or two options in a google search in a display dialog window? Is there a way to create a functional browser through applescript?
This is very easy:


Get some text to search for. You can use "Ask for text". Or something like the following:




display dialog "What do you want to search for?" default answer ""



Make a Google search URL. I used this snippet:




on run {input, parameters}  
    return "https://www.google.com/search?q=" &amp; input
end run



Get the contents from the webpage. I used "Get text from webpage", which is the easiest way by far. It's also possible to simply get the source of the page and use regexes to extract the data from there.
Decide how to display the data. A quick and dirty way to do this is:




on run {input, parameters}
    tell application "System Events" to display alert "result:" &amp; input
    return input
end run