如何在 Steam WebAPI 中通过 AppName 获取 Steam AppID [英] How to get the steam AppID by AppName in Steam WebAPI
问题描述
所以我试图通过输入游戏名称来启动 Steam 游戏.为此我问自己是否可以通过输入的名称找出steam AppID.
So i'm trying to start a steamgame by entering the name of the game. For this reason I asked myself if it is possible to figure out the steam AppID through the entered name.
所以我尝试通过我的 steamApps 文件夹收集 ID,但没有成功.我还找到了一个网站,您可以在其中搜索特定游戏的名称.
So I tried to collect the IDs through my steamApps folder without success. I also found a website where you could search for the name of a specific game.
例如https://www.steamgriddb.com/api/v2/search/autocomplete/grandtheftautov" 返回一个带有 gtaIV 和 gtaV 的 json
For example "https://www.steamgriddb.com/api/v2/search/autocomplete/grandtheftautov" returns a json with gtaIV and gtaV
问题在于,在检索到的数据中找不到 stamAppID.
The Problem with that is, that the stamAppID isn't found in the retrieved data.
我还发现了一个 SQL 数据库(https://steam.internet.byu.edu/) 在其中找到 Steam 名称和 appID.但这不是我的首选方式,因为数据库有 17GB 大.
Also I found an SQL Database (https://steam.internet.byu.edu/) where the steam name and the appID are found. But this wouldn't be my prefered way to go, because the database is 17gb big.
推荐答案
您使用此 API 调用:https://api.steampowered.com/ISteamApps/GetAppList/v2/
You use this API call: https://api.steampowered.com/ISteamApps/GetAppList/v2/
{
"applist": {
"apps": [
{
"appid": 946180,
"name": "The Gardens Between Soundtrack"
},
{
"appid": 946190,
"name": "Loveless cat"
},
...
更多信息此处.名单很大.用可以处理大文件的编辑器打开它.您可以按名称搜索 JSON.
More info here. The list is huge. Open it with a editor that can handle a huge file. You can search the JSON by name.
这篇关于如何在 Steam WebAPI 中通过 AppName 获取 Steam AppID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!