9

I am creating a java application which performs URL search for site :

http://www.alexa.com/topsites/category

User eneters a category name and my application displays all URL's and performs some operations.

I am using this alexa api for URL search.

http://docs.amazonwebservices.com/AlexaWebInfoService/2005-07-11/ApiReference_CategoryListingsAction.html

This api doesn't give all results. For eg. if i search for the category "Health", this api gives only 6 results but when i visit on site i get more than 500 results.

I tried to increase result by increasing count=500 and also checked by giving Start parameter in api but i am not getting all results.

Could you please suggest me that how i can increase the results ? or is there any other api which works as same alexa api and gives all results.

I got some suggestion that DMOZ api also uses same

http://www.dmoz.org/World/Esperanto/Ludoj/Komputilaj/

but could not get the link for DMOZ search api.

Could you please provide me a link to DMOZ search api.

I thanks to your all valuable suggestions.

sumit_batcoder
  • 3,369
  • 1
  • 25
  • 36
Toman
  • 1,156
  • 1
  • 12
  • 29

1 Answers1

2

If you'll notice, there is a Start parameter in addition to Count.
Start evidently changes the first result number returned. So:

To get the first 50 answers:

...
&Start=1
&Count=50
...

To get the next 50:

...
&Start=51
&Count=50
...

And so forth, until you get an empty return (which is what is returned when Start > total # answers).

crazedfred
  • 133
  • 1
  • 1
  • 8
  • Thanks for reply, it works when no. of results are more, i am not getting all url's using api which are listed in site. For http://awis.amazonaws.com?&Action=CategoryListings&ResponseGroup=Listings&AWSAccessKeyId=XXXXXXXXXX&Signature=XXXXXXXXXXXXXXX8%3D&Timestamp=2011-01-31T12%3A09%3A15.754Z&Path=Top%2FHealth&Descriptions=True&Count=50 is the request i am sending but getting 0 results but in site there are 500 URL's for "Health" Category Search. If i put Start=0, i get max 6 Url's. and if i add "Recursive=True" in params it lists subcat Url's too, and i need only Category Url's – Toman Jan 31 '11 at 12:52