What does a collection tracker need from a price API?
Four things: a stable id for every card and printing, a current price for many cards at once, a daily series for the chart, and a way to turn the ids in someone's existing export into yours. The Flipzi Data API covers all four over REST, for Pokémon in English, Japanese and Chinese, One Piece, Magic, Yu-Gi-Oh!, Lorcana and the other games in GET /v1/catalog/games. Coverage differs by game; check market coverage before promising a price for every card.
The steps below are the calls in the order a tracker makes them. Every one can be tried without a key in the playground.
1. Store the right ids
A holding is a card id plus what makes that copy worth something different: grade, condition and quantity. Keep the Flipzi card_id as the foreign key, not the name.
| Field | Why it is on the holding |
|---|---|
card_id | A printing with its own market (a Master Ball pattern, an alternate art, a jumbo) has its own id. Pricing it as the base card gives the wrong value. |
grade | RAW for ungraded, or a code such as PSA_10. Graded values need Pro or above. |
finish, condition, language | Optional. They select a narrower figure on the sold-price endpoints (eBay sold prices by condition and language). |
quantity, purchase price | Yours. The API does not store user data. |
To find an id when a user adds a card by hand, search by what is printed on it. Set code and collector number are more reliable than a name:
curl --fail-with-body --get 'https://data.flipzi.io/v1/cards/search' \
--data-urlencode 'game=pokemon' \
--data-urlencode 'set_code=OBF' \
--data-urlencode 'number=125' \
-H "X-API-Key: $FLIPZI_KEY"
Add include_printings=true to list special printings as their own results. The printings and finishes reference explains which differences are an id and which are a parameter.
2. Import an existing collection
Most users arrive with a spreadsheet or an export from another app. GET /v1/cards/lookup resolves three kinds of foreign id, one unit each:
tcgplayer_id: the number in atcgplayer.com/product/<id>URL, any game.cardmarket_id: a Cardmarket idProduct, any game with Cardmarket products.pokemontcg_id: a pokemontcg.io id such assv3-125, English Pokémon.
curl --fail-with-body \
'https://data.flipzi.io/v1/cards/lookup?tcgplayer_id=254761' \
-H "X-API-Key: $FLIPZI_KEY"
An id that does not resolve answers 404, which costs no units. Put those rows in front of the user to match by hand instead of guessing: a wrong match values the wrong card for as long as the holding exists. A TCGplayer id resolves only when the product agrees with the card on name and collector number, so some valid-looking ids are refused on purpose.
3. Value the collection in bulk
Do not loop over single-card price calls. POST /v1/cards/bulk prices up to 25 (Basic), 100 (Pro), 500 (Ultra), 750 (Mega) ids in one request, one unit per id. This Node function prices any number of cards in batches and returns integer cents per id:
const API = 'https://data.flipzi.io';
const KEY = process.env.FLIPZI_KEY;
const BATCH = 25; // your plan's bulk cap
export async function priceCards(cardIds, { currency = 'eur', grade = 'RAW' } = {}) {
const prices = new Map();
for (let i = 0; i < cardIds.length; i += BATCH) {
const res = await fetch(`${API}/v1/cards/bulk`, {
method: 'POST',
headers: { 'X-API-Key': KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({ card_ids: cardIds.slice(i, i + BATCH), currency, grade }),
});
if (!res.ok) throw new Error(`Flipzi ${res.status}: ${await res.text()}`);
const { data, not_found } = await res.json();
for (const row of data) {
const price = row.prices[0]; // empty: no qualifying price
prices.set(row.requested_id ?? row.card_id, price ? price.price_cents : null);
}
for (const id of not_found) prices.set(id, undefined); // unknown id
}
return prices;
}
export function collectionValue(holdings, prices) {
let cents = 0, unpriced = 0;
for (const h of holdings) {
const p = prices.get(h.cardId);
if (p == null) { unpriced += h.quantity; continue; }
cents += p * h.quantity;
}
return { cents, unpriced };
}
Money is integer cents in the currency you ask for (eur or usd). One call prices one grade, so group holdings by grade and call once per group. Each price row also carries market, confidence and updated_at; store them with the figure so the app can say where a value came from and when.
4. Chart the history
For one card, GET /v1/cards/{card_id}/history returns a daily series and a summary:
curl --fail-with-body \
'https://data.flipzi.io/v1/cards/0908653a-ce24-4d7e-811e-78c2935bd822/history?period=90d¤cy=eur' \
-H "X-API-Key: $FLIPZI_KEY"
{ "data": {
"grade": "RAW", "currency": "eur", "period": "90d",
"points": [ { "date": "2026-11-16", "price_cents": 7900 },
{ "date": "2026-11-17", "price_cents": 7900 } ],
"summary": { "min_cents": 7900, "max_cents": 7900, "avg_cents": 7900, "change_pct": 0 }
} }
Shape of a live response, abridged to two points.
Basic reaches 30 days of history and Pro and above reach all of it. The value of a whole collection over time is not something the API can compute, because it does not know what your user held on each day. Write one row per user per day from the bulk valuation and chart that. The price history guide covers gaps and how to draw them honestly.
5. Keep prices fresh without repricing everything
Reprice the distinct cards held across all users once a day, not every holding of every user. On Pro and above, GET /v1/cards/updates goes further: it lists the cards whose price changed since a time in the last 7 days, at one unit per 25 rows, so a nightly job only touches what moved.
curl --fail-with-body --get 'https://data.flipzi.io/v1/cards/updates' \
--data-urlencode 'since=2026-11-16T00:00:00Z' \
--data-urlencode 'game=pokemon' \
--data-urlencode 'limit=500' \
-H "X-API-Key: $FLIPZI_KEY"
Follow next_cursor while has_more is true and upsert by card id and grade: delivery is at least once, so a row can appear twice. The feed covers every changed card in the game you filter by; keep the rows for cards your users hold and drop the rest. Keeping a catalogue in sync has the full loop.
A unit budget, worked
Units follow distinct cards, not users. Take 3,000 distinct cards held across your user base, repriced once a day through the bulk call:
- 3,000 cards × 30 days = 90,000 units a month, which fits Pro (100,000 units a month).
- The same job driven by the updates feed pays one unit per 25 changed rows instead, plus the bulk units for the cards that actually moved.
- Searches, lookups and history calls from users cost one unit each on top.
Bulk calls are priced before they run: a batch that would exceed the remaining allowance is refused with 429 rather than half served. GET /v1/meta/usage reports what is left and costs nothing. Plans and unit costs are on API pricing.
Cards without a price
A card can be in the catalogue and have no current price: too few observations, or a printing the source does not list separately. The bulk call returns it with an empty prices list. That is not a zero. Show "no price" and leave it out of the total, with a count of unpriced cards beside the figure, as collectionValue above does. A total that silently treats missing as zero drops when a price disappears and jumps when it returns.
Check confidence before you show a number as firm, and show updated_at next to it. Do not present an old observation as today's price.
Build the tracker on a free key
Every request on this page works on the free plan within its allowance. Choose a paid plan when the app has users.
Get a free API key Try it in the playground Compare API plans