3

I think it would be very helpful if there was a way to get statistics about your own API keys.

That way, you could find out which IP addresses were using your app the most. (And if one was abusing it, you would at least know where the problem is.)

The way it stands now, there is no way to find out who is using your app's key.


Update: Before anyone gets carried away here, I want to point out that this is not a dupe. This question is not asking whether I can check the number of requests made using my key. I know how to do that. I'm asking how I can determine the number of users using my key - and how much they use it.

3
  • 1
    Why would you need to know that?
    – ColinD
    May 23, 2010 at 1:29
  • In case a user is abusing the app that uses the key. May 23, 2010 at 1:31
  • 1
    I think the per-IP-and-key limit to API requests is there to prevent (extreme) abuse as it is, and it seems like it'd be an issue for the StackExchange team more than you if the user were somehow causing an issue despite that.
    – ColinD
    May 23, 2010 at 1:42

2 Answers 2

1

As any API out there, SE API does need some kind of analytics support. I suspect the SO team has plans for something like this, though I haven't seen anything hinted at yet.

Here are some of the data points I'd like to see:

  • median number of unique IPs per day.
  • total number of unique IPs for a specific time period.
  • average number of API requests per day per unique IP for a specific time period.
  • number of API requests for the top N unique IPs per day for a specific time period.
  • % of unique IPs that hit the API limit (though ideally that one should be 0 :-))

As for data about individual IPs - that has some privacy implications and as an end user, I'd personally prefer if SO does not expose this information to the applications.


Edit: Upon rereading the question, I realized that indeed that's not what @George is asking about. (Even without his update. :-)) However, I'll leave my original answer below to collect dust and downvotes, so that others don't make same mistake like me and lose precious rep.

Short version - you can see that information in the response HTTP headers:

X-RateLimit-Current:298
X-RateLimit-Max:300

More info in the answer of Is there a way of querying how much of the API limit has been used?.

0
0

I am afraid, I think you need to handle that in your app itself. They probably don't want to expose those IP addresses used by API.

I first, thought that API key limit is per IP Address, but looks like its not, even I try my API Key with different IP, limit is decreasing.

For No key, its based on IP Address, so if your application is desktop client, you might don't want to embed it for now.

And if your app is web service like mobile site, you might want to manage IP address handling yourself in the web server.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .