GunSpec

Categories

Browse firearms by category (pistol, rifle, shotgun, SMG, etc.). Categories provide a high-level classification for filtering and organization.

Auth RequiredExplorer+

Returns every firearm category that holds at least one firearm. Empty categories are omitted.

GET/v1/categories

  • stringheaderrequired

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

  • Category[]

    The response payload.

  • string

    URL-safe slug identifying the category, e.g. pistol.

  • string

    Display name, as the maker writes it.

  • string | null

    Prose summary of the record, where one has been written.

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

Auth RequiredExplorer+

Returns the firearms belonging to a category.

GET/v1/categories/{slug}/firearms

  • stringheaderrequired

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

  • stringrequired

    Category slug

    Accepts
    a lowercase slug: letters, digits and hyphens
    Example

  • integerdefault1

    Page number, from 1 to 10,000

    Range
    1 – 10000
    Example
  • integerdefault20

    Items per page (max 100)

    Range
    1 – 100
    Example

  • CategoryFirearmListItem[]

    One page of results

  • string

    URL-safe slug identifying the firearm, e.g. glock-17-gen5.

  • string

    Display name, as the maker writes it.

  • string

    Slug of the manufacturer that makes it. Resolve against /v1/manufacturers/{id}.

  • integer | null

    Year it entered production or service. Null where the date is disputed or unknown.

  • FirearmStatus | null

    Production status, one of in_production, discontinued, out_of_production, in_service, limited_production, prototype. Discontinued records are kept deliberately: a rifle built in 2004 wears parts nobody sells today.

  • string | null

    How the action cycles: short_recoil, gas_operated, blowback, bolt_action and so on. An open vocabulary: the values in use are published on the schema as x-gunspec-vocabulary, and GET /v1/firearms/action-types is the live list.

  • string | null

    ISO 3166-1 alpha-2 code of where it was designed, e.g. AT.

  • string | null

    Line-art silhouette, or null where none has been drawn.

  • string | null

    GLB model, or null where none is on file.

  • InlineMediaItem[]

    Every image this firearm has, silhouette first. Empty when none are on file.

  • integer

    Autoincrementing image id.

  • string

    Absolute, directly fetchable URL.

  • MediaKind

    What kind of asset a media row is.

  • string | null

    Alt text, where one has been written. Null otherwise, so do not render an empty string.

  • integer | null

    Pixel width, where it is known.

  • integer | null

    Pixel height, where it is known.

  • number

    Current page number

  • number

    Items per page

  • number

    Total matching records (Builder and above)

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