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

Get available filter options for the firearms list endpoint. Returns distinct values for manufacturers, calibers, categories, action types, countries, and statuses that can be used as filter values.

filterOptions(): Promise<APIResponse<FilterOptions>>
GET/v1/firearms/filter-options

  • stringheaderrequired

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

  • object

    The distinct filter values currently present in the catalog.

  • object[]

    Manufacturers with at least one firearm.

  • string

    Slug of the manufacturer, and the value to send as manufacturer.

  • string

    Display name, as the maker writes it.

  • string | null

    ISO 3166-1 alpha-2 code of where they are based, for grouping the list by country.

  • object[]

    Categories with at least one firearm.

  • string

    Slug of the category, and the value to send as category. Keyed slug here rather than id, unlike the other lists.

  • string

    Display name, as the maker writes it.

  • object[]

    Cartridges chambered by at least one firearm.

  • string

    Slug of the cartridge, and the value to send as caliber.

  • string

    Display name, as the maker writes it.

  • object[]

    Operating actions present in the catalog.

  • string

    The action type as stored, and the value to send as action_type.

  • string

    Display name, as the maker writes it.

  • object[]

    JSON array of notable features, as a string. The same vocabulary /v1/firearms/by-feature filters on.

  • string

    The feature as stored, and the value to send as feature to /v1/firearms/by-feature.

  • string

    Display name, as the maker writes it.

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