{
  "openapi": "3.1.0",
  "info": {
    "title": "SteamTradeX Inventory API",
    "version": "1.0.0",
    "summary": "Live pages of any public Steam inventory, for trading bots.",
    "description": "Reads one page (up to 2,000 items) of any public Steam inventory, live from Steam, never cached.\n\nEach answered page costs one request. Private inventories, people who own nothing in that game, and failed reads are free.\n\nRequests are bought with TF2 keys: 7,000 a key from 1, 7,500 from 5, 8,000 from 10. They never expire.\n\nLimit: 120 requests a minute per account, shared by all of its keys. Free reads of private and empty inventories: up to 20 a minute, 120 an hour and 600 a day per account.\n\nThis is the paid Inventory API (keys start inv_). It is not the free Listing API, which updates a listed bot's rates: see https://steamtradex.com/docs/listing-api.",
    "contact": {
      "name": "SteamTradeX",
      "url": "https://steamtradex.com/docs/inventory-api"
    }
  },
  "externalDocs": {
    "description": "Full reference",
    "url": "https://steamtradex.com/docs/inventory-api"
  },
  "servers": [
    {
      "url": "https://steamtradex.com"
    }
  ],
  "security": [
    {
      "apiKeyHeader": []
    },
    {
      "bearer": []
    }
  ],
  "tags": [
    {
      "name": "Inventory",
      "description": "Read Steam inventories."
    }
  ],
  "paths": {
    "/api/inventory/{steamid}/{appid}/{contextid}": {
      "get": {
        "tags": [
          "Inventory"
        ],
        "operationId": "getInventory",
        "summary": "Read one page of an inventory",
        "description": "Returns one page of the inventory in Steam's own shape. While more_items is 1, call again with start_assetid set to last_assetid.",
        "parameters": [
          {
            "name": "steamid",
            "in": "path",
            "required": true,
            "description": "The SteamID64 of the person whose inventory you want. Their inventory must be public. (17 digits, starting 7656119)",
            "schema": {
              "type": "string",
              "pattern": "^7656119\\d{10}$"
            },
            "example": "76561198012345678"
          },
          {
            "name": "appid",
            "in": "path",
            "required": true,
            "description": "The game the items belong to. 753 is Steam itself (cards, gems, backgrounds). (digits only, 1 to 10 of them)",
            "schema": {
              "type": "string",
              "pattern": "^\\d{1,10}$"
            },
            "example": "753"
          },
          {
            "name": "contextid",
            "in": "path",
            "required": true,
            "description": "Which part of that game's inventory. 6 for Steam items, 2 for most games. (digits only, 1 to 10 of them)",
            "schema": {
              "type": "string",
              "pattern": "^\\d{1,10}$"
            },
            "example": "6"
          },
          {
            "name": "count",
            "in": "query",
            "required": false,
            "description": "Items per page. A number outside 1 to 2,000 is moved to the nearest end; anything that is not a number counts as 2,000. A page costs one request whatever its size, so leave it at the most. (1 to 2,000)",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 2000,
              "default": 2000
            },
            "example": 2000
          },
          {
            "name": "start_assetid",
            "in": "query",
            "required": false,
            "description": "Where the next page starts: the last_assetid from the page before. Leave it out for the first page. (digits only, up to 20 of them)",
            "schema": {
              "type": "string",
              "pattern": "^\\d{1,20}$"
            },
            "example": "31846251911"
          },
          {
            "name": "l",
            "in": "query",
            "required": false,
            "description": "The language item names and descriptions come back in, such as english, german or schinese. `language` is accepted as another name for it; when both are sent, `l` wins. Capitals are made lower case. (2 to 20 letters, a Steam language name)",
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{2,20}$",
              "default": "english"
            },
            "example": "english"
          },
          {
            "name": "language",
            "in": "query",
            "required": false,
            "description": "Another name for l. When both are sent, l wins.",
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{2,20}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One page of the inventory, exactly as Steam sends it, and one request used. Someone who owns nothing in that game gets an empty inventory instead, free (x-requests-charged: 0).",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/x-request-id"
              },
              "x-requests-charged": {
                "$ref": "#/components/headers/x-requests-charged"
              },
              "x-requests-remaining": {
                "$ref": "#/components/headers/x-requests-remaining"
              },
              "x-ratelimit-limit": {
                "$ref": "#/components/headers/x-ratelimit-limit"
              },
              "x-ratelimit-remaining": {
                "$ref": "#/components/headers/x-ratelimit-remaining"
              },
              "x-ratelimit-reset": {
                "$ref": "#/components/headers/x-ratelimit-reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InventoryPage"
                },
                "examples": {
                  "page": {
                    "summary": "A page with more to come",
                    "value": {
                      "assets": [
                        {
                          "appid": 753,
                          "contextid": "6",
                          "assetid": "31846250114",
                          "classid": "5249311904",
                          "instanceid": "3873503133",
                          "amount": "1"
                        },
                        {
                          "appid": 753,
                          "contextid": "6",
                          "assetid": "31846251911",
                          "classid": "667924416",
                          "instanceid": "0",
                          "amount": "1250"
                        }
                      ],
                      "descriptions": [
                        {
                          "appid": 753,
                          "classid": "5249311904",
                          "instanceid": "3873503133",
                          "currency": 0,
                          "background_color": "",
                          "icon_url": "IzMF03bi9WpSBq-S-ekoE33L-iLqGFHVaU25ZzQNQcXdEH9myp0erksICfTcePMQFc1nqWSMU5OD2NwOx3sIyShXOjLx2Sk5MbV5MsLD3k3xpaqqvZhC",
                          "descriptions": [
                            {
                              "type": "html",
                              "value": ""
                            }
                          ],
                          "tradable": 1,
                          "name": "Heavy",
                          "name_color": "",
                          "type": "Team Fortress 2 Trading Card",
                          "market_name": "Heavy",
                          "market_hash_name": "440-Heavy",
                          "market_fee_app": 440,
                          "commodity": 1,
                          "market_tradable_restriction": 7,
                          "market_marketable_restriction": 7,
                          "marketable": 1,
                          "tags": [
                            {
                              "category": "Game",
                              "internal_name": "app_440",
                              "localized_category_name": "Game",
                              "localized_tag_name": "Team Fortress 2"
                            },
                            {
                              "category": "item_class",
                              "internal_name": "item_class_2",
                              "localized_category_name": "Item Type",
                              "localized_tag_name": "Trading Card"
                            },
                            {
                              "category": "cardborder",
                              "internal_name": "cardborder_0",
                              "localized_category_name": "Card Border",
                              "localized_tag_name": "Normal"
                            }
                          ]
                        },
                        {
                          "appid": 753,
                          "classid": "667924416",
                          "instanceid": "0",
                          "currency": 0,
                          "background_color": "",
                          "icon_url": "IzMF03bi9WpSBq-S-ekoE33L-iLqGFHVaU25ZzQNQcXdA3g5gMEPvUZZEfSMJ6dESN8p_2SVTY7V2NwOx3sIyShXOjLx2Sk5MbV5MsLD3k3xpaqqvZhC",
                          "descriptions": [
                            {
                              "type": "html",
                              "value": "These gems can be used to create Booster Packs or animated stickers."
                            }
                          ],
                          "tradable": 1,
                          "name": "Gems",
                          "name_color": "",
                          "type": "Steam Gems",
                          "market_name": "Gems",
                          "market_hash_name": "753-Gems",
                          "commodity": 1,
                          "marketable": 0,
                          "tags": [
                            {
                              "category": "Game",
                              "internal_name": "app_753",
                              "localized_category_name": "Game",
                              "localized_tag_name": "Steam"
                            },
                            {
                              "category": "item_class",
                              "internal_name": "item_class_7",
                              "localized_category_name": "Item Type",
                              "localized_tag_name": "Gems"
                            }
                          ]
                        }
                      ],
                      "more_items": 1,
                      "last_assetid": "31846251911",
                      "total_inventory_count": 4318,
                      "success": 1,
                      "rwgrsn": -2
                    }
                  },
                  "empty": {
                    "summary": "Owns nothing in that game (free)",
                    "value": {
                      "assets": [],
                      "descriptions": [],
                      "total_inventory_count": 0,
                      "success": 1
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Not a SteamID64: The steamid is not 17 digits starting 7656119 (a profile name or a short id will not do). Bad appid: appid is not plain digits. Bad contextid: contextid is not plain digits. Bad start_assetid: start_assetid is not plain digits. Bad language: l (or language) is not 2 to 20 letters.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/x-request-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "not_a_steamid64": {
                    "summary": "Not a SteamID64",
                    "value": {
                      "success": false,
                      "error": "That is not a SteamID64. It is 17 digits, starting 7656119.",
                      "request_id": "req_5f0c9a1e7b2d4c6a8e3f1b90"
                    }
                  },
                  "bad_appid": {
                    "summary": "Bad appid",
                    "value": {
                      "success": false,
                      "error": "appid must be a number, such as 440 for TF2 or 753 for Steam.",
                      "request_id": "req_5f0c9a1e7b2d4c6a8e3f1b90"
                    }
                  },
                  "bad_contextid": {
                    "summary": "Bad contextid",
                    "value": {
                      "success": false,
                      "error": "contextid must be a number, such as 2 for most games or 6 for Steam.",
                      "request_id": "req_5f0c9a1e7b2d4c6a8e3f1b90"
                    }
                  },
                  "bad_start_assetid": {
                    "summary": "Bad start_assetid",
                    "value": {
                      "success": false,
                      "error": "start_assetid must be a number. Use the last_assetid from the previous page.",
                      "request_id": "req_5f0c9a1e7b2d4c6a8e3f1b90"
                    }
                  },
                  "bad_language": {
                    "summary": "Bad language",
                    "value": {
                      "success": false,
                      "error": "l must be a Steam language name, such as english.",
                      "request_id": "req_5f0c9a1e7b2d4c6a8e3f1b90"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "No key sent: There is no X-API-KEY header and no Authorization: Bearer header. A key in the address (the query string) is not read. Key not valid: The key is wrong, revoked, or a Listing API key. Unknown and revoked keys get the same answer on purpose.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/x-request-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "no_key_sent": {
                    "summary": "No key sent",
                    "value": {
                      "success": false,
                      "error": "Send your API key in an X-API-KEY header.",
                      "request_id": "req_5f0c9a1e7b2d4c6a8e3f1b90"
                    }
                  },
                  "key_not_valid": {
                    "summary": "Key not valid",
                    "value": {
                      "success": false,
                      "error": "That API key is not valid.",
                      "request_id": "req_5f0c9a1e7b2d4c6a8e3f1b90"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "No requests left: Your account's balance of requests is used up.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/x-request-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "no_requests_left": {
                    "summary": "No requests left",
                    "value": {
                      "success": false,
                      "error": "You have no requests left. Add TF2 keys to carry on.",
                      "where": "https://steamtradex.com/dashboard/api",
                      "request_id": "req_5f0c9a1e7b2d4c6a8e3f1b90"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Inventory is private: The person's inventory is not public. No address or retry will change that.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/x-request-id"
              },
              "x-requests-charged": {
                "$ref": "#/components/headers/x-requests-charged"
              },
              "x-requests-remaining": {
                "$ref": "#/components/headers/x-requests-remaining"
              },
              "x-ratelimit-limit": {
                "$ref": "#/components/headers/x-ratelimit-limit"
              },
              "x-ratelimit-remaining": {
                "$ref": "#/components/headers/x-ratelimit-remaining"
              },
              "x-ratelimit-reset": {
                "$ref": "#/components/headers/x-ratelimit-reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "inventory_is_private": {
                    "summary": "Inventory is private",
                    "value": {
                      "success": false,
                      "error": "inventory_private",
                      "message": "That inventory is private.",
                      "request_id": "req_5f0c9a1e7b2d4c6a8e3f1b90"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too fast: More than 120 requests in one minute on your account, counted across all of its keys. Too many free reads: Your account has read more private or empty inventories than the free allowance: 20 a minute, 120 an hour and 600 a day. Pages you pay for never count towards it once they are answered; a read still in progress does, so more than 20 reads at the same moment can also meet it.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/x-request-id"
              },
              "x-ratelimit-limit": {
                "$ref": "#/components/headers/x-ratelimit-limit"
              },
              "x-ratelimit-remaining": {
                "$ref": "#/components/headers/x-ratelimit-remaining"
              },
              "x-ratelimit-reset": {
                "$ref": "#/components/headers/x-ratelimit-reset"
              },
              "retry-after": {
                "$ref": "#/components/headers/retry-after"
              },
              "x-requests-charged": {
                "$ref": "#/components/headers/x-requests-charged"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "too_fast": {
                    "summary": "Too fast",
                    "value": {
                      "success": false,
                      "error": "Slow down: 120 requests a minute per account. Try again in 23s.",
                      "request_id": "req_5f0c9a1e7b2d4c6a8e3f1b90"
                    }
                  },
                  "too_many_free_reads": {
                    "summary": "Too many free reads",
                    "value": {
                      "success": false,
                      "error": "Too many free reads. Private and empty inventories are free, up to 20 a minute, 120 an hour and 600 a day per account, and a read in progress counts until it is paid for. Try again in 23s.",
                      "request_id": "req_5f0c9a1e7b2d4c6a8e3f1b90"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something went wrong on our side. Not charged; try again.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "502": {
            "description": "Could not get it from Steam: Steam did not give us that page after three tries through different addresses.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/x-request-id"
              },
              "x-requests-charged": {
                "$ref": "#/components/headers/x-requests-charged"
              },
              "x-requests-remaining": {
                "$ref": "#/components/headers/x-requests-remaining"
              },
              "x-ratelimit-limit": {
                "$ref": "#/components/headers/x-ratelimit-limit"
              },
              "x-ratelimit-remaining": {
                "$ref": "#/components/headers/x-ratelimit-remaining"
              },
              "x-ratelimit-reset": {
                "$ref": "#/components/headers/x-ratelimit-reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "could_not_get_it_from_steam": {
                    "summary": "Could not get it from Steam",
                    "value": {
                      "success": false,
                      "error": "We could not get that inventory from Steam. Try again.",
                      "request_id": "req_5f0c9a1e7b2d4c6a8e3f1b90"
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Steam refused the read: Steam turned the read away on every try. Every reader busy: All of our readers were in use at that moment. Service paused: Only if we ever pause the Inventory API for everyone. The message says why.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/x-request-id"
              },
              "x-requests-charged": {
                "$ref": "#/components/headers/x-requests-charged"
              },
              "x-requests-remaining": {
                "$ref": "#/components/headers/x-requests-remaining"
              },
              "x-ratelimit-limit": {
                "$ref": "#/components/headers/x-ratelimit-limit"
              },
              "x-ratelimit-remaining": {
                "$ref": "#/components/headers/x-ratelimit-remaining"
              },
              "x-ratelimit-reset": {
                "$ref": "#/components/headers/x-ratelimit-reset"
              },
              "retry-after": {
                "$ref": "#/components/headers/retry-after"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "steam_refused_the_read": {
                    "summary": "Steam refused the read",
                    "value": {
                      "success": false,
                      "error": "Steam refused that read. Try again shortly.",
                      "request_id": "req_5f0c9a1e7b2d4c6a8e3f1b90"
                    }
                  },
                  "every_reader_busy": {
                    "summary": "Every reader busy",
                    "value": {
                      "success": false,
                      "error": "Every reader is busy. Try again in a minute.",
                      "request_id": "req_5f0c9a1e7b2d4c6a8e3f1b90"
                    }
                  },
                  "service_paused": {
                    "summary": "Service paused",
                    "value": {
                      "success": false,
                      "error": "paused",
                      "message": "The inventory API is paused for now while we make inventory reading more reliable. Nothing is sold or charged while it is paused.",
                      "request_id": "req_5f0c9a1e7b2d4c6a8e3f1b90"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/inventory/{steamid}": {
      "get": {
        "tags": [
          "Inventory"
        ],
        "operationId": "getInventoryV1",
        "summary": "Read one page of an inventory (older form)",
        "description": "The same reader, the same answers and the same charging, with appid and contextid in the query string. They default to 753 and 6 (Steam items) when left out.",
        "parameters": [
          {
            "name": "steamid",
            "in": "path",
            "required": true,
            "description": "The SteamID64 of the person whose inventory you want. Their inventory must be public. (17 digits, starting 7656119)",
            "schema": {
              "type": "string",
              "pattern": "^7656119\\d{10}$"
            },
            "example": "76561198012345678"
          },
          {
            "name": "appid",
            "in": "query",
            "required": false,
            "description": "The game the items belong to. 753 is Steam itself (cards, gems, backgrounds). (digits only, 1 to 10 of them)",
            "schema": {
              "type": "string",
              "pattern": "^\\d{1,10}$",
              "default": "753"
            },
            "example": "753"
          },
          {
            "name": "contextid",
            "in": "query",
            "required": false,
            "description": "Which part of that game's inventory. 6 for Steam items, 2 for most games. (digits only, 1 to 10 of them)",
            "schema": {
              "type": "string",
              "pattern": "^\\d{1,10}$",
              "default": "6"
            },
            "example": "6"
          },
          {
            "name": "count",
            "in": "query",
            "required": false,
            "description": "Items per page. A number outside 1 to 2,000 is moved to the nearest end; anything that is not a number counts as 2,000. A page costs one request whatever its size, so leave it at the most. (1 to 2,000)",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 2000,
              "default": 2000
            },
            "example": 2000
          },
          {
            "name": "start_assetid",
            "in": "query",
            "required": false,
            "description": "Where the next page starts: the last_assetid from the page before. Leave it out for the first page. (digits only, up to 20 of them)",
            "schema": {
              "type": "string",
              "pattern": "^\\d{1,20}$"
            },
            "example": "31846251911"
          },
          {
            "name": "l",
            "in": "query",
            "required": false,
            "description": "The language item names and descriptions come back in, such as english, german or schinese. `language` is accepted as another name for it; when both are sent, `l` wins. Capitals are made lower case. (2 to 20 letters, a Steam language name)",
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{2,20}$",
              "default": "english"
            },
            "example": "english"
          },
          {
            "name": "language",
            "in": "query",
            "required": false,
            "description": "Another name for l. When both are sent, l wins.",
            "schema": {
              "type": "string",
              "pattern": "^[a-z]{2,20}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "One page of the inventory, exactly as Steam sends it, and one request used. Someone who owns nothing in that game gets an empty inventory instead, free (x-requests-charged: 0).",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/x-request-id"
              },
              "x-requests-charged": {
                "$ref": "#/components/headers/x-requests-charged"
              },
              "x-requests-remaining": {
                "$ref": "#/components/headers/x-requests-remaining"
              },
              "x-ratelimit-limit": {
                "$ref": "#/components/headers/x-ratelimit-limit"
              },
              "x-ratelimit-remaining": {
                "$ref": "#/components/headers/x-ratelimit-remaining"
              },
              "x-ratelimit-reset": {
                "$ref": "#/components/headers/x-ratelimit-reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InventoryPage"
                },
                "examples": {
                  "page": {
                    "summary": "A page with more to come",
                    "value": {
                      "assets": [
                        {
                          "appid": 753,
                          "contextid": "6",
                          "assetid": "31846250114",
                          "classid": "5249311904",
                          "instanceid": "3873503133",
                          "amount": "1"
                        },
                        {
                          "appid": 753,
                          "contextid": "6",
                          "assetid": "31846251911",
                          "classid": "667924416",
                          "instanceid": "0",
                          "amount": "1250"
                        }
                      ],
                      "descriptions": [
                        {
                          "appid": 753,
                          "classid": "5249311904",
                          "instanceid": "3873503133",
                          "currency": 0,
                          "background_color": "",
                          "icon_url": "IzMF03bi9WpSBq-S-ekoE33L-iLqGFHVaU25ZzQNQcXdEH9myp0erksICfTcePMQFc1nqWSMU5OD2NwOx3sIyShXOjLx2Sk5MbV5MsLD3k3xpaqqvZhC",
                          "descriptions": [
                            {
                              "type": "html",
                              "value": ""
                            }
                          ],
                          "tradable": 1,
                          "name": "Heavy",
                          "name_color": "",
                          "type": "Team Fortress 2 Trading Card",
                          "market_name": "Heavy",
                          "market_hash_name": "440-Heavy",
                          "market_fee_app": 440,
                          "commodity": 1,
                          "market_tradable_restriction": 7,
                          "market_marketable_restriction": 7,
                          "marketable": 1,
                          "tags": [
                            {
                              "category": "Game",
                              "internal_name": "app_440",
                              "localized_category_name": "Game",
                              "localized_tag_name": "Team Fortress 2"
                            },
                            {
                              "category": "item_class",
                              "internal_name": "item_class_2",
                              "localized_category_name": "Item Type",
                              "localized_tag_name": "Trading Card"
                            },
                            {
                              "category": "cardborder",
                              "internal_name": "cardborder_0",
                              "localized_category_name": "Card Border",
                              "localized_tag_name": "Normal"
                            }
                          ]
                        },
                        {
                          "appid": 753,
                          "classid": "667924416",
                          "instanceid": "0",
                          "currency": 0,
                          "background_color": "",
                          "icon_url": "IzMF03bi9WpSBq-S-ekoE33L-iLqGFHVaU25ZzQNQcXdA3g5gMEPvUZZEfSMJ6dESN8p_2SVTY7V2NwOx3sIyShXOjLx2Sk5MbV5MsLD3k3xpaqqvZhC",
                          "descriptions": [
                            {
                              "type": "html",
                              "value": "These gems can be used to create Booster Packs or animated stickers."
                            }
                          ],
                          "tradable": 1,
                          "name": "Gems",
                          "name_color": "",
                          "type": "Steam Gems",
                          "market_name": "Gems",
                          "market_hash_name": "753-Gems",
                          "commodity": 1,
                          "marketable": 0,
                          "tags": [
                            {
                              "category": "Game",
                              "internal_name": "app_753",
                              "localized_category_name": "Game",
                              "localized_tag_name": "Steam"
                            },
                            {
                              "category": "item_class",
                              "internal_name": "item_class_7",
                              "localized_category_name": "Item Type",
                              "localized_tag_name": "Gems"
                            }
                          ]
                        }
                      ],
                      "more_items": 1,
                      "last_assetid": "31846251911",
                      "total_inventory_count": 4318,
                      "success": 1,
                      "rwgrsn": -2
                    }
                  },
                  "empty": {
                    "summary": "Owns nothing in that game (free)",
                    "value": {
                      "assets": [],
                      "descriptions": [],
                      "total_inventory_count": 0,
                      "success": 1
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Not a SteamID64: The steamid is not 17 digits starting 7656119 (a profile name or a short id will not do). Bad appid: appid is not plain digits. Bad contextid: contextid is not plain digits. Bad start_assetid: start_assetid is not plain digits. Bad language: l (or language) is not 2 to 20 letters.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/x-request-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "not_a_steamid64": {
                    "summary": "Not a SteamID64",
                    "value": {
                      "success": false,
                      "error": "That is not a SteamID64. It is 17 digits, starting 7656119.",
                      "request_id": "req_5f0c9a1e7b2d4c6a8e3f1b90"
                    }
                  },
                  "bad_appid": {
                    "summary": "Bad appid",
                    "value": {
                      "success": false,
                      "error": "appid must be a number, such as 440 for TF2 or 753 for Steam.",
                      "request_id": "req_5f0c9a1e7b2d4c6a8e3f1b90"
                    }
                  },
                  "bad_contextid": {
                    "summary": "Bad contextid",
                    "value": {
                      "success": false,
                      "error": "contextid must be a number, such as 2 for most games or 6 for Steam.",
                      "request_id": "req_5f0c9a1e7b2d4c6a8e3f1b90"
                    }
                  },
                  "bad_start_assetid": {
                    "summary": "Bad start_assetid",
                    "value": {
                      "success": false,
                      "error": "start_assetid must be a number. Use the last_assetid from the previous page.",
                      "request_id": "req_5f0c9a1e7b2d4c6a8e3f1b90"
                    }
                  },
                  "bad_language": {
                    "summary": "Bad language",
                    "value": {
                      "success": false,
                      "error": "l must be a Steam language name, such as english.",
                      "request_id": "req_5f0c9a1e7b2d4c6a8e3f1b90"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "No key sent: There is no X-API-KEY header and no Authorization: Bearer header. A key in the address (the query string) is not read. Key not valid: The key is wrong, revoked, or a Listing API key. Unknown and revoked keys get the same answer on purpose.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/x-request-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "no_key_sent": {
                    "summary": "No key sent",
                    "value": {
                      "success": false,
                      "error": "Send your API key in an X-API-KEY header.",
                      "request_id": "req_5f0c9a1e7b2d4c6a8e3f1b90"
                    }
                  },
                  "key_not_valid": {
                    "summary": "Key not valid",
                    "value": {
                      "success": false,
                      "error": "That API key is not valid.",
                      "request_id": "req_5f0c9a1e7b2d4c6a8e3f1b90"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "No requests left: Your account's balance of requests is used up.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/x-request-id"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "no_requests_left": {
                    "summary": "No requests left",
                    "value": {
                      "success": false,
                      "error": "You have no requests left. Add TF2 keys to carry on.",
                      "where": "https://steamtradex.com/dashboard/api",
                      "request_id": "req_5f0c9a1e7b2d4c6a8e3f1b90"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Inventory is private: The person's inventory is not public. No address or retry will change that.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/x-request-id"
              },
              "x-requests-charged": {
                "$ref": "#/components/headers/x-requests-charged"
              },
              "x-requests-remaining": {
                "$ref": "#/components/headers/x-requests-remaining"
              },
              "x-ratelimit-limit": {
                "$ref": "#/components/headers/x-ratelimit-limit"
              },
              "x-ratelimit-remaining": {
                "$ref": "#/components/headers/x-ratelimit-remaining"
              },
              "x-ratelimit-reset": {
                "$ref": "#/components/headers/x-ratelimit-reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "inventory_is_private": {
                    "summary": "Inventory is private",
                    "value": {
                      "success": false,
                      "error": "inventory_private",
                      "message": "That inventory is private.",
                      "request_id": "req_5f0c9a1e7b2d4c6a8e3f1b90"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too fast: More than 120 requests in one minute on your account, counted across all of its keys. Too many free reads: Your account has read more private or empty inventories than the free allowance: 20 a minute, 120 an hour and 600 a day. Pages you pay for never count towards it once they are answered; a read still in progress does, so more than 20 reads at the same moment can also meet it.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/x-request-id"
              },
              "x-ratelimit-limit": {
                "$ref": "#/components/headers/x-ratelimit-limit"
              },
              "x-ratelimit-remaining": {
                "$ref": "#/components/headers/x-ratelimit-remaining"
              },
              "x-ratelimit-reset": {
                "$ref": "#/components/headers/x-ratelimit-reset"
              },
              "retry-after": {
                "$ref": "#/components/headers/retry-after"
              },
              "x-requests-charged": {
                "$ref": "#/components/headers/x-requests-charged"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "too_fast": {
                    "summary": "Too fast",
                    "value": {
                      "success": false,
                      "error": "Slow down: 120 requests a minute per account. Try again in 23s.",
                      "request_id": "req_5f0c9a1e7b2d4c6a8e3f1b90"
                    }
                  },
                  "too_many_free_reads": {
                    "summary": "Too many free reads",
                    "value": {
                      "success": false,
                      "error": "Too many free reads. Private and empty inventories are free, up to 20 a minute, 120 an hour and 600 a day per account, and a read in progress counts until it is paid for. Try again in 23s.",
                      "request_id": "req_5f0c9a1e7b2d4c6a8e3f1b90"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Something went wrong on our side. Not charged; try again.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "502": {
            "description": "Could not get it from Steam: Steam did not give us that page after three tries through different addresses.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/x-request-id"
              },
              "x-requests-charged": {
                "$ref": "#/components/headers/x-requests-charged"
              },
              "x-requests-remaining": {
                "$ref": "#/components/headers/x-requests-remaining"
              },
              "x-ratelimit-limit": {
                "$ref": "#/components/headers/x-ratelimit-limit"
              },
              "x-ratelimit-remaining": {
                "$ref": "#/components/headers/x-ratelimit-remaining"
              },
              "x-ratelimit-reset": {
                "$ref": "#/components/headers/x-ratelimit-reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "could_not_get_it_from_steam": {
                    "summary": "Could not get it from Steam",
                    "value": {
                      "success": false,
                      "error": "We could not get that inventory from Steam. Try again.",
                      "request_id": "req_5f0c9a1e7b2d4c6a8e3f1b90"
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Steam refused the read: Steam turned the read away on every try. Every reader busy: All of our readers were in use at that moment. Service paused: Only if we ever pause the Inventory API for everyone. The message says why.",
            "headers": {
              "x-request-id": {
                "$ref": "#/components/headers/x-request-id"
              },
              "x-requests-charged": {
                "$ref": "#/components/headers/x-requests-charged"
              },
              "x-requests-remaining": {
                "$ref": "#/components/headers/x-requests-remaining"
              },
              "x-ratelimit-limit": {
                "$ref": "#/components/headers/x-ratelimit-limit"
              },
              "x-ratelimit-remaining": {
                "$ref": "#/components/headers/x-ratelimit-remaining"
              },
              "x-ratelimit-reset": {
                "$ref": "#/components/headers/x-ratelimit-reset"
              },
              "retry-after": {
                "$ref": "#/components/headers/retry-after"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "steam_refused_the_read": {
                    "summary": "Steam refused the read",
                    "value": {
                      "success": false,
                      "error": "Steam refused that read. Try again shortly.",
                      "request_id": "req_5f0c9a1e7b2d4c6a8e3f1b90"
                    }
                  },
                  "every_reader_busy": {
                    "summary": "Every reader busy",
                    "value": {
                      "success": false,
                      "error": "Every reader is busy. Try again in a minute.",
                      "request_id": "req_5f0c9a1e7b2d4c6a8e3f1b90"
                    }
                  },
                  "service_paused": {
                    "summary": "Service paused",
                    "value": {
                      "success": false,
                      "error": "paused",
                      "message": "The inventory API is paused for now while we make inventory reading more reliable. Nothing is sold or charged while it is paused.",
                      "request_id": "req_5f0c9a1e7b2d4c6a8e3f1b90"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "apiKeyHeader": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-KEY",
        "description": "Your Inventory API key, starting inv_. Create one at https://steamtradex.com/dashboard/api/keys."
      },
      "bearer": {
        "type": "http",
        "scheme": "bearer",
        "description": "The same key as Authorization: Bearer inv_... Used only when X-API-KEY is absent or empty."
      }
    },
    "schemas": {
      "InventoryPage": {
        "type": "object",
        "description": "Steam's own inventory JSON, passed on unchanged. Steam may add fields not listed here (such as rwgrsn); ignore what you do not use.",
        "required": [
          "success"
        ],
        "properties": {
          "assets": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "appid": {
                  "type": "integer"
                },
                "contextid": {
                  "type": "string"
                },
                "assetid": {
                  "type": "string",
                  "description": "This one item. Changes when the item is traded."
                },
                "classid": {
                  "type": "string"
                },
                "instanceid": {
                  "type": "string"
                },
                "amount": {
                  "type": "string",
                  "description": "How many: 1 for most items, more for stacks such as gems."
                }
              }
            }
          },
          "descriptions": {
            "type": "array",
            "description": "Names, types, tags and pictures. Join to assets on classid and instanceid.",
            "items": {
              "type": "object",
              "additionalProperties": true,
              "properties": {
                "appid": {
                  "type": "integer"
                },
                "classid": {
                  "type": "string"
                },
                "instanceid": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "market_hash_name": {
                  "type": "string"
                },
                "type": {
                  "type": "string"
                },
                "tradable": {
                  "type": "integer"
                },
                "marketable": {
                  "type": "integer"
                },
                "icon_url": {
                  "type": "string"
                },
                "tags": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "additionalProperties": true
                  }
                }
              }
            }
          },
          "total_inventory_count": {
            "type": "integer",
            "description": "Items in this game's inventory in total, across every page."
          },
          "more_items": {
            "type": "integer",
            "enum": [
              1
            ],
            "description": "Present and 1 when there is another page."
          },
          "last_assetid": {
            "type": "string",
            "description": "Pass as start_assetid to read the next page."
          },
          "success": {
            "type": "integer",
            "enum": [
              1
            ]
          }
        },
        "additionalProperties": true
      },
      "Error": {
        "type": "object",
        "required": [
          "success",
          "error",
          "request_id"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "const": false
          },
          "error": {
            "type": "string",
            "description": "What went wrong, in a sentence, or a short code (inventory_private, paused)."
          },
          "message": {
            "type": "string",
            "description": "A sentence explaining a short-code error."
          },
          "where": {
            "type": "string",
            "format": "uri",
            "description": "Where to fix it (402 only)."
          },
          "request_id": {
            "type": "string",
            "pattern": "^req_[0-9a-f]{24}$"
          }
        }
      }
    },
    "headers": {
      "x-request-id": {
        "description": "A reference for this one request. Quote it if you ask us about a request. Sent: Every answer.",
        "schema": {
          "type": "string"
        },
        "example": "req_5f0c9a1e7b2d4c6a8e3f1b90"
      },
      "x-requests-charged": {
        "description": "1 if this answer used one of your requests, 0 if it was free. Sent: Once your key is accepted, on 200, 403, 502 and 503.",
        "schema": {
          "type": "integer"
        },
        "example": "1"
      },
      "x-requests-remaining": {
        "description": "Requests left on your account after this one. Sent: Same as x-requests-charged.",
        "schema": {
          "type": "integer"
        },
        "example": "4999"
      },
      "x-ratelimit-limit": {
        "description": "Requests this key may make in one minute. Sent: Once your key is accepted.",
        "schema": {
          "type": "integer"
        },
        "example": "120"
      },
      "x-ratelimit-remaining": {
        "description": "Requests this key has left before the minute turns. Sent: Once your key is accepted.",
        "schema": {
          "type": "integer"
        },
        "example": "119"
      },
      "x-ratelimit-reset": {
        "description": "Seconds until the minute turns and the count starts again. Sent: Once your key is accepted.",
        "schema": {
          "type": "integer"
        },
        "example": "37"
      },
      "retry-after": {
        "description": "Seconds to wait before trying again. Sent: 429, and 503 when Steam refused or every reader was busy.",
        "schema": {
          "type": "integer"
        },
        "example": "30"
      }
    }
  }
}