Skip to main content
edited body
Source Link
Brock Adams
  • 13k
  • 5
  • 39
  • 64

The question was not originally clear if you wanted tags or badges, but the answer is the same...

To just get totals, use the total filter.
For example, for badges: /badges?site=stackoverflow&filter=total, which currently returns:

{"total":6363}

For tags: /tags?site=stackoverflow&filter=total, which currently returns:

{"total":48667}

###WARNING: In practice, the total filter is dangerous, because it masks errors, warnings and backoff intervals.
So, in practice use !w-*Ytm8YGWVl9..xoC instaedinstead of total, per: My filter is not returning any results. How to create a minimal filter?.


If you want both the badges/tags and the total, you can set a custom filter, or just count the members of the items array as you page through them. The latter option is less expensive in the API and thus less likely to get you backoff warnings.

Note that you can set the pagesize up to 100. See the doc page for tags, for example.



IMPORTANT: The Tags page also shows synonyms and also a great many tags that have zero questions.
The API /tags route , however, returns neither of these, as best as I can tell. (3 or 4 very recently orphaned tags being the exception). So the totals will not match up.


EG, currently Stack Apps only has 7 synonyms. Confirmed that none of those show in the /tags route, but all show on the Tags pages. Likewise, the only zero count tag in the API is currently the featured tag, which is moderator only.

The question was not originally clear if you wanted tags or badges, but the answer is the same...

To just get totals, use the total filter.
For example, for badges: /badges?site=stackoverflow&filter=total, which currently returns:

{"total":6363}

For tags: /tags?site=stackoverflow&filter=total, which currently returns:

{"total":48667}

###WARNING: In practice, the total filter is dangerous, because it masks errors, warnings and backoff intervals.
So, in practice use !w-*Ytm8YGWVl9..xoC instaed of total, per: My filter is not returning any results. How to create a minimal filter?.


If you want both the badges/tags and the total, you can set a custom filter, or just count the members of the items array as you page through them. The latter option is less expensive in the API and thus less likely to get you backoff warnings.

Note that you can set the pagesize up to 100. See the doc page for tags, for example.



IMPORTANT: The Tags page also shows synonyms and also a great many tags that have zero questions.
The API /tags route , however, returns neither of these, as best as I can tell. (3 or 4 very recently orphaned tags being the exception). So the totals will not match up.


EG, currently Stack Apps only has 7 synonyms. Confirmed that none of those show in the /tags route, but all show on the Tags pages. Likewise, the only zero count tag in the API is currently the featured tag, which is moderator only.

The question was not originally clear if you wanted tags or badges, but the answer is the same...

To just get totals, use the total filter.
For example, for badges: /badges?site=stackoverflow&filter=total, which currently returns:

{"total":6363}

For tags: /tags?site=stackoverflow&filter=total, which currently returns:

{"total":48667}

###WARNING: In practice, the total filter is dangerous, because it masks errors, warnings and backoff intervals.
So, in practice use !w-*Ytm8YGWVl9..xoC instead of total, per: My filter is not returning any results. How to create a minimal filter?.


If you want both the badges/tags and the total, you can set a custom filter, or just count the members of the items array as you page through them. The latter option is less expensive in the API and thus less likely to get you backoff warnings.

Note that you can set the pagesize up to 100. See the doc page for tags, for example.



IMPORTANT: The Tags page also shows synonyms and also a great many tags that have zero questions.
The API /tags route , however, returns neither of these, as best as I can tell. (3 or 4 very recently orphaned tags being the exception). So the totals will not match up.


EG, currently Stack Apps only has 7 synonyms. Confirmed that none of those show in the /tags route, but all show on the Tags pages. Likewise, the only zero count tag in the API is currently the featured tag, which is moderator only.

added 299 characters in body
Source Link
Brock Adams
  • 13k
  • 5
  • 39
  • 64

The question was not originally clear if you wanted tags or badges, but the answer is the same...

To just get totals, use the total filter.
For example, for badges: /badges?site=stackoverflow&filter=total, which currently returns:

{"total":6363}

For tags: /tags?site=stackoverflow&filter=total, which currently returns:

{"total":48667}

###WARNING: In practice, the total filter is dangerous, because it masks errors, warnings and backoff intervals.
So, in practice use !w-*Ytm8YGWVl9..xoC instaed of total, per: My filter is not returning any results. How to create a minimal filter?.


If you want both the badges/tags and the total, you can set a custom filter, or just count the members of the items array as you page through them. The latter option is less expensive in the API and thus less likely to get you backoff warnings.

Note that you can set the pagesize up to 100. See the doc page for tags, for example.



IMPORTANT: The Tags page also shows synonyms and also a great many tags that have zero questions.
The API /tags route , however, returns neither of these, as best as I can tell. (3 or 4 very recently orphaned tags being the exception). So the totals will not match up.


EG, currently Stack Apps only has 7 synonyms. Confirmed that none of those show in the /tags route, but all show on the Tags pages. Likewise, the only zero count tag in the API is currently the featured tag, which is moderator only.

The question was not originally clear if you wanted tags or badges, but the answer is the same...

To just get totals, use the total filter.
For example, for badges: /badges?site=stackoverflow&filter=total, which currently returns:

{"total":6363}

For tags: /tags?site=stackoverflow&filter=total, which currently returns:

{"total":48667}

If you want both the badges/tags and the total, you can set a custom filter, or just count the members of the items array as you page through them. The latter option is less expensive in the API and thus less likely to get you backoff warnings.

Note that you can set the pagesize up to 100. See the doc page for tags, for example.



IMPORTANT: The Tags page also shows synonyms and also a great many tags that have zero questions.
The API /tags route , however, returns neither of these, as best as I can tell. (3 or 4 very recently orphaned tags being the exception). So the totals will not match up.


EG, currently Stack Apps only has 7 synonyms. Confirmed that none of those show in the /tags route, but all show on the Tags pages. Likewise, the only zero count tag in the API is currently the featured tag, which is moderator only.

The question was not originally clear if you wanted tags or badges, but the answer is the same...

To just get totals, use the total filter.
For example, for badges: /badges?site=stackoverflow&filter=total, which currently returns:

{"total":6363}

For tags: /tags?site=stackoverflow&filter=total, which currently returns:

{"total":48667}

###WARNING: In practice, the total filter is dangerous, because it masks errors, warnings and backoff intervals.
So, in practice use !w-*Ytm8YGWVl9..xoC instaed of total, per: My filter is not returning any results. How to create a minimal filter?.


If you want both the badges/tags and the total, you can set a custom filter, or just count the members of the items array as you page through them. The latter option is less expensive in the API and thus less likely to get you backoff warnings.

Note that you can set the pagesize up to 100. See the doc page for tags, for example.



IMPORTANT: The Tags page also shows synonyms and also a great many tags that have zero questions.
The API /tags route , however, returns neither of these, as best as I can tell. (3 or 4 very recently orphaned tags being the exception). So the totals will not match up.


EG, currently Stack Apps only has 7 synonyms. Confirmed that none of those show in the /tags route, but all show on the Tags pages. Likewise, the only zero count tag in the API is currently the featured tag, which is moderator only.

replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link

The question was not originally clear if you wanted tagstags or badgesbadges, but the answer is the same...

To just get totals, use the total filter.
For example, for badges: /badges?site=stackoverflow&filter=total, which currently returns:

{"total":6363}

For tags: /tags?site=stackoverflow&filter=total, which currently returns:

{"total":48667}

If you want both the badges/tags and the total, you can set a custom filter, or just count the members of the items array as you page through them. The latter option is less expensive in the API and thus less likely to get you backoff warnings.

Note that you can set the pagesize up to 100. See the doc page for tags, for example.



IMPORTANT: The Tags pageThe Tags page also shows synonyms and also a great many tags that have zero questions.
The API /tags route , however, returns neither of these, as best as I can tell. (3 or 4 very recently orphaned tags being the exception). So the totals will not match up.


EG, currently Stack Apps only has 7 synonyms. Confirmed that none of those show in the /tags route, but all show on the Tags pages. Likewise, the only zero count tag in the API is currently the featured tag, which is moderator only.

The question was not originally clear if you wanted tags or badges, but the answer is the same...

To just get totals, use the total filter.
For example, for badges: /badges?site=stackoverflow&filter=total, which currently returns:

{"total":6363}

For tags: /tags?site=stackoverflow&filter=total, which currently returns:

{"total":48667}

If you want both the badges/tags and the total, you can set a custom filter, or just count the members of the items array as you page through them. The latter option is less expensive in the API and thus less likely to get you backoff warnings.

Note that you can set the pagesize up to 100. See the doc page for tags, for example.



IMPORTANT: The Tags page also shows synonyms and also a great many tags that have zero questions.
The API /tags route , however, returns neither of these, as best as I can tell. (3 or 4 very recently orphaned tags being the exception). So the totals will not match up.


EG, currently Stack Apps only has 7 synonyms. Confirmed that none of those show in the /tags route, but all show on the Tags pages. Likewise, the only zero count tag in the API is currently the featured tag, which is moderator only.

The question was not originally clear if you wanted tags or badges, but the answer is the same...

To just get totals, use the total filter.
For example, for badges: /badges?site=stackoverflow&filter=total, which currently returns:

{"total":6363}

For tags: /tags?site=stackoverflow&filter=total, which currently returns:

{"total":48667}

If you want both the badges/tags and the total, you can set a custom filter, or just count the members of the items array as you page through them. The latter option is less expensive in the API and thus less likely to get you backoff warnings.

Note that you can set the pagesize up to 100. See the doc page for tags, for example.



IMPORTANT: The Tags page also shows synonyms and also a great many tags that have zero questions.
The API /tags route , however, returns neither of these, as best as I can tell. (3 or 4 very recently orphaned tags being the exception). So the totals will not match up.


EG, currently Stack Apps only has 7 synonyms. Confirmed that none of those show in the /tags route, but all show on the Tags pages. Likewise, the only zero count tag in the API is currently the featured tag, which is moderator only.

replaced http://stackapps.com/ with https://stackapps.com/
Source Link
Loading
deleted 8 characters in body
Source Link
Brock Adams
  • 13k
  • 5
  • 39
  • 64
Loading
added 651 characters in body
Source Link
Brock Adams
  • 13k
  • 5
  • 39
  • 64
Loading
added 1 character in body
Source Link
Brock Adams
  • 13k
  • 5
  • 39
  • 64
Loading
added 1 character in body
Source Link
Brock Adams
  • 13k
  • 5
  • 39
  • 64
Loading
added 408 characters in body
Source Link
Brock Adams
  • 13k
  • 5
  • 39
  • 64
Loading
Source Link
Brock Adams
  • 13k
  • 5
  • 39
  • 64
Loading