Install
Both packages are called flipzi:
npm for TypeScript and JavaScript,
PyPI for Python.
npm install flipzi
pip install flipzi
You need a Data API key. Create a free account, verify your email
and create a key on the keys page. It starts with fz_live_ and needs no card.
Both clients read it from the FLIPZI_API_KEY environment variable if you don't pass it.
A first price in three lines
TypeScript / JavaScript
import { Flipzi } from 'flipzi';
const flipzi = new Flipzi({ apiKey: 'fz_live_...' });
console.log((await flipzi.price('0908653a-ce24-4d7e-811e-78c2935bd822')).data.prices[0].price_formatted);
Python
from flipzi import Flipzi
flipzi = Flipzi(api_key="fz_live_...")
print(flipzi.price("0908653a-ce24-4d7e-811e-78c2935bd822")["data"]["prices"][0]["price_formatted"])
Python also has AsyncFlipzi, with the same methods for asyncio code.
Finding a card id
Prices are looked up by Flipzi card id. Search for it by name, or by set code and collector number:
const { data } = await flipzi.search({ q: 'charizard ex', game: 'pokemon' });
const card = data[0]; // card.id, card.name, card.set.name, card.number
card = flipzi.search("charizard ex", game="pokemon")["data"][0]
More on matching cards, including set codes and other catalogue ids: Finding a card.
One method per endpoint
Every Data API endpoint has a method, and parameters keep the API's own names, so the
API reference applies word for word. Responses are the API's JSON, typed: the types are
generated from the published OpenAPI spec (TypeScript types, Python TypedDicts).
| What you want | TypeScript | Python |
|---|---|---|
| Current price per grade | price(id) | price(id) |
| eBay sold prices, summary | sold(id) | sold(id) |
| eBay sold prices per domestic site | marketplaces(id) | marketplaces(id) |
| Individual sales | sales(id), iterSales(id) | sales(id), iter_sales(id) |
| Cardmarket offers by condition | cardmarket(id) | cardmarket(id) |
| Price history | history(id) | history(id) |
| Many cards at once | bulkPrices(ids) | bulk_prices(ids) |
| Everything that changed since a time | iterUpdates({ since }) | iter_updates(since) |
The full list (catalogue, printings, analytics, PSA population, movers, sealed-box comparisons, usage) is in each package's README on npm and PyPI. Which plan each endpoint needs is on the pricing page.
What the clients handle for you
- Retries. A
429or5xxis retried with backoff, waitingRetry-Afterwhen the API sends one. A spent monthly quota is never retried. Refused requests are not billed. - Pagination.
iterSets,iterSearch,iterSalesanditerUpdates(Python:iter_*) walk every page for you. - Bulk. Pass any number of ids. The client splits them to your plan's bulk cap and merges the answers into one response.
- Quota. Units and requests left come from the response headers:
flipzi.lastResponse.quotaRemaining(Python:flipzi.last_response.quota_remaining).usage()gives the same figures at no cost. - Enums. Marketplace, condition, currency, game, finish and period values are provided as
constants, so
Marketplace.EBAY_DEautocompletes.
Errors
Every failure raises one error type, FlipziError, built from the API's error body. It has the HTTP
status, a machine-readable code such as PLAN_FEATURE_LOCKED, the
details (including the upgrade path when a plan doesn't include an endpoint) and the
requestId / request_id to quote to support.
from flipzi import FlipziError
try:
flipzi.sold(card_id)
except FlipziError as e:
print(e.status, e.code, e.message, e.request_id)
Examples
Each package ships two runnable examples:
- Price my collection. Values a list of cards with quantities and grades in one bulk request per grade, and falls back to one call per card on the free plan.
- eBay DE vs UK. German and UK sold prices for one card, side by side, per grade and language,
from a single
marketplacescall. See country-specific eBay sold prices for what the numbers mean.
Try it before you decide
Want to see the data first? The playground runs real queries against production, no key needed.
Open the playground Compare all 13 APIs Switching? Migration guides