{"id":28339746,"url":"https://github.com/mnlaugh/steam","last_synced_at":"2026-05-10T16:02:57.306Z","repository":{"id":57675494,"uuid":"359109013","full_name":"MNLaugh/steam","owner":"MNLaugh","description":"Deno Wrapper to communicate with Steam Web API","archived":false,"fork":false,"pushed_at":"2023-05-30T01:21:17.000Z","size":17,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-07T07:02:43.773Z","etag":null,"topics":["api","deno","steam","web"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MNLaugh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-04-18T10:16:11.000Z","updated_at":"2022-09-01T19:11:10.000Z","dependencies_parsed_at":"2025-05-27T02:14:12.969Z","dependency_job_id":"8e81ebf2-7786-4fdc-929b-a8603d34a557","html_url":"https://github.com/MNLaugh/steam","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/MNLaugh/steam","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MNLaugh%2Fsteam","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MNLaugh%2Fsteam/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MNLaugh%2Fsteam/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MNLaugh%2Fsteam/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MNLaugh","download_url":"https://codeload.github.com/MNLaugh/steam/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MNLaugh%2Fsteam/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274005320,"owners_count":25205935,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-07T02:00:09.463Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","deno","steam","web"],"created_at":"2025-05-27T02:14:10.840Z","updated_at":"2026-05-10T16:02:57.230Z","avatar_url":"https://github.com/MNLaugh.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Deno steam api\n\n  Deno Wrapper to communicate with Steam Web API\n\n## SteamID64 Finder\n\n  Please refer to [http://steamid.co/](http://steamid.co/) or [http://steamidconverter.com/](http://steamidconverter.com/) to find the user steam id.\n\n## API key\n\n  You can get your api key on [https://steamcommunity.com/dev/apikey](https://steamcommunity.com/dev/apikey)\n\n## Usage\n\n  ```ts\n  import Steam from \"https://deno.land/x/steam/mod.ts\";\n\n  const steam = new Steam(\"your api key\");\n  ```\n\n## Api\n\n- ### GetAppList\n\n  It takes an optional parameter of type Options, and returns a Promise of type App[].\n  - @param {[Options](#Options)?} - Options\n  - @returns An array of [App](#App) objects.\n\n  ```ts\n  const apps = await steam.GetAppList().catch(console.error);\n  console.log(apps);\n  /*\n  Output: \n  [\n    { appid: 2016512, name: \"\" },\n    { appid: 2025850, name: \"X Wars Deluxe - Line Effect DLC\" },\n    { appid: 2026000, name: \"Our Adventurer Guild\" },\n    { appid: 2026020, name: \"The Alchemist\" },\n    { appid: 2026030, name: \"twenty, in total\" },\n    { appid: 2026070, name: \"Tank Commander\" },\n    ...more items\n  ]\n  */\n  ```\n\n- ### GetServersAtAddress\n\n  This function returns a list of servers that are running on the specified IPaddress.\n  - @param {string!} - The IP address of the server.\n  - @param {[GetServersAtAddressOptions](#GetServersAtAddressOptions)?} - Options\n  - @returns An array of [Server](#Server).\n\n  ```ts\n  const servers = await steam.GetServersAtAddress(\"216.52.148.47\").catch(console.error);\n  console.log(servers);\n  /*\n  Output: \n  [\n    {\n      addr: \"216.52.148.47:27015\",\n      gmsindex: -1,\n      steamid: \"85568392924437989\",\n      appid: 730,\n      gamedir: \"csgo\",\n      region: 0,\n      secure: true,\n      lan: false,\n      gameport: 27015,\n      specport: 0\n    }\n  ]\n  */\n  ```\n\n- ### GetNewsForApp\n\n  This function returns an array of News, which are the news items for the specifiedappid.\n  - @param {number!} - The appid of the game you want to get news  for.\n  - @param {[GetNewsForAppOptions](#GetNewsForAppOptions)?} [options] - GetNewsForAppOptions\n  - @returns An array of [News](#News).\n\n  ```ts\n  const news = await steam.GetNewsForApp(440, { count: 1 }).catch(console.error);\n  console.log(news);\n  /*\n  Output:\n  [\n    {\n      gid: \"4474904295729829044\",\n      title: \"CS:GO fans want to change the meta by making the M4A1-S pricier\",\n      url: \"https://steamstore-a.akamaihd.net/news/externalpost/The Loadout/4474904295729829044\",\n      is_external_url: true,\n      author: \"editor@theloadout.com\",\n      contents: '\u003cimg width=\"900\" height=\"507\" src=\"https://www.theloadout.com/wp-content/uploads/2022/06/csgo-m4a1s-...',\n      feedlabel: \"The Loadout\",\n      date: 1655990548,\n      feedname: \"The Loadout\",\n      feed_type: 0,\n      appid: 730\n    }\n  ]\n  */\n  ```\n\n- ### GetGlobalAchievementPercentagesForApp\n\n  It gets the global achievement percentages for a specific game.\n  - @param {number!} - The game's appid.\n  - @param {[Options](#Options)?} - Options\n  - @returns An array of Achievement.\n\n  ```ts\n  const GlobalAchievementPercentages = await steam.GetGlobalAchievementPercentagesForApp(440).catch(console.error);\n  console.log(GlobalAchievementPercentages);\n  /*\n  Output:\n  [\n    { name: \"GIVE_DAMAGE_LOW\", percent: 67 },\n    { name: \"KILL_ENEMY_RELOADING\", percent: 66.5 },\n    { name: \"UNSTOPPABLE_FORCE\", percent: 66.19999694824219 },\n    { name: \"KILL_ENEMY_LOW\", percent: 64.69999694824219 },\n    { name: \"WIN_ROUNDS_LOW\", percent: 63.900001525878906 },\n    { name: \"IMMOVABLE_OBJECT\", percent: 62 },\n    { name: \"EARN_MONEY_LOW\", percent: 61.400001525878906 },\n    { name: \"KILL_SNIPER_WITH_SNIPER\", percent: 60.5 },\n    ... 67 more items\n  ]\n  */\n  ```\n\n- ### GetPlayerSummaries\n\n  GetPlayerSummaries returns a list of player summaries for the given steamids.\n\n  - @param {string[] | string!} - Steam ID or array of steam ID's\n  - @param {[Options](#Options)?} - Options\n  - @returns a promise that resolves to an array of [Player](#Player) objects or a single Player object.\n\n  ```ts\n  const player = await steam.GetPlayerSummaries(\"steam ID\").catc(console.error);\n  console.log(player);\n  /*\n  Output:\n  {\n    steamid: \"steam ID\",\n    communityvisibilitystate: 3,\n    profilestate: 1,\n    personaname: \"Name\",\n    ...\n  }\n  */\n  ```\n\n  ```ts\n  const players = await steam.GetPlayerSummaries([\"steam ID1\", \"steam ID2\"]).catc(console.error);\n  console.log(players);\n  /*\n  Output:\n  [\n    {\n      steamid: \"steam ID1\",\n      communityvisibilitystate: 3,\n      profilestate: 1,\n      personaname: \"Name1\",\n      ...\n    },\n    {\n      steamid: \"steam ID2\",\n      communityvisibilitystate: 3,\n      profilestate: 1,\n      personaname: \"Name2\",\n      ...\n    }\n  ]\n  */\n  ```\n\n- ### GetFriends\n\n  It takes a steamid, a relationship, and an optional options object, and returns a promise that resolves to an array of Friend.\n\n  - @param {string!} - The SteamID of the user you want to get the friend list of.\n  - @param {[RelationShip](#RelationShip)!} - RelationShip\n  - @param {[Options](#Options)?} - Options\n  - @returns An array of [Friend](#Friend).\n\n    ```ts\n    const friends = await steam.GetFriendList(\"steam ID\", \"all\" }).catch(console.error);\n    console.log(friends);\n    /*\n    Output:\n    [\n      { steamid: \"steam ID\", relationship: \"friend\", friend_since: 1562700502 },\n      ... more items\n    ]\n    */\n    ```\n\n- ### GetPlayerAchievements\n\n  This function returns an array of PlayerAchievement objects, which contain the achievement name, achievement description, and whether or not the player has unlocked the achievement.\n\n  - @param {string!} - The SteamID of the user you want to get the achievements for.\n  - @param {number!} - The appid of the game you want to get the achievements for.\n  - @param {[PlayerAchievementsOptions](#PlayerAchievementsOptions)?} - PlayerAchievementsOptions\n  - @returns An array of [PlayerAchievement](#PlayerAchievement).\n\n    ```ts\n    const PlayerAchievements = await steam.GetPlayerAchievements(\"steam ID\", 730).catch(console.error);\n    console.log(PlayerAchievements);\n    /*\n    Output:\n    [\n      { apiname: \"WIN_BOMB_PLANT\", achieved: 1, unlocktime: 1390843147 },\n      { apiname: \"BOMB_PLANT_LOW\", achieved: 1, unlocktime: 1412790573 },\n      { apiname: \"WIN_MAP_DE_SHORTTRAIN\", achieved: 1, unlocktime: 1405868543 },\n      { apiname: \"KILL_WHILE_IN_AIR\", achieved: 1, unlocktime: 1355877421 },\n      { apiname: \"KILL_ENEMY_IN_AIR\", achieved: 1, unlocktime: 1357241363 },\n      { apiname: \"KILLER_AND_ENEMY_IN_AIR\", achieved: 0, unlocktime: 0 },\n      ... 67 more items\n    ]\n    */\n    ```\n\n- ### GetUserStatsForGame\n\n  GetUserStatsForGame() is a function that takes in a steamid and an appid and returns a [PlayerStats](###PlayerStat).\n\n  - @param {string} steamid - The SteamID of the user.\n  - @param {number} appid - The appid of the game you want to get the stats for.\n  - @param {[UserStatsForGameOptions](###UserStatsForGameOptions)} [options] - UserStatsForGameOptions\n  - @returns The response is a JSON object that contains a [PlayerStats](###PlayerStat).\n\n    ```ts\n    const UserStats = await steam.GetUserStatsForGame(\"steam ID\", 730).catch(console.error);\n    console.log(UserStats);\n    /*\n    Output:\n    {\n      steamID: \"Steam ID\",\n      gameName: \"Game Name\",\n      stats: [\n        { name: \"total_kills\", value: 60158 },\n        { name: \"total_deaths\", value: 61406 },\n        { name: \"total_time_played\", value: 4902023 },\n        ... more items\n      ],\n      achievements: [\n        { name: \"WIN_BOMB_PLANT\", achieved: 1 },\n        { name: \"BOMB_PLANT_LOW\", achieved: 1 },\n        ... more items\n      ]\n    }\n    */\n    ```\n\n- ### GetNumberOfCurrentPlayers\n\n   This function returns the number of players currently playing the game with the specified appid.\n\n  - @param {number} appid - number - The appid of the game you want to get the number of current\n  - players for.\n  - @param {[Options](#Options)} - Options\n  - @returns The number of players currently playing the game.\n\n    ```ts\n    const NumberOfCurrentPlayers = await steam.GetNumberOfCurrentPlayers(730).catch(console.error);\n    console.log(NumberOfCurrentPlayers);\n    /*\n    Output:\n    453905\n    */\n    ```\n\n- ### GetOwnedGames\n\n  This function takes a steamid and an optional [OwnedGamesOptions](#OwnedGamesOptions) object and returns a promise that resolves to an [OwnedGames](#OwnedGames) object.\n\n  - @param {string} - string - The SteamID of the user to retrieve the owned games for.\n  - @param {[OwnedGamesOptions](#OwnedGamesOptions)} - OwnedGamesOptions\n  - @returns The response is a [OwnedGames](#OwnedGames).\n\n    ```ts\n    const Games = await steam.GetOwnedGames(\"steam ID\").catch(console.error);\n    console.log(Games);\n    /*\n    Output:\n    {\n      game_count: 1,\n      games: [\n        {\n          appid: 10,\n          playtime_forever: 39,\n          playtime_windows_forever: 0,\n          playtime_mac_forever: 0,\n          playtime_linux_forever: 0\n        }\n      ]\n    }\n    */\n    ```\n\n- ### GetRecentlyPlayedGames\n\n  It takes a steamid and an optional object of options and returns a promise of a [RecentlyPlayedGames](#RecentlyPlayedGames) object.\n  \n  - @param {string} - The SteamID of the user to get recently played games for.\n  - @param {[RecentlyPlayedGamesOptions](#RecentlyPlayedGamesOptions)} - RecentlyPlayedGamesOptions\n  - @returns An object [RecentlyPlayedGames](#RecentlyPlayedGames)\n\n    ```ts\n    const Games = await steam.GetRecentlyPlayedGames(\"steam ID\").catch(console.error);\n    console.log(Games);\n    /*\n    Output:\n    {\n      total_count: 1,\n      games: [\n        {\n          appid: game ID,\n          name: \"Game name\",\n          playtime_2weeks: 875,\n          playtime_forever: 135059,\n          img_icon_url: \"9ad6dd3d173523355438595g5sb5fb2af87639c4163\",\n          playtime_windows_forever: 60292,\n          playtime_mac_forever: 0,\n          playtime_linux_forever: 49\n        }\n      ]\n    }\n    */\n    ```\n\n## TypeDef Options\n\n- ### BaseOptions\n\n  ```ts\n  {\n    key?: string; // Steam API Key\n    /**\n     * init for fetch @see https://developer.mozilla.org/en-US/docs/Web/API/fetch#init */\n    requestInit?: RequestInit;\n  }\n  ```\n\n- ### RelationShip\n\n  ```ts\n  \"all\" | \"friend\"\n  ```\n\n- ### GetServersAtAddressOptions\n\n  ```ts\n  BaseOptions \u0026 {\n    gmsindex?: number;  // Gives the gmsindex.\n    appid?: number;     // Gives the steam game appid.\n    gamedir?: string;   // Tells which directory the game is from.\n    region?: number;    // Gives the region of the server.\n    secure?: boolean;   // Boolean, if server is secure or not.\n    lan?: boolean;      // Boolean, if server is a lan game.\n    gameport?: number;  // Gives the port number for the server.\n    specport?: number;  // Gives the specport.\n  }\n  ```\n\n- ### GetNewsForAppOptions\n\n  ```ts\n  BaseOptions \u0026 {\n    count?: number;     // How many news enties you want to get returned.\n    maxlength?: number; // Maximum length of each news entry.\n  }\n  ```\n\n- ### PlayerAchievementsOptions\n\n  ```ts\n  BaseOptions \u0026 {\n    L?: string; // Language. If specified, it will return language data for the requested language.\n  }\n  ```\n\n- ### UserStatsForGameOptions\n\n  Same as [PlayerAchievementsOptions](#PlayerAchievementsOptions)\n\n- ### OwnedGamesOptions\n\n  ```ts\n  BaseOptions \u0026 {\n    include_appinfo?: boolean;\n    include_played_free_games?: boolean;\n    appids_filter?: number[];\n  }\n  ```\n\n- ### RecentlyPlayedGamesOptions\n\n  ```ts\n  BaseOptions \u0026 {\n    count?: number;\n  }\n  ```\n\n- ### Options\n\n  depends on:\n  - [GetServersAtAddressOptions](#GetServersAtAddressOptions)\n  - [GetNewsForAppOptions](#GetNewsForAppOptions)\n  - [UserStatsForGameOptions](#UserStatsForGameOptions)\n  - [OwnedGamesOptions](#OwnedGamesOptions)\n  - [RecentlyPlayedGamesOptions](#RecentlyPlayedGamesOptions)\n  - [RelationShip](#RelationShip)\n\n  ```ts\n  GetServersAtAddressOptions \u0026 GetNewsForAppOptions \u0026 UserStatsForGameOptions \u0026 OwnedGamesOptions \u0026 RecentlyPlayedGamesOptions \u0026 {\n    addr?: string;\n    appid?: number;\n    gameid?: number;\n    steamids?: string[];\n    steamid?: string;\n    relationship?: RelationShip;\n    lang?: string;\n  }\n  ```\n\n## TypeDef Result\n\n- ### App\n\n  ```ts\n  {\n    appid: number;\n    name: string;\n  }\n  ```\n\n- ### Server\n\n  ```ts\n  {\n    addr: string;\n    gmsindex: number;\n    steamid: string\n    appid: number;\n    gamedir: string;\n    region: number;\n    secure: boolean;\n    lan: boolean;\n    gameport: number;\n    specport: number;\n  }\n  ```\n\n- ### News\n\n  ```ts\n  {\n    gid: string;\n    title: string;\n    url: string;\n    is_external_url: boolean;\n    author: string;\n    contents: string;\n    feedlabel: string;\n    date: number;\n    feedname: string;\n    feed_type: number;\n    appid: number;\n  }\n  ```\n\n- ### Achievement\n\n  ```ts\n  {\n    name: string;\n    percent: number;\n  }\n  ```\n\n- ### Player\n\n  ```ts\n  {\n    steamid: string;\n    communityvisibilitystate: number;\n    profilestate: number;\n    personaname: string;\n    profileurl: string;\n    avatar: string;\n    avatarmedium: string;\n    avatarfull: string;\n    avatarhash: string;\n    lastlogoff: number;\n    personastate: 1;\n    realname: string;\n    primaryclanid: string;\n    timecreated: number;\n    personastateflags: 0;\n    loccountrycode: string;\n  }\n  ```\n\n- ### Friend\n\n  ```ts\n  {\n    steamid: string;\n    relationship: string;\n    friend_since: number;\n  }\n  ```\n\n- ### PlayerAchievement\n\n  ```ts\n  {\n    apiname: string;\n    achieved: number;\n    unlocktime: number;\n  }\n  ```\n\n- ### Stat\n\n  ```ts\n  {\n    name: string;\n    value: number;\n  }\n  ```\n\n- ### PlayerStat\n\n  depends on [Stat](#Stat)\n\n  ```ts\n  {\n    steamID: string;\n    gameName: string;\n    stats: Stat[];\n    achievements: {\n      name: string;\n      achieved: number;\n    };\n  }\n  ```\n\n- ### OwnedGame\n\n  ```ts\n  {\n    appid: number;\n    playtime_forever: number;\n    playtime_windows_forever: number;\n    playtime_mac_forever: number;\n    playtime_linux_forever: number;\n  }\n  ```\n\n- ### OwnedGames\n\n  depends on [OwnedGame](#OwnedGame)\n\n  ```ts\n  {\n    game_count: number;\n    game: OwnedGame[];\n  }\n  ```\n\n- ### RecentlyPlayedGame\n\n  ```ts\n  {\n    appid: number;\n    name: string;\n    playtime_2weeks: number;\n    playtime_forever: number;\n    img_icon_url: string;\n    playtime_windows_forever: number;\n    playtime_mac_forever: number;\n    playtime_linux_forever: number;\n  }\n  ```\n\n- ### RecentlyPlayedGames\n\n  depends on [RecentlyPlayedGame](#RecentlyPlayedGame)\n\n  ```ts\n  {\n    total_count: number;\n    games: RecentlyPlayedGame[];\n  }\n  ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmnlaugh%2Fsteam","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmnlaugh%2Fsteam","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmnlaugh%2Fsteam/lists"}