Firearm Discovery
Get a random firearm
Returns one firearm at random, optionally constrained by category or country. Responses are sent with Cache-Control: no-store so every call is a fresh draw.
Available on every plan. Requires an API key; Explorer keys receive a reduced field set.
get/v1/firearms/random
Request
- Base URL: https://api.gunspec.io
- URL: https://api.gunspec.io/v1/firearms/random
- Auth: one of:
- API key in header X-API-Key
- HTTP bearer
Query parameters
categorystring
Restrict the draw to a category slug
countrystring
Restrict the draw to an ISO country code
Response
Get a random firearm
Example response
{
"success": true,
"data": {
"id": "glock-g17-gen5",
"name": "Glock 17 Gen5",
"manufacturer_id": "glock",
"category_id": "pistol",
"year_introduced": 2017,
"status": "in_production",
"country_of_origin": "AT",
"action_type": "short_recoil",
"weight_empty_g": 625,
"barrel_length_mm": 114
}
}Changes
No recorded changes to this operation across all 1 revision of this API.