Free Gun and Ammo Data Tools for Developers

GunsNPrices compares gun and ammo prices across 40+ US online stores. Every store writes product titles its own way (G19 GEN5 9MM 15RD FS, Federal 308 150gr ... 20rds), so to show the same product from different stores on one page we built a parser that reads those titles: brand and model, caliber, magazine capacity, barrel length, rounds per box and cost per round. It knows 293 calibers with the spellings retailers use and the models of 50 brands.

We publish this parser and its data for free: libraries for eight programming languages, plugins for website builders, design tools and code editors, and open datasets. The source code is on GitHub. The parser runs inside your own app or site and does not send anything to our servers.

On this page: Libraries · Website plugins · Joomla · Design and no-code · Editors and apps · AI assistants · Open data · For shoppers

Title parser libraries

Every version has the same features and passes the same set of more than 1,000 test titles. For example, Glock 19 Gen 5 MOS 9mm 4.02in 15rd Pistol PA195S203MOS gives the model Glock 19 Gen 5 MOS, the caliber 9×19mm Parabellum, a capacity of 15 rounds and a 4.02 in barrel. For Federal American Eagle 5.56x45mm 55gr FMJ 1000 Rounds at $449.99 it works out $0.45 per round.

Website and CMS plugins

Show a spec table from a product title, the cost per round of an ammo box or a caliber badge on your site.

Firearm Specs for Joomla

Firearm Specs reads the specs of firearms and ammunition from product titles and shows them in Joomla articles. It works on Joomla 5.0 and later, including Joomla 6, with PHP 8.1 or later, and needs no other extensions. The package contains three extensions:

  • Content - Firearm Specs (plugin) replaces the {firearmspecs} and {costperround} tags in articles, category descriptions and Custom modules.
  • Cost per Round Calculator (site module): visitors enter the price of a box and the round count, or the price and the ammo title, and get the cost per round. It works without JavaScript.
  • GunsNPrices Parser Library, shared by the plugin and the module.

Install. Download pkg_firearmspecs_v1.0.0.zip from the releases page and upload it in System > Install > Extensions. The plugin is enabled after the first installation; its settings are in System > Manage > Plugins (search for "Firearm Specs"). For the calculator, go to Content > Site Modules > New, choose Cost per Round Calculator and pick a position. Updates appear in System > Update > Extensions like those of other extensions.

Use. Put a product title between the tags:

  • {firearmspecs}Glock 19 Gen 5 MOS 9mm 4.02in 15rd Pistol{/firearmspecs} shows a table: model Glock 19 Gen 5 MOS, caliber 9×19mm Parabellum, capacity 15 rounds, barrel length 4.02 in.
  • {firearmspecs layout="inline"}Mossberg 590A1 Tactical 12ga 20" 9rd{/firearmspecs} shows the specs in one line of text.
  • {costperround price="18.99"}Federal American Eagle 9mm 115gr FMJ 50rd{/costperround} shows "$0.38 per round".

Specs the title does not contain are left out. The plugin settings choose the barrel length unit, number format, currency and whether caliber names link to their GunsNPrices price pages (off by default). The full list of tag attributes is in the README. Questions and bug reports: GitHub issues.

Design and no-code tools

  • Framer: Gun & Ammo Data fills a CMS collection with calibers or sample guns and ammo with prices, and works out the cost per round on the canvas.
  • Notion: Ammo & Firearm Inventory, a template for tracking ammo with cost per round and rounds left, firearms with round counts, and range trips.
  • Figma and FigJam: a plugin that fills mockups with real gun and ammo data and normalizes caliber names.
  • Sketch: a plugin with real gun and ammo models, titles, prices, calibers and cost per round for mockups.
  • Bubble: Gun & Ammo Title Parser reads gun and ammo titles in Bubble apps: an element that works in the browser and server-side actions for backend workflows and imports (demo).

Code editors and desktop apps

  • VS Code: Gun & Ammo Title Parser on the Visual Studio Marketplace and Open VSX turns listing titles into tables, JSON or CSV and normalizes caliber names.
  • JetBrains IDEs: Gun & Ammo Title Parser for IntelliJ IDEA, PyCharm, PhpStorm, WebStorm and other JetBrains IDEs.
  • Obsidian: GunsNPrices makes spec tables from listing titles and keeps an ammo log with cost per round.
  • Raycast: an extension to search 293 calibers, read listing titles and work out the cost per round.

AI assistants

gunsnprices-mcp is an MCP server for AI assistants such as Claude and Cursor. It reads gun and ammo titles, identifies models and calibers, works out the cost per round and points to the GunsNPrices pages that compare current prices. It runs locally and needs no API key (source).

Open data

The caliber list and the model dictionary behind the parser are published as open datasets under the CC BY 4.0 license: 293 calibers with the spellings US retailers use, and 4,037 gun models of 50 brands.

For shoppers

If you just want to compare prices, use the GunsNPrices app for iPhone or the Firefox extension, which shows prices from other stores while you browse a gun or ammo store.

Questions and bug reports

Open an issue in the GitHub repository of the tool, or write to info@gunsnprices.com.