Stack Apps is a question and answer site for apps, scripts, and development with the Stack Exchange API. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have the following query, which is identical to the example they give in the documentation:

This (should) return all of the questions with that tag....but for some reason, in the JSON data, I only get the first 30. Is there a reason for this? Since I'm not explicitly specifying page size?

share|improve this question
up vote 4 down vote accepted

The API allows you to set a pagesize of 0 to 100 (with the exception of the /sites route, which allows larger values), and defaults to a maximum of 30 items in the response.

To get all of the items applicable to the API query, you need to check the has_more field to determine if you need to request subsequent pages via the page parameter. This is covered in more detail in the API documentation's section on paging.

share|improve this answer
I actually should have listed this in my original question, but I passed has_more=true inside the query string..and still got the same results. Maybe I need to do it via a filter instead. – am5255 Feb 9 '14 at 18:11
has_more is returned in the response, it indicates you need to make another call with page=n to get more results. The most you'll get back with a single request is 100, assuming you set the pagesize to that. – Tim Stone Feb 9 '14 at 21:39
Oooh, okay. Got it. That makes sense. I originally thought it was a wrapper variable the requestor gives. Thanks – am5255 Feb 10 '14 at 14:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .