Package Exports
- steamstoreapi
- steamstoreapi/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (steamstoreapi) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Steam Store API
This NPM module is a API wrapper that makes the steam unofficial API easier to use.
Installation
Install steamstoreapi with npm
npm install steamstoreapi
API Reference
Search Steam
steamstoreapi.search(options, callback);
options Parameters:
Parameter | Type | Description |
---|---|---|
search |
string |
Required. Search Query |
language |
string |
Language you want the results in: english , french , spanish , etc (Default english ) |
country |
string |
Country you want to search from. Example: US , CA , CH , etc. (Default US ) |
Example:
var options = {
search: "csgo",
country: "FR", //optional (Default 'US')
language: "french", //optional (Default 'english')
};
steamstoreapi.search(options, function (data) {
if (!data.success) {
console.log(data);
} else {
console.log(data);
}
});
Get game details by App ID
steamstoreapi.getGameInfo(options, callback);
options Parameters:
Parameter | Type | Description |
---|---|---|
appid |
number |
Required. Game App ID |
language |
string |
Language you want the results in: english , french , spanish , etc (Default english ) |
country |
string |
Country you want to search from. Example: US , CA , CH , etc. (Default US ) |
Example:
var options = {
appid: 730,
country: "FR", //optional (Default 'US')
language: "french", //optional (Default 'english')
};
steamstoreapi.getGameInfo(options, function (data) {
console.log(data);
});
Get game images
steamstoreapi.getImages(appid);
options Parameters:
Parameter | Type | Description |
---|---|---|
appid |
number |
Required. Game App ID |
Example:
console.log(steamstoreapi.getImages(730));
Usage/Examples
Get game details by search:
const steamstoreapi = require("steamstoreapi");
steamstoreapi.search(
{
search: "csgo",
type: "games",
},
function (data) {
if (!data.success) {
console.log(data);
} else {
steamstoreapi.getGameInfo(
{
appid: data.games[0].appid,
},
function (data) {
console.log(data);
}
);
}
}
);
Get games by search:
const steamstoreapi = require("steamstoreapi");
steamstoreapi.search(
{
search: "csgo",
type: "games",
},
function (data) {
if (!data.success) {
console.log(data);
} else {
console.log(data);
}
}
);
Get games by App ID:
const steamstoreapi = require("steamstoreapi");
steamstoreapi.getGameInfo(
{
appid: `730`,
},
function (data) {
console.log(data);
}
);
Roadmap
Add more parameters to search (software type, price filters, category, etc)
Better error handling
Feedback
If you have any feedback, please reach out to us at zakaryloney@gmail.com