- Home /
Help searching google!
I've already looked at the WWW class, my question is, how could you search google for say, a math problem, and retrieve the result?
Answer by Happeloy · May 14, 2018 at 06:53 PM
When you say "retreive the result", what do you mean? If you want to get a list of the search results on that term, you should have a look at this search API from google: https://developers.google.com/custom-search/json-api/v1/overview?csw=1
If you want to get answers to math questions in particular, it could be worth having a look at the Wolfram Alpha API: http://products.wolframalpha.com/api/
Sorry if I wasn't clear enough!
I don't want math problems in particular, I'm just using it as an example. Say I wanted to know the answer to 1+1, but I didn't know the answer. How could I search google and get the answer "2"?
Well, no not really. Using the API from google I linked to before, you can get a json with the search results (I think, didn't look to far into it). But to deter$$anonymous$$e if any of those search results actually contain the answer you are looking for, and then going into that site and actually find the relevant part, is not something you can simply do.
You would pretty much have to automate the same procedure you would use if you manually went to google and tried to find an answer to a question. But again, wolfram alpha might be your best alternative for something like this. You can ask genreal questions there, like "how far away is the sun", and it will spit out an answer. with this API (https://products.wolframalpha.com/short-answers-api/documentation/), you can send a question (using the WWW class), and get a plain text answer as a result.
Hmmmm...will look into it.
You know how when you google something, it often gives you what it thinks is the best answer first? Could you return that?
Your answer
Follow this Question
Related Questions
how to enter another request from www with c# 1 Answer
WWW Object Timeout not working as expected. 0 Answers
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
Unity WWW gzip 1 Answer