Tools
Get a verified code sample
- 1
Eine Person fragt
- Show me how to list firearms from the GunSpec API in Python.
- 2
Der Assistent ruft das Tool auf
tools/calljson{ "name": "gunspec_code_sample", "arguments": { "path": "/v1/firearms", "method": "GET", "language": "python" }} - 3
Der Server antwortet
Ergebnisjson{ "method": "GET", "path": "/v1/firearms", "tier": "explorer", "docsUrl": "https://docs.gunspec.io/en/api/firearms/list", "language": "python", "keyNote": "Replace your_key with a GunSpec API key, sent as the X-API-Key header (Authorization: Bearer also works).", "samples": [ { "label": "Python (requests)", "code": "import requests\n\nheaders = {\"X-API-Key\": \"your_key\"}\nres = requests.get(\"https://api.gunspec.io/v1/firearms?category=pistol\", headers=headers)\ndata = res.json()[\"data\"]\nprint(data)", "verification": { "status": "passed", "checkKind": "executed", "ranAt": "2026-10-19T09:23:32.942Z" }, "note": null } ]}Am 22. Okt. 2026 von der Live-API erfasst.