GunSpec

Game

Resource class for interacting with the GunSpec Game API. Wraps all /v1/game endpoints. These endpoints provide game-balanced firearm data suitable for game development, including normalized stats, tier rankings, and balance analysis. Instantiated internally by the GunSpec client and exposed as client.game.

Auth RequiredBuilder+

Get a roster of firearms best suited for a specific game role.

roleRoster(params: RoleRosterParams): Promise<APIResponse<RoleRosterItem[]>>
GET/v1/game/role-roster

  • stringheaderrequired

    Your API key. Authorization: Bearer <key> is accepted in its place.

  • stringrequired

    Gameplay role

    Accepts
    Example
  • integerdefault5

    How many to return

    Range
    1 – 25
    Example

  • object[]

    The best-scoring firearms for the role, strongest first.

  • string

    Slug of the firearm.

  • string

    Display name, as the maker writes it.

  • number

    Fit for this role, 0 to 100, from the role weighting of the game stats.

  • object

    The editorial game stats, with the game prefix the column carries stripped.

  • integer | null

    Editorial damage rating, 0-100. Not a measured figure.

  • integer | null

    Editorial accuracy rating, 0-100.

  • integer | null

    Editorial range rating, 0-100.

  • integer | null

    Editorial rate-of-fire rating, 0-100.

  • integer | null

    Editorial mobility rating, 0-100.

  • integer | null

    Editorial recoil-control rating, 0-100.

  • integer | null

    Editorial reload-speed rating, 0-100.

  • integer | null

    Editorial concealment rating, 0-100.

  • 400VALIDATION_ERRORValidation error
  • 401UNAUTHORIZEDAPI key required
  • 403FORBIDDENValid key, not permitted
  • 429RATE_LIMITEDRate limit exceeded
  • 500INTERNAL_ERRORUnexpected server error

Minimum tier
Builder+
Monthly quota
25,000/mo
Rate limit
60/min
Daily cap
2,000

Figures shown are for this endpoint's minimum tier. Higher tiers raise every limit.