Stack Exchange API Usage Stats and API 2.0 Plans

by Jeff Atwood

on September 30, 2011

Stack Exchange has a very full featured, albeit currently read-only, API. You can view some of the nifty applications people have created with the Stack Exchange API in the app gallery on Stack Apps, or check out the winners of the Stack Exchange API contest we held last year.

We're currently in the planning stages for Stack Exchange API 2.0. There's a draft API 2.0 specification on Stack Apps, so head on over there and take a look if you want a voice in that process.

As a part of our research process leading up to 2.0, we analyzed usage statistics of the API to date. For the period from 8/21/2011 to 9/21/2011 inclusive, there were 34.2 million requests against the API. That's about 12 requests per second.

API usage skews heavily toward users and questions:

The top API calls, by volume, are:

/users/{ids}/timeline 7.8m
/users/{ids} 5.2m
/users/{ids}/mentioned 4.2m
/questions 3.4m
/questions/{ids} 3.0m
/users/{ids}/questions 2.9m
/questions/{ids}/answers 1.7m
/users/{ids}/reputation 1.3m
/users/{ids}/answers 1.3m
/posts/{ids}/comments 1.3m
/answers 463k

There's a precipitous drop in usage after that. It's somewhat surprising just how user centric the queries are, given how Q&A; focused Stack Exchange sites are. This suggests that user authentication to get to the tiny bit of hidden user information we have really will be a popular feature -- and that is slated for API V2.0.

Approximately 6% of API traffic is the result of internal Stack Exchange requests. Chat made approximately 1.1m requests, made about 250k requests, and careers.stackoverflow made approximately 140k requests. Only Chat actually requires the raised API request limit that we give it.

The top applications by API usage are:

[StackApplet]( 5.3m
[Newt]( 5.2m
[Stack Exchange Notifier]( 3.5m
[StackGuru]( 1.4m
[Question Monitor]( 1.3m
[Stack Overflow Chat]( 1.1m
[New Q!]( 943k
[VSCommands Lite]( 572k
[SO Live!]( 535k
[Droidstack]( 498k
[Coding Clue]( 473k

StackMobile 443k
StackTack 386k
StackMonitor 356k
StackAnywhere 291k
AskUbuntu Add-on 251k 251k
Swatch for Firefox 185k
DFeed IRC bot 180k
Area 51 142k
Careers 140k
StackTrends 128k

Roughly 59% of all API requests are from non-web applications. Of the top 20 applications, 8 are non-web applications. This is of some interest with regards to the debate around HTML encoding all output by default, to ensure it is HTML safe. This suggests that there are many opportunities for script injection, although the reach of the attack is somewhat mitigated.

API usage growth is basically flat. This is not terribly surprising, since we’re read-only until API v3.0.

Getting cache hit rates out of our logs is a bit difficult, but we’ve got an upper limit of 10% based on the numbers. I’d say we can be confident in a 3-5% cache hit rate.

We hope these statistics are interesting, if for nothing else than learning about some useful apps that work with the Stack Exchange API that you might not have heard of. You can find out more about these apps, and discover a bunch more, at Stack Apps!

Stack Apps is more than an app (and script) directory -- there's also a comprehensive set of documentation, support, and examples for the Stack Exchange API over at Stack Apps -- and the entire API is self-documented at ...

... with examples you can run directly in your browser. And naturally, it works against every Stack Exchange site exactly as you'd expect!

Thanks to everyone who has built apps against our API. We'll do our best to support you, and keep evolving the API to add more awesome for you.