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

Get a high-level summary of the database.

summary(): Promise<APIResponse<StatsSummary>>
GET/v1/stats/summary

  • stringheaderrequired

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

  • object

    The response payload.

  • integer

    Firearms in the catalog.

  • integer

    Manufacturers in the catalog. Counts rows, so it exceeds the number of makers with a catalogued firearm.

  • integer

    Cartridges in the catalog.

  • integer

    Distinct countries of origin across the catalog.

  • number

    Mean data_confidence across the catalog, as a percentage rather than the 0-1 the per-record field uses.

  • integer

    Firearms that are a variant of another, meaning those carrying a parentFirearmId.

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

Minimum tier
Explorer+
Monthly quota
200/mo
Rate limit
10/min
Daily cap
50

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

This read answers conditional requests. Keep the ETag from a response and send it back as If-None-Match: an unchanged record returns 304 Not Modified with no body, which counts toward your per-minute rate limit but not your daily allowance.