Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

The Google Forum


You are currently viewing our The Google Forum as a guest. Please register to participate.
Login



Reply
Some question about google news api search.
Old 12-16-2010, 05:59 AM Some question about google news api search.
Novice Talker

Posts: 7
Trades: 0
I tried to make a easy google news search api. I know google news api search can show max 8 items per page, and 8 pages(total 64 items).
1.How to add `image{}`(I want to show the news image), I read the document in google official website, but not understand.
2.Can google news api search set a start page at page 3?(the default page is always show page 1)
3.Is google api search have a day limit? I saw the old version Google SOAP Search API just allow custom use 1000 times per day.
Thanks.

Code:
<!DOCTYPE html> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
  <head> 
    <meta http-equiv="content-type" content="text/html; charset=utf-8"/> 
    <title>The Hello World of News Search</title> 
    <script src="https://www.google.com/jsapi?key=ABQ...-4eA"></script> 
    <script type="text/javascript"> 
      google.load('search', '1'); 
      var searchControl; 
      function OnLoad() {
        google.search.Search.getBranding(document.getElementById("branding"));
        var newsSearch = new google.search.NewsSearch();
        newsSearch.setUserDefinedLabel("sport");
  
        searchControl = new google.search.SearchControl();
  searchControl.addSearcher(newsSearch);
        var options = new google.search.DrawOptions();
        options.setDrawMode(GSearchControl.DRAW_MODE_TABBED);
  searchControl.setResultSetSize(google.search.Search.LARGE_RESULTSET); 
        searchControl.draw(document.getElementById("searchResults"), options);
        // Execute an inital search
        searchControl.execute("sport");
      }
      // Set a callback to call your code when the page loads 
      google.setOnLoadCallback(onLoad); 
    </script> 
  </head> 
  <body style="font-family: Arial;border: 0 none;"> 
    <div id="branding"  style="float: left;"></div><br /> 
    <div id="content">Loading...</div> 
  </body> 
</html>

Last edited by youlichika; 12-16-2010 at 06:01 AM..
youlichika is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Reply     « Reply to Some question about google news api search.
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.11381 seconds with 12 queries