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

The mount interfaces a firearm exposes. Studio.

getInterfaces(id: string): Promise<APIResponse<FirearmInterfaces>>
GET/v1/firearms/{id}/interfaces

  • stringheaderrequired

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

  • stringrequired

    Firearm slug

    Accepts
    a lowercase slug: letters, digits and hyphens
    Example

  • object

    The response payload.

  • object

    A firearm, identified by slug and name.

  • string

    Slug of the firearm.

  • string

    Display name, as the maker writes it.

  • object[]

    Platforms this firearm belongs to, whose interfaces it inherits. Reached through its own memberships and its parent chain.

  • string

    Slug of the platform.

  • string

    Display name, as the maker writes it.

  • ResolvedInterface[]

    The mount interfaces resolved for this firearm, own rows first, then inherited.

  • string

    Where on the firearm the interface sits: muzzle, rear, top, bottom.

  • string

    Id of the interface standard, kind-prefixed, e.g. thread:1/2x28. Ids are never renamed; new spellings become aliases.

  • string

    Display name, as the maker writes it.

  • string

    What sort of interface it is: thread, rail, mag, stock_mount, optic_plate. Not a media kind: the shared registry filled this with silhouette/render until the consistency check caught it.

  • InterfaceSource

    Where an interface row on a firearm came from. curated is a person; inferred is the backfill, capped at 0.6 confidence; the inherited kinds came through the parent chain or a platform.

  • number

    How well evidenced this row is, 0 to 1. A minimum, not an average: an inferred row caps every fit computed through it, and min_confidence on the endpoint hides rows below a threshold.

  • string | null

    The parent firearm or platform this interface came from, or null when the firearm declares it itself.

  • string | null

    Free-text notes that do not belong in a specific field.

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