Firearm Discovery

Rank by composite power rating

Returns firearms scored on a 0-100 composite of muzzle energy (30%), effective range (25%), rate of fire (20%), magazine capacity (15%), and mobility (10%). Firearms without a recorded muzzle energy are excluded.

Requires Builder tier or higher.

get/v1/firearms/power-rating

Request

  • Base URL: https://api.gunspec.io
  • URL: https://api.gunspec.io/v1/firearms/power-rating
  • Auth: one of:
    • API key in header X-API-Key
    • HTTP bearer

Query parameters

categorystring

Restrict the ranking to a category slug

pageinteger

Page number, from 1 to 10,000

per_pageinteger

Items per page (max 100)

Headers

If-None-Matchstring

The ETag from a previous response. If the body would be byte-identical, the API answers 304 Not Modified with no body. A 304 counts toward the per-minute rate limit but not the daily request allowance.

Response

Rank by composite power rating

successboolean required

Always true on a successful response. Every error carries false and an error object instead.

Example response

{
  "success": true,
  "data": [
    {
      "id": "browning-m3m",
      "name": "Browning M3M",
      "manufacturerId": "fn-herstal",
      "categoryId": "machine-gun",
      "powerRating": 86.46,
      "breakdown": {
        "energy": 30,
        "range": 23.13,
        "fireRate": 18.33,
        "capacity": 15
      }
    }
  ],
  "pagination": {
    "page": 1,
    "per_page": 20,
    "limit": 20,
    "total": 42,
    "totalPages": 3
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.