Compatibility
List firearms an attachment fits
The reverse lookup: every catalogued firearm the attachment fits, with fit type, confidence and reason. Candidates come from the interface index and are confirmed by the same engine as the forward endpoint, so the two never disagree. meta.universal is true for an item with no requirements and no ratings (a sling), in which case the whole catalog is listed; meta.truncated is true when the candidate set hit its cap.
Requires Studio tier or higher.
get/v1/attachments/{id}/firearms
Request
- Base URL: https://api.gunspec.io
- URL: https://api.gunspec.io/v1/attachments/{id}/firearms
- Auth: one of:
- API key in header X-API-Key
- HTTP bearer
Path parameters
idstring required
Attachment slug
Query parameters
pageinteger
Page number, from 1 to 10,000
per_pageinteger
Items per page (max 100)
Response
List firearms an attachment fits
Example response
{
"success": true,
"data": [
{
"id": "ak-74m",
"name": "AK-74M",
"confidence": 1,
"reason": "Mounts on AK-100 series polymer side-folder trunnion (rear)",
"via": [
{
"position": "rear",
"standardId": "stock:ak-100-folder"
}
],
"adapter": {
"id": "rs-regulate-ak-303m",
"name": "RS Regulate AK-303M"
},
"manufacturer": {
"id": "magpul",
"name": "Magpul Industries"
},
"category": "Assault Rifle",
"images": [
{
"id": 2572,
"url": "https://api.gunspec.io/v1/firearms/ak-47/images/2572",
"alt": "AK-47 right profile",
"width": 1536,
"height": 1024
}
],
"svgLineArtUrl": "https://api.gunspec.io/v1/firearms/ak-74m/media/silhouette",
"yearIntroduced": 1991
}
],
"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.