GunSpec

Stats

Resource class for interacting with the GunSpec Statistics API. Wraps all /v1/stats endpoints. Instantiated internally by the GunSpec client and exposed as client.stats.

Auth RequiredStudio+

Get caliber popularity trends across historical eras.

caliberPopularityByEra(params?: CaliberPopularityByEraParams): Promise<APIResponse<CaliberPopularityByEra[]>>
GET/v1/stats/caliber-popularity-by-era

  • stringheaderrequired

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

  • string

    Earliest decade, formatted like "1940s"

    Example
  • string

    Latest decade, formatted like "2020s"

    Example

  • object[]

    The response payload.

  • string

    The decade this row covers, e.g. 1940s.

  • object[]

    The cartridges chambered by firearms introduced in this decade.

  • string

    Slug of the cartridge. Resolve against /v1/calibers/{id}.

  • string

    Display name of the cartridge.

  • integer

    How many firearms this row covers.

  • 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.