You need to let users search for specific sports trading cards and then show recent sale prices for the exact card and grade. By the end of this guide, you’ll be able to wire up a search box to find cards and a follow-up request that returns a price time series for the chosen card and grade using Sports Card and Trading Card API on Zyla API Hub.
What this API delivers
The Sports Card and Trading Card API exposes two core capabilities you can ship this week:
- Card Search: fuzzy search that returns matching trading cards with metadata (player, set, number, variant, images, category, and a stable card_id you’ll use downstream).
- Get Card Prices: time-series of latest prices for a given card_id and grade over a requested number of days.
Developers use these endpoints to power search-driven card catalogs, price charts, alerts, and portfolio valuation features in sports-focused apps.
Getting started on Zyla API Hub
Open the listing on Zyla API Hub and subscribe to get your API key. Zyla uses a subscription + quota model (not pay-per-call). For this API, you can begin with a 7-day trial or 50 requests to test your integration. Check the API page for current access options and pricing.
You can browse more than 10,000 public APIs at zylalabs.com. One account, one API key, consistent subscription handling across the marketplace.
Endpoint 1: Card Search
Search for cards by combining any details you have into a single string. This returns a JSON array of matching cards, including a card_id you’ll use with pricing.
- Method: GET
- URL: https://zylalabs.com/api/2511/sports-card-and-trading-card-api/2494/card-search
- Required query parameter:
search(string) - Auth:
Authorization: Bearer YOUR_API_KEY
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"
REAL 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": "//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",…
Key fields you’ll actually use:
card_id: the unique identifier required by the pricing endpoint.description,player,set,number,variant: display metadata for your UI.image: a path to an image you can render; store alongside the card for thumbnails.category,category_group,set_type: useful for filtering and grouping.
Endpoint 2: Get Card Prices
Retrieve recent prices for a specific card and grade as a time series. You must pass a card_id from the search results.
- Method: GET
- URL: https://zylalabs.com/api/2511/sports-card-and-trading-card-api/2495/get-card-prices
- Required query parameters:
card_id(string): e.g., a value from Card Search results.days(string): time window length (e.g.,90).grade(string): e.g.,PSA 10.
- Auth:
Authorization: Bearer YOUR_API_KEY
cURL
Example 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",…
Implementation notes:
closing_dateis ISO 8601 withZ(UTC). Treat it as a UTC timestamp.priceis returned as a string. Parse to a decimal type in your language to avoid float rounding issues. Currency is not specified in the docs; display with appropriate context in your UI.- Entries are time-series measurements; sort by
closing_dateif you need chronological charts.
Minimal Python example: fetch latest price for a graded card
This sample uses the Prices endpoint to get the most recent data point and print the date and price. It pairs well with a UI that first selects a card via Card Search and then passes the selected card_id to this function.
import os
import requests
from datetime import datetime
API_KEY = os.getenv("ZYLA_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", # from Card Search
"days": "90",
"grade": "PSA 10"
}
headers = {"Authorization": f"Bearer {API_KEY}"}
resp = requests.get(url, params=params, headers=headers, timeout=20)
resp.raise_for_status()
data = resp.json()
# Sort by closing_date descending to get latest
def parse_dt(iso):
return datetime.fromisoformat(iso.replace("Z", "+00:00"))
latest = sorted(data, key=lambda d: parse_dt(d["closing_date"]), reverse=True)[0]
print({
"closing_date_utc": latest["closing_date"],
"grade": latest.get("Grade"),
"card_id": latest.get("card_id"),
"price_str": latest.get("price")
})
Two practical use cases you can ship now
1) Search-to-price valuation widget
Let users type “Lebron James 2003 Topps Chrome 111 PSA 10” and select the exact match from Card Search. Store the returned card_id, display the provided image and metadata, then query Get Card Prices with a chosen window (e.g., days=90) and grade=PSA 10. Render the prices as a line chart keyed by closing_date to show trends.
- Fast path from fuzzy query to canonical
card_id. - Transparent pricing view: serialize the series for charts and summaries.
- Save both the
card_idandgradewith the user’s selection for later alerts (see below).
2) Watchlist and price alerts for graded inventory
If your app tracks a collector’s graded holdings, store their card_id and grade per item. On a schedule, pull recent prices via the Prices endpoint and compute deltas since the last pull. Fire alerts on thresholds (e.g., 10% change in the last 30 days) using the ordered time-series from closing_date and price. Present a compact sparkline plus the latest price point in the dashboard.
- Use consistent grading in queries (e.g.,
PSA 10) to align with user inventory fields. - Cache most recent responses briefly to avoid redundant fetches during chart interactions.
Implementation tips that save time
- Search input: The Card Search endpoint accepts a single
searchstring. Combine details like player, year, set, card number, and variant to increase match quality. - Timezone: Treat
closing_dateas UTC; convert to the user’s local time only for display. - Numeric handling:
priceis a string; parse into Decimal/BigNumber for accurate math. - Caching: Cache search results by query string. For price series, cache by tuple
(card_id, grade, days)for a short TTL to smooth repeated chart renders. - Quotas: Zyla uses a subscription + quota model. For this API you can start with a 7-day trial or 50 requests to validate your integration before scaling. Monitor usage in your Zyla dashboard.
- Error surfacing: If search yields multiple close matches, require user confirmation before fetching prices to avoid mixing
card_ids across variants.
Call from an AI agent via MCP
If you’re orchestrating this from an MCP-compatible client (Claude Code, Cursor, Windsurf, etc.), you can route HTTPS calls through the Zyla MCP endpoint. Configure your agent/tooling to issue GET requests to the same Hub URLs and include the Bearer token. See MCP for details and wire it with your API key. Typical flow:
- Tool call: GET Card Search with
searchstring, capture acard_id. - Tool call: GET Prices with
card_id,days, andgrade, return a time-series for the agent to summarize or visualize.
This keeps your agent’s retrieval pipeline simple: one search step, one metrics step, same authentication and URLs you use from your server code.
End-to-end wiring checklist
- UI: single text input for Card Search; list results showing
description,image, andvariant. - State: on selection, persist
card_id,player,set,number,variant,image. - Pricing: fetch with
daysrelevant to your chart (30/90), and user-selectedgrade. - Charting: x-axis from
closing_date(UTC), y-axis parsed frompriceas decimal. - Fallbacks: if no prices for a given
grade, prompt the user to pick a different grade or hide the chart. - Monitoring: log the query strings you send to Card Search to refine client-side suggestions.
Explore more sports-focused integrations on Zyla API Hub and consolidate your keys into one marketplace workflow.
FAQ
How do I get the correct card_id for pricing?
Use the Card Search endpoint first. From the results, pick the specific card and read its card_id field. Pass that exact value to the Get Card Prices endpoint.
What timezone are date fields in?closing_date is ISO 8601 with a trailing Z, indicating UTC. Convert to local time only for display; keep storage and calculations in UTC for consistency.
What currency are prices in?
The response returns price as a string; the documentation does not specify a currency. Present prices with clear labeling and avoid assuming currency in calculations. If you expose currency to users, provide context in your UI.
Is there a free plan?
No Free Plan is offered. The API uses a subscription + quota model. You can start with a 7-day trial or 50 requests to evaluate. Check the API page for current access options and pricing.
Can I restrict search by set or year?
Card Search takes a single search string. For best results, combine details like player, year, set, card number, and variant (e.g., “LeBron James 2003 Topps Chrome 111”).
Ready to implement search and pricing for sports cards? Start here: 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",…