0

We are trying to get the owned games of a lot of users but our problem is that after a while the API call limit (100.000 a day) kicks in and we stop getting results.

We use 'IPlayerService/GetOwnedGames/v0001/?key=APIKEY&steamid=STEAMID' in our call and it works for the first entries.

There are several other queries like the GetPlayerSummaries query which take multiple Steam IDs, but according to the documentation, this one only takes one.

Is there any other way to combine/ merge our queries? We are using Python and the urllib.request library to create the request.

gmds
  • 19,325
  • 4
  • 32
  • 58
creyD
  • 1,972
  • 3
  • 26
  • 55

2 Answers2

0

Depending on the payload of the requests you have the following possibilities:

  • if each request brings only the newest updates, you could serialize the steam ID's when you get the response that you've hit the daily limit
  • if you have the ability to control via the request payload what data you receive, you could go for a multithreaded / multiprocessing approach that consume the request queries and the steam ID's from a couple of shared resources
andreihondrari
  • 5,743
  • 5
  • 30
  • 59
  • Serialize? You mean like store the ones it couldn't make? We already do that but the problem is that there are a lot of steam IDs we want to handle and we would have to do this process for weeks before we got everything. – creyD Apr 03 '19 at 22:20
  • The second suggestion also doesn't help with the problem as it's a API limitation and not really a computing limitation... If we do the calls from 20 threads then it will still do exactly 100.000 calls and then just stop getting answers. – creyD Apr 03 '19 at 22:22
  • @creyD, regarding #2, not exactly, because what I was trying to say is that each thread/process should use a different steamID – andreihondrari Apr 03 '19 at 22:23
  • What you mean are API keys? The only problem is that this only works if you have a pool of like 100 API keys and that is just not possible for us as you would need to create a steam account for each key. – creyD Apr 03 '19 at 22:25
  • @creyD, ah yes my bad, I meant API key's. Well, if you can't get any more API key's I'm not sure it's possible. Valve's T&C is pretty strict on the number of calls per day. They do mention that you could increase the limit by Valve's permission, if you ***adhere to the current T&C*** ..whatever that means. – andreihondrari Apr 03 '19 at 22:33
  • Okay, but what did you mean with your first approach? – creyD Apr 03 '19 at 22:58
  • @creyD, oh in my first approach I was still thinking in terms of multiple API keys that you could use one after another. – andreihondrari Apr 03 '19 at 23:00
0

As @andreihondrari indirectly stated in his comment under his answer, one can request to get an API key which can get more then the 100.000 calls/ day. This is stated under part "License to Steam Web API & Steam Data" of the documentation:

You are limited to one hundred thousand (100,000) calls to the Steam Web API per day. Valve may approve higher daily call limits if you adhere to these API Terms of Use.

This may be complicated and there is of cause the possibility that you wont get approved, but this is pretty much the only stable way you can go.


Furthermore you could theoretically use multiple Steam Web API keys, BUT:
  • Each API key still has the limitation of 100.000 calls/day so you'll need to implement a fail safe and a transition between used keys and possibly need to create lots of accounts.
  • As each user has his own specific friendlist and blocked list the API key can "see" a portion of the Steam Community exclusively (friends data is not public otherwise). So it could be that you are using one API key which can't "see" a certain user when you could've used another to "see" it properly.
  • You'll need a unique email adress for each created account.

Note: Having multiple accounts actually complies with Valves ToS according to this post on Arqade.

creyD
  • 1,972
  • 3
  • 26
  • 55