I want to know how many Stack Exchange sites there are.
Querying http://api.stackexchange.com/2.2/sites, using a filter that makes total appear, I find that the value is always zero.

For example,


{ "total": 0 }

Is that the intended behavior?

  • BTW, I did find the workaround -- pagesize is unbounded for sites so I just did a request with pagesize=5000 and counted the number of items returned which is 340 at the moment. – foobarbecue Oct 29 '17 at 4:15
  • Confirmed. That's a bug. – Brock Adams Oct 29 '17 at 4:59
  • Thanks for confirming, and for edits. It's a little odd, though, how the new title for this ends in a question mark despite not being phrased as a question? ;-) – foobarbecue Oct 29 '17 at 5:16
  • BTW, that's not 340 sites. It's 170 sites, plus their metas (with 2 exceptions and not counting Area 51). – Brock Adams Oct 29 '17 at 6:43

You must log in to answer this question.

Browse other questions tagged .