Take the 2-minute tour ×
Stack Apps is a question and answer site for apps, scripts, and development with the Stack Exchange API. It's 100% free, no registration required.

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

1 Answer 1

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. –  flyingflamingo 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 –  flyingflamingo 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 .