According to the documentation, you can retrieve up to 8 results by including &rsz=8 in your query string (i.e., before &q=). You can then iterate through up to 8 "pages" of results like this using &start=[8 | 16 | 24 | 32 | 40 | 48 | 56] (again, adding it to your query string). This means that you can get a maximum total of 64 results from the Web Search API.
That said, you will want to note 2 things. 1. There are a number of points in your description which may violate the API's TOS. Namely, your stated objected to "saves all results of a google search" is concerning because it implies that you may be using your application to query the API in an automated fashion. Spiders, robots, crawlers, etc., are all prohibited by the TOS. Also, saving results must be done in direct response to user actions. I.e., you're not allowed to simply store all of Google's results into a database or some other store. I would strongly suggest reviewing the TOS before proceeding with your application. 2. The Web Search API (ajax.googleapis.com...) has been deprecated for more than 24 months now. You can expect it to be discontinued no later than May 2014. If your application will still be in use past that point, you will want to find an alternative. For example, the Custom Search API (CSAPI) can be used in conjunction with a Custom Search Engine to make up to 10,000 requests per day (though you can only get 100 requests/day free). jg On Wed, May 22, 2013 at 12:04 PM, Roberto di Lallo < dilallo.robe...@gmail.com> wrote: > Hi, > i'm writing a java application that saves all results of a google search. > I have a problem: i query google using this > http://ajax.googleapis.com/ajax/services/search/web?v=1.0&q= with > attached my query, but when i try to itering results (from JSON) it has > only 4 element. How can i have all the elements? > Thank you > > Roberto > > -- > -- > 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-search-api@googlegroups.com > To unsubscribe from this group, send email to > google-ajax-search-api+unsubscr...@googlegroups.com > To view this message on the web, visit > > https://groups.google.com/d/msgid/google-ajax-search-api/65fa5b1e-1e7b-45a2-a765-a482f2824f0d%40googlegroups.com?hl=en_US > 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-search-api+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- Jeremy R. Geerdes Generally Cool Guy Des Moines, IA If you're in the Des Moines, IA, area, check out Debra Heights Wesleyan Church! http://www.debraheightswesleyan.org -- -- 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-search-api@googlegroups.com To unsubscribe from this group, send email to google-ajax-search-api+unsubscr...@googlegroups.com To view this message on the web, visit https://groups.google.com/d/msgid/google-ajax-search-api/CAF4cwg9Hscv2O0XEtJrE%3DtEF8FLu3c18-3xUFX8_CRMbizRHcg%40mail.gmail.com?hl=en_US 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-search-api+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.