API Reference / Steam accounts
Count Steam accounts
Returns the number of Steam accounts in your workspace per session status, optionally filtered to soft-deleted accounts instead of active ones, so a list page can render its total and online-session counts without loading and counting every row.
/ steam. v1. Steam/ CountAccountsRequest body
application/jsonRequired
Request for the number of Steam accounts in the caller's workspace per session status, using the same filter as ListAccounts.
filter?AccountFilterThe same filter as ListAccounts. Counts group by session status, so only the list's statuses restriction is omitted.
Show attributes
accountNames?AccountNameSetOnly accounts with one of these exact names, so a list another service narrows (such as the accounts in one market connection state) can be listed and counted. A set with no names matches no account. Unset does not restrict. At most 1000 names.
Show attributes
names?array<string>The account names.
banSeverities?array<string>Ban severity set, OR within the field. With session_statuses and the list's statuses it forms one Status choice, so an account matches when its session status or its ban severity is chosen. The other fields AND. Empty includes every severity.
Value in"ACCOUNT_"ACCOUNT_"ACCOUNT_
banSeverityFilter?array<string>Ban severity set, OR within the field, that ANDs with every other field (the Bans filter of the account list). Unlike ban_severities it does not join the session statuses in one Status choice. Empty does not restrict.
Value in"ACCOUNT_"ACCOUNT_"ACCOUNT_
deleted?booleanTrue selects only soft-deleted accounts (the Deleted filter). False selects only active accounts. Omitted includes both, so a caller that wants the active set sends false.
excludedAccountNames?AccountNameSetEvery account but those with one of these exact names. Unset or a set with no names excludes none. At most 1000 names.
Show attributes
names?array<string>The account names.
hasApiKey?booleanTrue selects only accounts with their own Steam Web API key saved, false only accounts without one (which use the workspace's backup key when it has one). Unset includes both.
hasProxyAssignment?booleanTrue selects only accounts with a live proxy assignment, false only accounts with none, so the accounts that have no proxy can be listed and counted. Unset includes both.
inventoryStates?array<string>Inventory states, OR within the field: never read, public, or private. Empty does not restrict.
Value in"ACCOUNT_"ACCOUNT_"ACCOUNT_
proxyPoolIds?array<string>Proxy pool ids, OR within the field: only accounts with a live proxy assignment in one of these pools. Empty does not restrict. At most 100 pools.
query?stringLiteral case-insensitive account-name substring, applied server side before pagination. Absent or empty matches every account.
sessionErrorReasons?array<string>Session error reasons, OR within the field: only accounts whose session is in error now for one of these reasons. Empty does not restrict.
Value in"SESSION_"SESSION_"SESSION_"SESSION_"SESSION_"SESSION_"SESSION_"SESSION_"SESSION_"SESSION_
sessionStatuses?array<string>Session status set, OR within the field, so the accounts in one or more states can be listed and counted without reading every account. Empty includes every status.
Value in"SESSION_"SESSION_"SESSION_"SESSION_"SESSION_
Response body
application/json
Success
counts?array<AccountSessionStatusCount>Count of accounts in each session status, scoped to the workspace and the filter. A status with no accounts may be omitted.
Show attributes
count?integerNumber of accounts in this session status.
Format"int32"
sessionStatus?stringThe session status this count is for.
Value in"SESSION_"SESSION_"SESSION_"SESSION_"SESSION_
application/json
The request lacks a valid API key in the Authorization header.
codestringThe Connect error code, such as "not_found".
details?array<object>Optional machine-readable error details.
messagestringA human-readable description of the error.
application/json
The API key is not allowed to perform this action on this workspace.
codestringThe Connect error code, such as "not_found".
details?array<object>Optional machine-readable error details.
messagestringA human-readable description of the error.
application/json
The request was rate limited. Slow down and retry later.
codestringThe Connect error code, such as "not_found".
details?array<object>Optional machine-readable error details.
messagestringA human-readable description of the error.
application/json
An internal server error occurred.
codestringThe Connect error code, such as "not_found".
details?array<object>Optional machine-readable error details.
messagestringA human-readable description of the error.
curl -X POST "https://api.goldmine.to/steam.v1.Steam/CountAccounts" \
-H "Authorization: Bearer $CSTRADER_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'const res = await fetch("https://api.goldmine.to/steam.v1.Steam/CountAccounts", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.CSTRADER_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({}),
});
const data = await res.json();body := strings.NewReader(`{}`)
req, err := http.NewRequestWithContext(ctx, http.MethodPost, "https://api.goldmine.to/steam.v1.Steam/CountAccounts", body)
if err != nil {
return err
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("CSTRADER_API_KEY"))
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)import os, requests
res = requests.post(
"https://api.goldmine.to/steam.v1.Steam/CountAccounts",
headers={"Authorization": f"Bearer {os.environ['CSTRADER_API_KEY']}"},
json={},
)
data = res.json(){
"counts": [
{
"sessionStatus": "SESSION_STATUS_LOGGED_ON",
"count": 312
},
{
"sessionStatus": "SESSION_STATUS_DISCONNECTED",
"count": 335
}
]
}{
"code": "unauthenticated",
"message": "The request lacks a valid API key in the Authorization header."
}{
"code": "permission_denied",
"message": "The API key is not allowed to perform this action on this workspace."
}{
"code": "resource_exhausted",
"message": "The request was rate limited. Slow down and retry later."
}{
"code": "internal",
"message": "An internal server error occurred."
}curl -X POST "https://api.goldmine.to/steam.v1.Steam/CountAccounts" \
-H "Authorization: Bearer $CSTRADER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"filter": {
"deleted": true
}
}'const res = await fetch("https://api.goldmine.to/steam.v1.Steam/CountAccounts", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.CSTRADER_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"filter": {
"deleted": true
}
}),
});
const data = await res.json();body := strings.NewReader(`{
"filter": {
"deleted": true
}
}`)
req, err := http.NewRequestWithContext(ctx, http.MethodPost, "https://api.goldmine.to/steam.v1.Steam/CountAccounts", body)
if err != nil {
return err
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("CSTRADER_API_KEY"))
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)import os, requests
res = requests.post(
"https://api.goldmine.to/steam.v1.Steam/CountAccounts",
headers={"Authorization": f"Bearer {os.environ['CSTRADER_API_KEY']}"},
json={
"filter": {
"deleted": true
}
},
)
data = res.json(){
"counts": [
{
"sessionStatus": "SESSION_STATUS_DISCONNECTED",
"count": 4
}
]
}{
"code": "unauthenticated",
"message": "The request lacks a valid API key in the Authorization header."
}{
"code": "permission_denied",
"message": "The API key is not allowed to perform this action on this workspace."
}{
"code": "resource_exhausted",
"message": "The request was rate limited. Slow down and retry later."
}{
"code": "internal",
"message": "An internal server error occurred."
}