different between google.com result and websearch api

63 views
Skip to first unread message

ali.d...@gmail.com

unread,
Mar 16, 2014, 3:04:59 PM3/16/14
to google-ajax...@googlegroups.com
hi.
i use ths code:
    <script src="https://www.google.com/jsapi"
        type="text/javascript"></script>
    <script language="Javascript" type="text/javascript">
    //<!
    google.load('search', '1');

    function OnLoad() {
      // Create a search control
      var searchControl = new google.search.SearchControl();

      // Add in a full set of searchers
      var localSearch = new google.search.LocalSearch();
      searchControl.addSearcher(localSearch);
      searchControl.addSearcher(new google.search.WebSearch());

      // Set the Local Search center point
      localSearch.setCenterPoint(New York,NY);

      // tell the searcher to draw itself and tell it where to attach
      searchControl.draw(document.getElementById("searchcontrol"));

      // execute an inital search
      searchControl.execute("keyboard");
    }
    google.setOnLoadCallback(OnLoad);

    //]]>
    </script>
  </head>
  <body>
    <div id="searchcontrol">Loading</div>
  </body>
</html>

but my problem is:
when compare result of this code and google.com, result is different.
result of above code:
www.amazon.com,www.bgfl.org,en.wikipedia.org,www.apple.com
result of google.com:

www.bgfl.org/virtualkeyboard‎,en.wikipedia.org/wiki/Computer_keyboard‎,en.wikipedia.org/wiki/Keyboard_instrument,https://www.apple.com/keyboard/
can anyone help me?
thanks a lot.

Jeremy Geerdes

unread,
Mar 16, 2014, 5:05:00 PM3/16/14
to google-ajax...@googlegroups.com
This is a design "feature" of the API designed to prevent people from using it for SEO and other uses prohibited by the TOS. Given that it has not been resolved in years (in fact, it has gotten worse), and the Web Search API is now well past the end of its three-year deprecation period (i.e., it may be discontinued at any time), I don't think I would expect any improvement. In my experience, the Custom Search API is no better, plus it has very strict request quotas.

jg





can anyone help me?
thanks a lot.

--
--
You received this message because you are subscribed to the Google
Groups "Google AJAX APIs" group.
To post to this group, send email to
google-ajax...@googlegroups.com
To unsubscribe from this group, send email to
google-ajax-searc...@googlegroups.com
To view this message on the web, visit
https://groups.google.com/d/msgid/google-ajax-search-api/9051178a-747c-4771-87e0-c867d2641887%40googlegroups.com
For more options, visit this group at
http://groups.google.com/group/google-ajax-search-api?hl=en?hl=en

---
You received this message because you are subscribed to the Google Groups "Google AJAX APIs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-ajax-searc...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Jeremy R. Geerdes
Generally Cool Guy
Des Moines, IA

If you're in the Des Moines, IA, area, check out Debra Heights Wesleyan Church!
Reply all
Reply to author
Forward
0 new messages