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 RequiredStudio+

Get the statistical distribution for a specific game stat. Shows how firearms are distributed across value ranges for a given stat, useful for understanding the spread and identifying balance issues.

statDistribution(params: StatDistributionParams): Promise<APIResponse<StatDistribution>>
GET/v1/game/stat-distribution

  • stringheaderrequired

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

  • stringrequired

    Which stat to profile

    Accepts
    Example

  • object

    The response payload.

  • string

    Which statistic this row is about, named as the field is: weightEmptyG, damage.

  • integer

    How many records fall in this bucket.

  • number

    Arithmetic mean across the records counted.

  • number

    Middle value of the stat across the catalog.

  • number

    Standard deviation across the records counted.

  • number

    Lowest value of the stat across the catalog.

  • number

    Highest value of the stat across the catalog.

  • object

    Percentile cut points for the stat.

  • number

    10th percentile.

  • number

    25th percentile.

  • number

    50th percentile, equal to median.

  • number

    75th percentile.

  • number

    90th percentile.

  • object[]

    Firearm counts across ten fixed bands of width 10, from 0-10 to 90-100.

  • string

    The band this bucket covers, lo-hi. Half-open, so a value equal to hi falls in the next bucket, except 90-100, which includes 100.

  • integer

    How many records fall in this bucket.

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

Minimum tier
Studio+
Monthly quota
150,000/mo
Rate limit
120/min
Daily cap
10,000

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