Access AmmoIQ ballistics data programmatically. Query calibers, ammo types, live pricing, and manage your gun profiles and loadouts via a simple REST-style API.
All API requests require an API key. Include your key in the Authorization header as a Bearer token:
Authorization: Bearer amiq_your_api_key_here
API keys are available to premium subscribers. You can create and manage keys from your API Keys dashboard.
Keep your key secret. Do not expose API keys in client-side code, public repositories, or browser requests. Use server-side code to make API calls.
https://ammoiq.com/api/trpc
All endpoints use the tRPC protocol. Queries use GET requests with URL-encoded input; mutations use POST with JSON body.
Available with READ_ONLY or FULL permission keys.
Require a FULL permission key.
API keys are limited to a fixed number of requests per day (UTC reset). The default limit is 1,000 requests per day.
| Limit Type | Default | Notes |
|---|---|---|
| Daily requests | 1,000 | Resets at midnight UTC |
| Burst rate | 200/min | Standard premium rate limit |
When you exceed the daily limit, the API returns 429 Too Many Requests with a JSON body indicating usage and limit.
# List all calibers curl -H "Authorization: Bearer amiq_your_key_here" \ "https://ammoiq.com/api/trpc/calibers.list" # Search ammo by caliber curl -H "Authorization: Bearer amiq_your_key_here" \ "https://ammoiq.com/api/trpc/search.ammo?input=%7B%22query%22%3A%22308%22%7D"
const API_KEY = process.env.AMMOIQ_API_KEY;
const BASE = 'https://ammoiq.com/api/trpc';
// List all calibers
const res = await fetch(`${BASE}/calibers.list`, {
headers: { Authorization: `Bearer ${API_KEY}` },
});
const { result } = await res.json();
console.log(result.data);
// Search ammo
const query = encodeURIComponent(JSON.stringify({ query: '308' }));
const searchRes = await fetch(
`${BASE}/search.ammo?input=${query}`,
{ headers: { Authorization: `Bearer ${API_KEY}` } },
);
const searchData = await searchRes.json();
console.log(searchData.result.data);// 401 Unauthorized
{ "error": "Invalid API key" }
// 429 Rate Limit Exceeded
{
"error": "Daily API key limit exceeded",
"used": 1000,
"limit": 1000
}