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.

Authentifizierung erforderlichStudio+

Attachments that fit, grouped by category, with the evidence for each. Studio.

getAttachments(id: string, params?: FirearmAttachmentsParams): Promise<APIResponse<FirearmAttachments>>
GET/v1/firearms/{id}/attachments

  • stringHeadererforderlich

    Ihr API-Schlüssel. Authorization: Bearer <key> wird ebenfalls akzeptiert.

  • stringerforderlich

    Firearm slug

    Akzeptiert
    a lowercase slug: letters, digits and hyphens
    Beispiel

  • string

    Attachment category

    Max. Länge
    100
    Beispiel
  • string

    Manufacturer slug

    Max. Länge
    100
    Beispiel
  • stringstandardcompatible

    compatible (default) or all to include blocked candidates with blockedBy

    Akzeptiert
    Beispiel
  • numberstandard0

    Hide fits computed through interfaces below this confidence

    Bereich
    0 – 1
    Beispiel
  • string

    Restrict to one seller. me resolves to the vendor your key belongs to

    Max. Länge
    64
    Beispiel
  • boolean

    Drop anything that seller does not currently stock. Needs a resolvable vendor, and yields nothing without one

  • boolean

    Attach each item's live offers under offers, keyed by attachment id, so price and stock render beside fitment in one call

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

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

  • object[]

    Fitting attachments grouped by category, so a builder UI renders one panel per slot.

  • string

    Attachment category this group holds.

  • AttachmentFit[]

    The rows this response carries.

  • object

    Fitting attachments per category

  • object | null

    With with_offers=true, live offers keyed by attachment id, the same rows /v1/attachments/{id}/offers returns; null when not requested.

  • integer

    Total records matching the query across every page.

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

Mindeststufe
Studio+
Monatskontingent
150,000/mo
Anfragerate
120/min
Tageslimit
10,000

Die Werte gelten für die Mindeststufe dieses Endpunkts. Höhere Stufen erhöhen alle Limits.