4

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,
          http://api.stackexchange.com/2.2/sites?filter=!6P-i5S514Gfnl

Responds:

{ "total": 0 }

Is that the intended behavior?

4
  • 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. Commented Oct 29, 2017 at 4:15
  • Confirmed. That's a bug. Commented Oct 29, 2017 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? ;-) Commented Oct 29, 2017 at 5:16
  • BTW, that's not 340 sites. It's 170 sites, plus their metas (with 2 exceptions and not counting Area 51). Commented Oct 29, 2017 at 6:43

0

You must log in to answer this question.

Browse other questions tagged .