You need time-series prices for a specific trading card to power a valuation, P&L, or alerting workflow this week. By the end of this guide, you’ll query a card by name, grab its card_id, and fetch grade-specific historical prices you can drop straight into your finance dashboards or models.
What you’ll build: a focused card pricing pipeline
This tutorial uses the Sports Card and Trading Card API on Zyla API Hub to: (1) search for a card using a free-text query and (2) fetch time-series prices for a given grade (e.g., PSA 10) over a chosen window. The API returns compact JSON that’s easy to persist to your datastore and analyze like any other asset price series.
Developers use this API to power valuation pages, alternative asset portfolios, comps tracking, and alerting on price moves. You bring the finance logic; the API supplies searchable inventory metadata and sale-price time series for specific cards and grades.
Getting started on Zyla API Hub
Open the API page and subscribe to get an API key. Zyla runs on a subscription + quota model (not pay-per-call). The first API typically includes a 7-day trial or 50 requests; check the API page for current access options and pricing. Your Authorization header will look like: Authorization: Bearer YOUR_API_KEY.
- Start 7-day trial on Sports Card and Trading Card API
- Explore more than 10,000 public APIs on Zyla API Hub
API overview and workflow
This API exposes two endpoints you’ll chain together:
- Card Search (GET): Search by a single string, returning an array of matching cards with metadata and a card_id field.
- Get Card Prices (GET): Given a card_id, grade, and time window (days), return a JSON time series of prices and closing_date values.
In a finance integration, step 1 resolves identifiers (card_id) similar to tickers or CUSIPs, and step 2 pulls the historical price series used in analytics, charting, or risk controls.
Endpoint: Card Search
Search by a concise, single-string query. Include player and set details for tighter matches. The endpoint returns a JSON list of candidate cards; choose the one you need and capture its card_id.
- Method: GET
- URL: https://zylalabs.com/api/2511/sports-card-and-trading-card-api/2494/card-search
- Required query parameter:
- search (string): e.g., Lebron James
Copy-paste cURL:
curl -s -X GET "https://zylalabs.com/api/2511/sports-card-and-trading-card-api/2494/card-search?search=Lebron+James" \
-H "Authorization: Bearer YOUR_API_KEY"
Official sample JSON response:
[
{
"description": "LeBron James 2003 Topps Basketball",
"player": "Lebron James",
"set": "2003 Topps Basketball",
"number": "221",
"variant": "Base",
"card_id": "1588290260620x609083468203688000",
"image": "//s3.amazonaws.com/appforest_uf/f1588290324330x374737296708651100/2003-Topps-Basketball-LeBron-James-graded.jpg",
"category": "Basketball",
"category_group": "Sports Cards",
"set_type": "Topps Basketball"
},
{
"description": "LeBron James 2003 Upper Deck Rookie Exclusives Basketball",
"player": "Lebron James",
"set": "2003 Upper Deck Rookie Exclusives Basketball",
"number": "1",
"variant": "Base",
"card_id": "1593982609906x272877681796710400",
"image": "//s3.amazonaws.com/appforest_uf/f1593982606419x316822824595257800/2003-Upper-Deck-Rookie-Exclusives-Lebron-James-1.jpg",
"category": "Basketball",
"category_group": "Sports Cards",
"set_type": "Upper Deck Rookie Exclusives Basketball"
},
{
"description": "LeBron James 2025 Topps Chrome Cactus Jack Basketball",
"player": "LeBron James",
"set": "2025 Topps Chrome Cactus Jack Basketball",
"number": "46",
"variant": "Base",
"card_id": "1782184797693x851477815192830800",
"image": "//942284f33c575895b4be9de571ca6e40.cdn.bubble.io/d112/f1766768512710x492230808547762700/resize",
"category": "Basketball",
"category_group": "Sports Cards",
"set_type": "Topps Chrome Cactus Jack Basketball"
},
{
"description": "LeBron James 2003 Topps Chrome Basketball",
"player": "Lebron James",
"set": "2003 Topps Chrome Basketball",
"number": "111",
"variant": "Base",
"card_id": "1586412050491x786559417729941500",
"image": "//942284f33c575895b4be9de571ca6e40.cdn.bubble.io/d112/f1766768512710x492230808547762700/resize",
"category": "Basketball",
"category_group": "Sports Cards",
"set_type": "Topps Chrome Basketball"
},
{
"description": "LeBron James 2024 Panini Prizm Basketball",
"player": "LeBron James",
"set": "2024 Panini Prizm Basketball",
"number": "130",
"variant": "Base",
"card_id": "1740403688997x505339465151470000",
"image": "//942284f33c575895b4be9de571ca6e40.cdn.bubble.io/d112/f1757384268822x692013733346557700/resize",…
Fields you’ll actually use now:
- description, set, number, variant: confirm you have the correct card.
- card_id: the identifier you’ll pass into the pricing endpoint.
Endpoint: Get Card Prices
Fetch grade-specific prices as a date-indexed series for a chosen window of days. Use this to calculate returns, moving averages, drawdowns, or price alerts like you would for equities or crypto.
- Method: GET
- URL: https://zylalabs.com/api/2511/sports-card-and-trading-card-api/2495/get-card-prices
- Required query parameters:
- card_id (string): from Card Search results.
- days (string): window length (e.g., 90).
- grade (string): e.g., PSA 10.
Copy-paste cURL:
Example JSON response:
[
{
"closing_date": "2026-08-03T23:59:00.000Z",
"Grade": "PSA 10",
"card_id": "1586412050491x786559417729941500",
"price": "16150.00"
},
{
"closing_date": "2026-08-01T23:59:00.000Z",
"Grade": "PSA 10",
"card_id": "1586412050491x786559417729941500",
"price": "18250.00"
},
{
"closing_date": "2026-07-31T23:59:00.000Z",
"Grade": "PSA 10",
"card_id": "1586412050491x786559417729941500",
"price": "17900.00"
},
{
"closing_date": "2026-07-27T23:59:00.000Z",
"Grade": "PSA 10",
"card_id": "1586412050491x786559417729941500",
"price": "17303.00"
},
{
"closing_date": "2026-07-21T23:59:00.000Z",
"Grade": "PSA 10",
"card_id": "1586412050491x786559417729941500",
"price": "17373.00"
},
{
"closing_date": "2026-07-17T23:59:00.000Z",
"Grade": "PSA 10",
"card_id": "1586412050491x786559417729941500",
"price": "15337.20"
},
{
"closing_date": "2026-07-15T23:59:00.000Z",
"Grade": "PSA 10",
"card_id": "1586412050491x786559417729941500",…
What to note:
- closing_date is ISO 8601 with Z suffix (UTC). Treat it as the period close timestamp.
- price is returned as a string. Parse to decimal/BigNumber for finance-safe arithmetic.
- Grade and card_id echo your inputs for traceability.
Putting it together: resolve card_id then fetch prices
1) Resolve the precise card
Search broadly (e.g., “Lebron James”) or include set/year/variant to tighten matches. Pick the entry whose description and set match your inventory, then copy its card_id.
2) Pull the time-series for a grade
Decide on your holding’s grade (e.g., “PSA 10”) and lookback window in days. Call the Get Card Prices endpoint and plot closing_date vs. price, or compute your financial metrics (CAGR, volatility, peak-to-trough drawdown, rolling medians).
Code: Python example to fetch and normalize prices
The example below calls the Get Card Prices endpoint for the LeBron James 2003 Topps Chrome Basketball (card_id shown), over 90 days for PSA 10, and converts values into a Pandas-ready list.
import requests
from decimal import Decimal
from datetime import datetime, timezone
API_KEY = "YOUR_API_KEY"
URL = "https://zylalabs.com/api/2511/sports-card-and-trading-card-api/2495/get-card-prices"
params = {
"card_id": "1586412050491x786559417729941500",
"days": "90",
"grade": "PSA 10",
}
headers = {"Authorization": f"Bearer {API_KEY}"}
resp = requests.get(URL, params=params, headers=headers, timeout=30)
resp.raise_for_status()
data = resp.json()
series = []
for row in data:
# closing_date is ISO 8601 in UTC ("...Z")
dt = datetime.fromisoformat(row["closing_date"].replace("Z", "+00:00")).astimezone(timezone.utc)
# price is a string; use Decimal to avoid float rounding in finance code
px = Decimal(row["price"])
series.append({"ts": dt, "price": px, "grade": row["Grade"], "card_id": row["card_id"]})
# Example: compute simple return between last two observations if available
if len(series) >= 2:
p0, p1 = series[-2]["price"], series[-1]["price"]
simple_return = (p1 - p0) / p0 if p0 != 0 else Decimal("0")
print(f"Last simple return: {simple_return:.6f}")
else:
print("Not enough data points returned")
Tips:
- Use Decimal/BigInt types rather than float for price math.
- Always treat timestamps as UTC and convert once at the edges of your app.
Finance-grade use cases you can ship this week
- Portfolio valuation for alternative assets: Store card_id per holding; nightly job refreshes the PSA 10 price series for your positions.
- Price move alerts: Compare the latest price to a 20-session median and trigger Slack/Email alerts on deviations.
- Comps and fair value: Pull multiple card_id series for the same player across sets/years to compute relative value or z-scores.
- Risk controls: Monitor drawdowns over the last N days and throttle buying rules if drawdowns exceed thresholds.
- Reporting: Generate monthly marks, realized/unrealized P&L, and contribution by asset for investor updates.
Operational details that save time
- Authentication: Authorization: Bearer YOUR_API_KEY on every request.
- Timestamps: closing_date is ISO 8601 UTC (“Z”). Align with your system’s timezone policy.
- Numerics: price is a string; parse as Decimal for financial calculations. Currency isn’t specified in the payload; display/assume consistently within your app’s context.
- Caching: If you render dashboards frequently, cache recent responses for a few minutes to reduce identical fetches.
- Backfilling: For historical analytics, fetch a larger days window once, then incrementally refresh with smaller windows on a schedule.
Calling the API from an AI agent via MCP
If you use Claude Code, Cursor, Windsurf, or another MCP-compatible client, you can route calls through Zyla’s MCP endpoint. Provide your API key and have the agent request the same Hub URLs documented above, with the same Authorization header semantics.
- MCP endpoint: MCP
- Ensure the agent’s outbound request uses:
- GET https://zylalabs.com/api/2511/sports-card-and-trading-card-api/2494/card-search with search
- GET https://zylalabs.com/api/2511/sports-card-and-trading-card-api/2495/get-card-prices with card_id, days, grade
- Header: Authorization: Bearer YOUR_API_KEY
This lets you prompt “fetch PSA 10 prices for this card_id over 90 days” directly in your IDE’s agent and paste the output into your analysis.
End-to-end example flow you can replicate
- Search and pick the exact card:
- Use the provided Card Search cURL to find “LeBron James 2003 Topps Chrome Basketball”.
- Copy its card_id: 1586412050491x786559417729941500.
- Fetch grade-specific price series:
- Run the provided Get Card Prices cURL with grade=PSA 10 and days=90.
- Store closing_date and price for charts and calculations.
- Compute finance metrics:
- Return over N days, rolling volatility, and drawdown from peak.
- Alert when price crosses a moving average or breaches thresholds.
Why Zyla API Hub for alternative asset pricing
One account and one API key unlock access to more than 10,000 public APIs. You get a consistent subscription + quota model across endpoints, a centralized API key, and integration options that include direct REST and MCP-based agent calls. Browse the catalog on zylalabs.com and plug additional datasets into your finance stack without spinning up new auth flows for each service.
FAQ
How do I find the correct card_id for my holding?
Use the Card Search endpoint with a tight query including player, year, set, and variant. Confirm description, set, and number match your item, then copy the returned card_id.
What time zone are the closing_date timestamps?
They are ISO 8601 with a trailing Z, indicating UTC. Normalize to UTC in your ingestion, then convert for display if needed.
Is the price a number or string?
The API returns price as a string. Parse into a Decimal or BigNumber type before performing financial calculations to avoid floating-point rounding issues.
Can I access different grades for the same card?
Yes. Pass the same card_id with a different grade value (e.g., PSA 10) to retrieve another grade’s time series.
What are the access options?
Zyla runs on subscription + quota (not pay-per-call). For your first API, you can typically start with a 7-day trial or 50 requests. Check the API page for current access options and pricing.
Ready to ship your card pricing integration? Subscribe and get your API key on the item page: Start 7-day trial on Sports Card and Trading Card API.
Official API response
[
{
"description": "LeBron James 2003 Topps Basketball",
"player": "Lebron James",
"set": "2003 Topps Basketball",
"number": "221",
"variant": "Base",
"card_id": "1588290260620x609083468203688000",
"image": "//s3.amazonaws.com/appforest_uf/f1588290324330x374737296708651100/2003-Topps-Basketball-LeBron-James-graded.jpg",
"category": "Basketball",
"category_group": "Sports Cards",
"set_type": "Topps Basketball"
},
{
"description": "LeBron James 2003 Upper Deck Rookie Exclusives Basketball",
"player": "Lebron James",
"set": "2003 Upper Deck Rookie Exclusives Basketball",
"number": "1",
"variant": "Base",
"card_id": "1593982609906x272877681796710400",
"image": "//s3.amazonaws.com/appforest_uf/f1593982606419x316822824595257800/2003-Upper-Deck-Rookie-Exclusives-Lebron-James-1.jpg",
"category": "Basketball",
"category_group": "Sports Cards",
"set_type": "Upper Deck Rookie Exclusives Basketball"
},
{
"description": "LeBron James 2025 Topps Chrome Cactus Jack Basketball",
"player": "LeBron James",
"set": "2025 Topps Chrome Cactus Jack Basketball",
"number": "46",
"variant": "Base",
"card_id": "1782184797693x851477815192830800",
"image": "//s3.amazonaws.com/appforest_uf/f1598843985116x489100344198574160/05-Basketball.jpg",
"category": "Basketball",
"category_group": "Sports Cards",
"set_type": "Topps Chrome Cactus Jack Basketball"
},
{
"description": "LeBron James 2003 Topps Chrome Basketball",
"player": "Lebron James",
"set": "2003 Topps Chrome Basketball",
"number": "111",
"variant": "Base",
"card_id": "1586412050491x786559417729941500",
"image": "//942284f33c575895b4be9de571ca6e40.cdn.bubble.io/d112/f1766768512710x492230808547762700/resize",
"category": "Basketball",
"category_group": "Sports Cards",
"set_type": "Topps Chrome Basketball"
},
{
"description": "LeBron James 2024 Panini Prizm Basketball",
"player": "LeBron James",
"set": "2024 Panini Prizm Basketball",
"number": "130",
"variant": "Base",
"card_id": "1740403688997x505339465151470000",
"image": "//942284f33c575895b4be9de571ca6e40.cdn.bubble.io/d112/f1757384268822x692013733346557700/resize",…
Official API response
[
{
"description": "LeBron James 2003 Topps Basketball",
"player": "Lebron James",
"set": "2003 Topps Basketball",
"number": "221",
"variant": "Base",
"card_id": "1588290260620x609083468203688000",
"image": "//s3.amazonaws.com/appforest_uf/f1588290324330x374737296708651100/2003-Topps-Basketball-LeBron-James-graded.jpg",
"category": "Basketball",
"category_group": "Sports Cards",
"set_type": "Topps Basketball"
},
{
"description": "LeBron James 2003 Upper Deck Rookie Exclusives Basketball",
"player": "Lebron James",
"set": "2003 Upper Deck Rookie Exclusives Basketball",
"number": "1",
"variant": "Base",
"card_id": "1593982609906x272877681796710400",
"image": "//s3.amazonaws.com/appforest_uf/f1593982606419x316822824595257800/2003-Upper-Deck-Rookie-Exclusives-Lebron-James-1.jpg",
"category": "Basketball",
"category_group": "Sports Cards",
"set_type": "Upper Deck Rookie Exclusives Basketball"
},
{
"description": "LeBron James 2025 Topps Chrome Cactus Jack Basketball",
"player": "LeBron James",
"set": "2025 Topps Chrome Cactus Jack Basketball",
"number": "46",
"variant": "Base",
"card_id": "1782184797693x851477815192830800",
"image": "//s3.amazonaws.com/appforest_uf/f1598843985116x489100344198574160/05-Basketball.jpg",
"category": "Basketball",
"category_group": "Sports Cards",
"set_type": "Topps Chrome Cactus Jack Basketball"
},
{
"description": "LeBron James 2003 Topps Chrome Basketball",
"player": "Lebron James",
"set": "2003 Topps Chrome Basketball",
"number": "111",
"variant": "Base",
"card_id": "1586412050491x786559417729941500",
"image": "//942284f33c575895b4be9de571ca6e40.cdn.bubble.io/d112/f1766768512710x492230808547762700/resize",
"category": "Basketball",
"category_group": "Sports Cards",
"set_type": "Topps Chrome Basketball"
},
{
"description": "LeBron James 2024 Panini Prizm Basketball",
"player": "LeBron James",
"set": "2024 Panini Prizm Basketball",
"number": "130",
"variant": "Base",
"card_id": "1740403688997x505339465151470000",
"image": "//942284f33c575895b4be9de571ca6e40.cdn.bubble.io/d112/f1757384268822x692013733346557700/resize",…