You need to let users search a trading card catalog and chart price history for a specific graded card, without building scrapers or maintaining datasets. By the end of this article, you’ll be able to search for a sports trading card and fetch its time-series prices by grade using the Sports Card and Trading Card API on Zyla API Hub, then plug those calls into your app or an AI coding agent via MCP.
What this API gives you
The Sports Card and Trading Card API provides two capabilities:
- Card Search: fuzzy-search trading cards by a single search string (e.g., player, set, year). The API returns a list of matching cards with metadata and a card_id you’ll use in follow-up calls.
- Get Card Prices: retrieve recent price time series for a specific card_id and grade (e.g., PSA 10) over a given number of days.
Developers use it to power inventory tools, comps calculators, portfolio dashboards, buy/sell bots, and marketplace listing assistants. Everything is returned as JSON so you can drop it straight into your backend or a client app.
You’ll work entirely on Zyla API Hub, which centralizes auth and billing across more than 10,000 public APIs. One account, one API key, subscription + quota (not pay-per-call), and the first API in your account can start with a 7-day trial or 50 requests. Check the API page for current access options and pricing.
Getting started on Zyla API Hub
Open the API’s page, subscribe, and grab your key:
- Go to the Sports Card and Trading Card API listing and click Subscribe or Start Free Trial when available: Start 7-day trial on Sports Card and Trading Card API.
- Copy your API key from the dashboard.
- Use Authorization: Bearer YOUR_API_KEY on each request.
All requests go to zylalabs.com hub URLs; do not call origin hosts directly. The examples below are copy-pasteable as-is (replace YOUR_API_KEY with your key).
Endpoints you’ll use
1) Card Search
Search for matching sports trading cards by a single fuzzy query string. You can combine details like player, year, set, and variant into one string.
- Method: GET
- URL: https://zylalabs.com/api/2511/sports-card-and-trading-card-api/2494/card-search
- Required query parameter:
- search (string): Free-form search text, e.g., “Lebron James”.
Official cURL example:
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 example 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": "//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",…
Fields you’ll actually use:
- description: Human-readable label you can show in search results.
- player, set, number, variant: Metadata for filtering and display.
- card_id: Primary identifier; pass this to Get Card Prices.
- image: Path to an image you can render (prefix with https: if needed in your client).
- category, category_group, set_type: Useful for categorization.
2) Get Card Prices
Return recent prices (time series) for a card and grade over a window of days. Use the card_id from Card Search.
- Method: GET
- URL: https://zylalabs.com/api/2511/sports-card-and-trading-card-api/2495/get-card-prices
- Required query parameters:
- card_id (string): A card identifier from Card Search.
- days (string): Number of trailing days to include (e.g., “90”).
- grade (string): Grading label (e.g., “PSA 10”).
Official cURL example:
Official 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",…
Fields you’ll actually use:
- closing_date: ISO 8601 timestamp in UTC (the “Z” suffix). Use it as your x-axis for charts.
- Grade: Grade string that echoes your query (e.g., “PSA 10”).
- card_id: Identifies which card the series belongs to.
- price: Price as a string. Convert to decimal/number in your language to avoid floating-point drift when summing or averaging.
End-to-end workflow
- Call Card Search with a single query string like “Lebron James 2003 Topps Chrome 111”.
- Inspect results and pick the right row by player, set, number, and variant.
- Grab its card_id.
- Call Get Card Prices with that card_id, your days window, and a grade such as “PSA 10”.
- Render a chart using closing_date on the x-axis and price on the y-axis; or compute moving averages, min/max, or volatility for ranking.
Copy-paste samples
cURL: Card Search (official)
This is ready to paste into a terminal. Replace YOUR_API_KEY with your key.
Python: Card Search and pick a card_id
The snippet below queries Card Search, filters for Topps Chrome Basketball, and prints the card_id you’ll pass to Get Card Prices. It also shows how to safely prefix the image URL.
import os
import requests
API_KEY = os.getenv("ZYLALABS_API_KEY", "YOUR_API_KEY")
BASE_URL = "https://zylalabs.com/api/2511/sports-card-and-trading-card-api/2494/card-search"
params = {"search": "Lebron James"}
headers = {"Authorization": f"Bearer {API_KEY}"}
resp = requests.get(BASE_URL, params=params, headers=headers, timeout=30)
resp.raise_for_status()
results = resp.json()
# Choose the 2003 Topps Chrome Basketball base card, if present:
target = None
for item in results:
if item.get("set") == "2003 Topps Chrome Basketball" and item.get("variant") == "Base":
target = item
break
if not target and results:
target = results[0] # fallback: first result
if not target:
raise SystemExit("No results from Card Search")
card_id = target["card_id"]
image_url = target.get("image")
if image_url and image_url.startswith("//"):
image_url = "https:" + image_url
print("Description:", target.get("description"))
print("Player:", target.get("player"))
print("Set:", target.get("set"))
print("Number:", target.get("number"))
print("Variant:", target.get("variant"))
print("card_id:", card_id)
print("Image URL:", image_url)
Next, take card_id from the output and call the Get Card Prices endpoint (via cURL or your own code) to retrieve the time series for your chosen grade.
Implementation notes that save time
- Authorization: Always send Authorization: Bearer YOUR_API_KEY.
- Timestamps: closing_date uses UTC (Z suffix). Convert once at the edge and keep everything in UTC for consistent aggregations.
- Prices: price is a string. In strongly typed code, parse to Decimal/BigNumber to preserve cents.
- Images: image paths may be protocol-relative (start with //). Prefix with https: in your frontend to avoid mixed-content issues.
- Filtering: Card Search can return multiple close matches. Let the user choose by set + number + variant before hitting Get Card Prices.
- Caching: Cache Card Search responses for popular queries (e.g., “Lebron James”) since metadata changes less frequently than prices.
- Windowing: days controls how far back you fetch. Keep it aligned with your charting timeframe (e.g., 30/90/180) to avoid over-fetching.
Practical sports use cases you can ship this week
- Collector inventory: Let users search for a card, store the card_id in your DB, and surface the current 30–90 day price trend in their collection view.
- Comp estimator: On a listing page, search by player + set + number, get the last 90-day prices for “PSA 10”, and show a recent-average comp.
- Deal alerts: Nightly job hits Get Card Prices for watchlisted card_ids and emails price drops vs. 7-day or 30-day moving averages.
- Showcase pages: For marquee players, prefetch Card Search results and link each to a price chart drilldown by grade.
Calling from an AI agent via MCP
If you automate workflows with an MCP-compatible client, you can route calls through Zyla’s MCP server. Configure your MCP client with the MCP endpoint and your API key, and then have the agent issue the same HTTPS GET requests as shown above against the Zyla hub URLs. See the MCP reference here: MCP.
The flow is the same: call Card Search to obtain card_id, then call Get Card Prices with card_id, days, and grade. Use the exact URLs and headers from the cURL examples; your MCP client handles the transport and session.
Error handling and edges
- Empty search results: If Card Search returns an empty array, prompt the user to broaden the query or remove set/variant qualifiers from the search string.
- Multiple near-duplicates: Prefer exact matches on set and number to disambiguate variants and reprints.
- Grade not found: If Get Card Prices returns an empty array for a rare grade, try a different grade (e.g., “PSA 9”) or relax the days window.
- Throttling and quotas: Access is subscription + quota, not pay-per-call. Use local caching and debounce your autosuggest UI to minimize calls. For current access options, check the API page.
Reference: exact endpoints and parameters
Card Search
- Method: GET
- URL: https://zylalabs.com/api/2511/sports-card-and-trading-card-api/2494/card-search
- Required params:
- search: string (example: Lebron James)
Get Card Prices
- Method: GET
- URL: https://zylalabs.com/api/2511/sports-card-and-trading-card-api/2495/get-card-prices
- Required params:
- card_id: string (from Card Search)
- days: string (example: 90)
- grade: string (example: PSA 10)
QA checklist before you ship
- Search UX: Show description, set, number, variant, and image. Let the user pick a single card to reduce mismatches.
- Data types: Parse price as decimal, not float. Treat timestamps as UTC.
- Grades: Provide a small dropdown of common grades (e.g., “PSA 10”, “PSA 9”) so users don’t typo a grade and get zero results.
- Resilience: Handle empty arrays and unexpected fields without crashing your job or UI.
- Caching: Cache Card Search results for a short TTL (e.g., hours), and cache price series for a shorter TTL if you refresh charts frequently.
FAQ
How do I get a card_id?
Use the Card Search endpoint with a single search string (e.g., “Lebron James 2003 Topps Chrome 111”). The response includes a card_id for each result. Pick the correct one (set + number + variant) and pass it to Get Card Prices.
What time zone is closing_date?
UTC. The “Z” suffix indicates UTC. Convert in your UI if you want to show local time; keep storage and analytics in UTC for consistency.
Why is price a string?
Parsing as decimal avoids floating-point precision issues when computing averages or summations. Convert strings to Decimal/BigNumber in your language of choice.
Is there a free plan?
No Free Plan. Access is subscription + quota. The first API in your account can start with a 7-day trial or 50 requests. Check the API page for current access options and pricing.
Can I call these endpoints from an AI IDE/agent?
Yes. Configure your MCP-compatible client with Zyla’s MCP server and your API key, then issue the same GET requests shown in the cURL examples. See the MCP page for details.
Ready to wire this into your app? Subscribe and get your key on the listing page: Start 7-day trial on Sports Card and Trading Card API. Then copy the cURL above, swap in your key, and you’re live.
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",…