GunSpec

Firearms

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

Auth RequiredBuilder+

Get physical dimensions for a firearm.

getDimensions(id: string): Promise<APIResponse<Dimensions>>
GET/v1/firearms/{id}/dimensions

  • stringheaderrequired

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

  • stringrequired

    Resource slug ID

    Accepts
    a lowercase slug: letters, digits and hyphens
    Example

  • FirearmDimensions

    Physical dimensions in both metric and imperial units.

  • string

    Slug of the firearm.

  • string

    Display name, as the maker writes it.

  • object

    Every dimension in millimetres and grams.

  • number | null

    Unloaded weight in grams, without magazine.

  • number | null

    Loaded weight in grams, with a full magazine.

  • number | null

    Overall length in millimetres, stock extended where it folds or collapses.

  • number | null

    Barrel length in millimetres, measured from the breech face.

  • number | null

    Height in millimetres, including sights and a fitted magazine.

  • number | null

    Width in millimetres at the widest point.

  • number | null

    Overall length in millimetres with the stock folded or collapsed. Null where it does not.

  • object

    The same measurements converted to pounds and inches.

  • number | null

    Unloaded weight in pounds, without magazine. Converted from weightEmptyG.

  • number | null

    Loaded weight in pounds, with a full magazine. Converted from weightLoadedG.

  • number | null

    Overall length in inches, stock extended where it folds or collapses. Converted from overallLengthMm.

  • number | null

    Barrel length in inches, measured from the breech face. Converted from barrelLengthMm.

  • number | null

    Height in inches, including sights and a fitted magazine. Converted from heightMm.

  • number | null

    Width in inches at the widest point. Converted from widthMm.

  • number | null

    Overall length in inches with the stock folded or collapsed. Null where it does not. Converted from foldedLengthMm.

  • 400VALIDATION_ERRORValidation error
  • 401UNAUTHORIZEDAPI key required
  • 403FORBIDDENValid key, not permitted
  • 404NOT_FOUNDResource not found
  • 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.