Index every firearm that has imagery
Returns each firearm with a render or photograph, and that imagery, as a three-field row. Built for media grids and mirroring jobs: paging the full catalogue with has_image=true returns fifteen fields per row, twelve of which such a caller discards. Silhouettes are excluded; every firearm has one. per_page allows up to 1000 here for the same reason.
Every response carries meta.fingerprint, which changes when imagery is added or removed. A client holding a cached copy of this collection can request a single row and compare it, rather than downloading the collection to discover whether it changed.
Available on every plan. Requires an API key; Explorer keys receive a reduced field set.
Request
- Base URL: https://api.gunspec.io
- URL: https://api.gunspec.io/v1/firearms/media
- Auth: one of:
- API key in header X-API-Key
- HTTP bearer
Query parameters
Page number
Firearms per page
Restrict the images on each row to one kind
Only these firearms, as a comma-separated list of ids (at most 24). A firearm with no imagery is left out of the answer.
Headers
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
Index every firearm that has imagery
Example response
{
"success": true,
"data": [
{
"id": "ak-47",
"name": "AK-47",
"images": [
{
"id": 2572,
"url": "https://api.gunspec.io/v1/firearms/ak-47/images/2572",
"alt": "AK-47 right profile",
"width": 1536,
"height": 1024
}
]
}
],
"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.