Firearms

List every asset for a firearm

One resource for every kind of asset a firearm has, from line-art silhouette and generated render to photograph, schematic and 3D model, returned in a single shape.

Replaces having to learn /images, /silhouette and /schematics separately; those remain available and unchanged. Every url is absolute and directly fetchable, and every item carries the credit block (source, author, licence) needed to reuse the asset legally.

Also lists a feature_icon for each of the firearm's features that has a drawn icon, in the order of features, with feature naming the tag it illustrates. The whole icon set is at /v1/features/icons.

Available on every plan. Requires an API key; Explorer keys receive a reduced field set.

get/v1/firearms/{id}/media

Request

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

Path parameters

idstring required

Resource slug ID

Query parameters

kind'silhouette' | 'render' | 'photo' | 'schematic' | 'model' | 'feature_icon'

Return only one kind of asset

Response

List every asset for a firearm

successboolean required

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

Example response

{
  "success": true,
  "data": [
    {
      "id": 2572,
      "feature": "Picatinny rail",
      "mimeType": "image/png",
      "width": 1024,
      "height": 1024,
      "alt": "AK-47, left profile",
      "url": "https://api.gunspec.io/v1/firearms/ak-47/media/2572",
      "credit": {
        "source": "Wikimedia Commons",
        "author": "Askild Antonsen",
        "license": "CC BY 2.0"
      }
    }
  ]
}

Changes

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