Getting Started

Quick start

Get started with SteamApis v2 by obtaining your API key and making your first API request.

Acquire your Steam ID and API key

To get started with SteamApis, sign in using your Steam account. Once signed in, go to your SteamApis Settings page to retrieve your SteamID64 and your API key. The API key is essential for accessing all API endpoints.

Find your Steam ID using SteamID, a SteamID lookup tool.
Get your API Key in your SteamApis account.

Authentication

In v2, your API key must be passed via the x-api-key request header. As a fallback, you can also pass it as a key query parameter.

index.js
const API_KEY = '1nqNbqP5JYQ9Lpw5nATfKumaxN0';

const response = await fetch('https://api.steamapis.com/v2/steam/users/76561198038526790', {
  headers: {
    'x-api-key': API_KEY
  }
});

const data = await response.json();
console.log(data);

Response format

All v2 endpoints return responses in a standard envelope format:

Success response:

response.json
{
  "success": true,
  "response": {
    // endpoint-specific data
  }
}

Error response:

error.json
{
  "success": false,
  "error": {
    "name": "BadRequestError",
    "message": "NOT_FOUND",
    "meta": null
  }
}

HTTP status codes

All API responses are returned in JSON format. Check the HTTP status code to determine if your request was successful:

  • 200 OK - the request was successful.
  • 400 Bad Request - the request could not be understood or was missing required parameters.
  • 401 Unauthorized - missing or invalid API key.
  • 403 Forbidden - access denied. Your account may not have sufficient balance or permissions.
  • 404 Not Found - the requested resource was not found.
  • 429 Too Many Requests - rate limit exceeded.
  • 500 Internal Server Error - something went wrong on our end.

Error codes

When a request fails, the error response includes a message field to help identify the issue:

MessageHTTP StatusDescription
MISSING_API_KEY403No API key provided in the request header or query parameter
INVALID_API_KEY403The provided API key is not valid
ACCESS_DENIED403Your API key has been disabled
INSUFFICIENT_BALANCE400Free tier limit reached or account has no balance
NOT_FOUND400The requested resource was not found
INVALID_PARAMS400Invalid or malformed parameters
INTERNAL_ERROR500Something went wrong on our end
You can find a full documentation of possible status codes on WebFX