locked
Maximum number of search results returned RRS feed

  • Question

  • Hi

    If possible can you tell me what the maximum number of search results are returned by the Live Search API 2.0

    Seems the most i can get is 50 (request.Web.Count = 50) anymore than that and i get a null referance exception from the

    catch (SoapException ex)

     

    Regards

    George

    Monday, November 24, 2008 11:55 PM

Answers

  • 1000 results, 50 at a time.

     

    HTH

     

    --Alessandro

     

    Thursday, November 27, 2008 6:25 AM

All replies

  • From the documentation of the property Count of the object WebRequest (that you can find at http://msdn.microsoft.com/en-us/library/dd251004.aspx):

     

    "The default value for Count is 10 (ten), and the maximum count value is 50"

     

    HTH

     

    --Alessandro

     

    Tuesday, November 25, 2008 4:59 PM
  • Hi Alessandro

     

    Thanks for the reply, can you tell me whether this is correct then, i do a search for cheap flights from gatwick which has a total of 1,240,000 records found(response.Web.Total) but the most i can display is 50 results.

     

    Or from the link you gave me i can display 1,000 results:

     

    Search results are limited to the first 1,000 results. This means that the total of WebRequest.Count plus WebRequest.Offset should not be greater than 1,000.

     

    Below is a snippet of my code:

     

    request.Web = new net.live.search.api.WebRequest();

    request.Web.Count = 50;

    request.Web.CountSpecified = true;

    request.Web.Offset = 0;

    request.Web.OffsetSpecified = true;

    request.Web.FileType = "html";

    request.Web.Options = new WebSearchOption[]

    {

    WebSearchOption.DisableHostCollapsing,

    WebSearchOption.DisableQueryAlterations

    };

     

    If i change request.Web.Count = 50; to anything higher than 50, i get an error 'Client error' or when i catch the inner exception i get 'null referance exception'

     

    So i'm a bit confused as to whether i can only display 50 results or 1,000 results

     

    Regards

    George

    Wednesday, November 26, 2008 9:36 AM
  • 1000 results, 50 at a time.

     

    HTH

     

    --Alessandro

     

    Thursday, November 27, 2008 6:25 AM
  • Thanks Alessandro

    Regards

    George

    Thursday, November 27, 2008 8:04 AM