Repository navigation
API Reference
Bindarr provides a clean RESTful API for reading collection metrics, pulling inventory data, or integrating with external finance dashboards, Home Assistant widgets, and custom scripts.
All API requests (except /api/health and /api/shared/:token) require authentication via an HTTP Authorization header:
Authorization: Bearer <YOUR_API_KEY_OR_SESSION_TOKEN>For external scripts and dashboards, generate a dedicated read-only API key under Settings → API Keys.
-
Security Constraint: External API keys are permanently restricted to HTTP
GETrequests only. AnyPOST,PUT, orDELETEattempt will return403 Forbidden. -
Admin Isolation: External keys cannot access administrative routes (
/api/admin/*).
GET /api/healthUnauthenticated health probe used by container orchestrators and Docker health checks.
{
"status": "ok"
}GET /api/stats/networth
GET /api/stats/networth?game=pokemon
GET /api/stats/networth?game=mtgReturns summarized portfolio value, total cards, acquisition cost, and financial gain/loss metrics.
curl -H "Authorization: Bearer YOUR_API_KEY" \
http://localhost:3001/api/stats/networth{
"totalValue": 4210.55,
"totalSpent": 2980.00,
"gain": 1230.55,
"gainPct": 41.3,
"totalCards": 812,
"uniqueEntries": 604,
"byGame": {
"pokemon": {
"cards": 500,
"value": 3100.20
},
"mtg": {
"cards": 312,
"value": 1110.35
}
},
"currencies": ["USD"],
"asOf": "2026-08-20T17:00:00.000Z"
}GET /api/statsReturns full collection analytics including rarity distributions, card type breakdowns, and set completion percentages.
{
"totalCards": 812,
"totalValue": 4210.55,
"rarityBreakdown": [
{ "rarity": "Illustration Rare", "count": 45 },
{ "rarity": "Special Illustration Rare", "count": 12 },
{ "rarity": "Mythic", "count": 28 }
],
"typeBreakdown": [
{ "type": "Pokémon", "count": 380 },
{ "type": "Trainer", "count": 120 },
{ "type": "Creature", "count": 190 },
{ "type": "Instant", "count": 60 }
]
}GET /api/collection
GET /api/collection?game=pokemon&location_id=1Returns your card inventory including physical storage locations, condition, printing, and market valuation.
[
{
"id": 104,
"card_id": "sv1-198",
"name": "Gardevoir ex",
"printed_name": "Gardevoir ex",
"set_id": "sv1",
"set_name": "Scarlet & Violet",
"number": "198",
"rarity": "Special Illustration Rare",
"language": "English",
"condition": "Near Mint",
"printing": "Holofoil",
"quantity": 1,
"market_value": null,
"price_normal": null,
"price_holofoil": 38.50,
"price_currency": "USD",
"location_name": "Binder 1",
"compartment_label": "Page 4",
"position": 2000,
"grader": "PSA",
"grade": 10,
"cert_number": "12345678"
}
]GET /api/cards/:id/price-historyReturns historical price data points for a specific card over 7-day, 30-day, and 90-day windows.
[
{ "date": "2026-08-01", "price": 32.00 },
{ "date": "2026-08-10", "price": 35.50 },
{ "date": "2026-08-20", "price": 38.50 }
]GET /api/shared/:share_tokenPublic unauthenticated read-only endpoint returning public collection cards for an enabled share token.
| Status Code | Meaning |
|---|---|
200 OK |
Request succeeded. |
400 Bad Request |
Invalid query parameters or body format. |
401 Unauthorized |
Missing or expired Bearer session token. |
403 Forbidden |
Read-only API key attempted a non-GET operation or accessed an admin route. |
404 Not Found |
Requested card, location, deck, or user does not exist. |
429 Too Many Requests |
Rate limit exceeded. |
503 Service Unavailable |
Scanning attempted before ONNX models or catalogs were initialized (notBuilt). |
Bindarr is licensed under the MIT License.
Need help? Check Troubleshooting & FAQ or open an issue on GitHub.