Search cards by name, number and set
GET /api/v1/search finds products by name and card number in one query, across all twelve games or one. Pass what a person typed; interpreted in the answer says how Cardspine read it.
curl -G "https://api.cardspine.com/api/v1/search" \
-H "X-Api-Key: $CARDSPINE_KEY" \
--data-urlencode "q=charizard 199/165" \
--data-urlencode "game=pokemon"
# Response
{
"items": [
{
"tcgplayerProductId": 517045,
"game": "pokemon",
"kind": "single",
"name": "Charizard ex",
"number": "199",
"printedTotal": 165,
"rarity": "Special Illustration Rare",
"variantLabel": null,
"language": "en",
"set": {
"tcgplayerGroupId": 23237,
"code": "MEW",
"name": "SV: Scarlet & Violet 151",
"releaseDate": "2023-09-22",
"releaseDateEstimated": false
},
"presale": {
"isPresale": false,
"releasedOn": null
},
"links": {
"image": "https://images.cardspine.com/product/517045/1000.jpg",
"tcgplayer": "https://www.tcgplayer.com/product/517045"
},
"removedAt": null,
"printings": []
}
],
"page": 1,
"pageSize": 24,
"hasMore": false,
"total": {
"value": 1,
"exact": true
},
"counts": {
"single": 1,
"sealed": 0
},
"facets": {
"sets": [
{
"tcgplayerGroupId": 23237,
"code": "MEW",
"name": "SV: Scarlet & Violet 151",
"releaseDate": "2023-09-22",
"releaseDateEstimated": false,
"count": 1
}
]
},
"interpreted": {
"raw": "charizard 199/165",
"name": "charizard",
"number": "199",
"printedTotal": 165,
"numberKind": "fraction"
},
"catalog": {
"asOf": "2026-11-01T09:00:00Z",
"syncedAt": "2026-11-01T10:14:33Z"
},
"nextCursor": null
}What you can type
- A name, a card number, or both. Numbers such as
199/165,111/298orOP05-119are read as card numbers. - Every word must appear in the product name, the set name or the set code.
- Sealed shorthand in a Pokémon search is read as its words:
etb,pc etb,upcandspc. - A bare number may be the card number or a word of a set or product name. Card-number matches come first.
- The game is optional when the query has a card number or a name of three or more characters.
To see how a query is read before you write any code, try search without a key.
Narrow and sort
kindkeeps singles or sealed product, andlanguagekeeps English or Japanese. When akindfinds nothing,countsstill reports how many singles and sealed products match, so you can offer the other kind.setstakes up to 20 TCGplayer group ids, andnumberandrarityrestrict results to one card number or rarity.release=upcomingkeeps sets that are not out yet and presale products.group=cardreturns one item per card, with every printing of it inprintings.sortis relevance by default, or name, newest or oldest set, or number.
Paging and cost
A page holds 1 to 100 results, 24 by default, and a search is charged its page size in products. A query reaches its first 1,000 results. To read one whole set past that, leave out q, name the set in sets and follow nextCursor. Search has its own per-minute limit, separate from lookups; see limits and errors.
Box contents in results
A sealed result carries the same contents as a lookup by id when they are known: the packs in a box, the boxes in a case, with each item’s product id, quantity and name. Use kind=sealed to keep only sealed product. The shape, and pricing a box by the pack.
Search picks
POST /api/v1/search/selections tells Cardspine which product a user picked from your results. Among results whose match is otherwise equal, products clients pick often come first. A single pick made within 10 minutes of a search that showed the product is linked to that search when it can be. Search records are kept 30 days, and an account can ask for search text and card numbers not to be stored. Picks count toward no request, search or product allowance. Picks from a Free plan key are accepted but not used for ranking.
Endpoint reference
Generated from the published OpenAPI document, Cardspine API v1. Paths are on https://api.cardspine.com. Download openapi.json
Search
GET/api/v1/search
Searches products by name and card number. A search is charged its page size in products and reaches the first 1,000 results, or all of one set by following nextCursor.
Parameters
gamequery · string · optional- The game slug. Optional when q has a card number or a name of three or more characters, required otherwise.
qquery · string · optional- Free text: a name, a card number such as 111/298 or OP05-119, or both. Every word must appear in the product name, the set name or the set code. A bare number may be the card number or a word of the set or product name; card-number matches come first. At most 200 characters.
numberquery · string · optional- A card number the results must match.
setsquery · string · optional- Comma-separated TCGplayer group ids to restrict to, at most 20.
setMatchquery · string · optional- group (default) or number. group matches products by their TCGplayer group, as sets does alone. number also matches every product whose card number prefix (OP01 in OP01-013) is one of the selected sets' numberFamilies, so reprints and promos filed in another TCGplayer group are included; it needs game, and is not available with cursor. facets still count per TCGplayer group, so a reprint is counted under the group TCGplayer files it in.
rarityquery · string · optional- A rarity name to restrict to.
languagequery · string · optional- en or ja.
kindquery · string · optional- single, sealed or all (default). card is a deprecated alias for single.
sortquery · string · optional- relevance (default), name, set-newest, set-oldest, number or sold. name = by product name; set-newest and set-oldest = by set release date, undated sets last; sold = most units sold on TCGplayer in the last 30 days first, cards without sales data last, and not available with group=card. On a text query of three or more characters, sorts other than relevance order the 2,000 best matches.
releasequery · string · optional- all (default), released or upcoming. Upcoming = the set's release date is after today (UTC) or the product is a presale; released = everything else, so an undated set counts as released.
groupquery · string · optional- product (default) returns one item per product; card returns one item per card, with every printing of it in printings. total, counts and facets then count cards. Not allowed with cursor or sort=sold.
pagequery · string · optional- The page, from 1 to 500 (default 1). Page times pageSize may not pass 1,000; to read deeper into one set, follow nextCursor.
pageSizequery · string · optional- Results per page, 1 to 100 (default 24). A search is charged this many products.
cursorquery · string · optional- The nextCursor of the previous page. Reads one set past the 1,000-result limit. Needs exactly one id in sets, no q, page 1, a sort other than name, no group=card and no setMatch=number; repeat the other filters and the sort unchanged.
curl -G "https://api.cardspine.com/api/v1/search" \
-H "X-Api-Key: $CARDSPINE_KEY" \
--data-urlencode "q=charizard 199/165" \
--data-urlencode "game=pokemon"Returns 200 SearchResponseV1
A page of search results.
itemsProductV1[]- The products on this page.
15 fields of
ProductV1A single card or a sealed product.
tcgplayerProductIdinteger- The TCGplayer product id.
gamestring- The game's slug.
kindstring- Either single or sealed.
namestring- The product name as listed.
numberstring · nullable- The printed collector number, for cards that have one.
printedTotalinteger · nullable- The set total printed beside the number, when there is one.
raritystring · nullable- The rarity, when the game has one.
variantLabelstring · nullable- The variant or art label, such as a promo marker.
languagestring- The language code, en or ja.
setSetRefV15 fields of
SetRefV1The set a product belongs to.
tcgplayerGroupIdinteger- The TCGplayer group id of the set.
codestring · nullable- The set's abbreviation, when it has one.
namestring- The set's name.
releaseDatestring (date) · nullable- The release date, when known.
releaseDateEstimatedboolean- True when the release date is an estimate rather than a published date.
presalePresaleV12 fields of
PresaleV1Pre-release status of a product.
isPresaleboolean- True while the product is listed for pre-order.
releasedOnstring (date-time) · nullable- The announced release date, when given.
linksLinksV12 fields of
LinksV1Links to a product and its image.
imagestring · nullable- An https URL of the product's image at 1000 pixels, hosted by us, or null when the product has none. The same address serves the 600 and 400 pixel sizes: replace 1000 with 600 or 400.
tcgplayerstring- The product's TCGplayer page.
removedAtstring (date-time) · nullable- When the product was removed from the catalog, or null while it is listed.
printingsPrintingV1[]- The finishes the product is sold in. Empty until they have been read for its set.
3 fields of
PrintingV1A finish a product is sold in, such as Normal or Reverse Holofoil.
tcgplayerProductIdinteger- The TCGplayer product id.
printingstring- The finish, as TCGplayer names it. Empty for a product of a grouped card that has no printing rows of its own.
variantLabelstring · nullable- The product's variant or art label, so a printing can be told apart from a sibling product.
contentsSealedContentV1[] · nullable- What a sealed product holds, one level down: a case lists its boxes, a box its packs. Absent for singles and for sealed products with no known contents.
3 fields of
SealedContentV1What a sealed product holds: one kind of product and how many of it.
tcgplayerProductIdinteger- The TCGplayer product id of what is inside. Look it up to see what it holds in turn.
quantityinteger- How many of it the sealed product holds.
namestring- The name of what is inside.
pageinteger- The page number, from 1.
pageSizeinteger- The number of items requested per page.
hasMoreboolean- True when a later page has results.
totalCountV12 fields of
CountV1A result count.
valueinteger- The number of matching products.
exactboolean- False when the count is a lower bound because the query matched too many candidates.
countsCountsV12 fields of
CountsV1Matching products by kind, ignoring any kind filter.
singleinteger- Matching singles.
sealedinteger- Matching sealed products.
facetsFacetsV11 field of
FacetsV1Breakdowns of a search.
setsSetFacetV1[]- Result counts per set, ignoring any set filter. Empty unless a game is given.
6 fields of
SetFacetV1A set and how many results fall in it.
tcgplayerGroupIdinteger- The TCGplayer group id of the set.
codestring · nullable- The set's abbreviation, when it has one.
namestring- The set's name.
releaseDatestring (date) · nullable- The release date, when known.
releaseDateEstimatedboolean- True when the release date is an estimate rather than a published date.
countinteger- Matching products in the set, ignoring any set filter.
interpretedInterpretedV16 fields of
InterpretedV1How the query text was understood.
rawstring- The query as received.
namestring · nullable- The name part, when one was found.
numberstring · nullable- The card number part, when one was found.
printedTotalinteger · nullable- The set total from a number such as 111/298, when present.
numberKindstring · nullable- The kind of number found: fraction, hash, code, promo or soft.
setInterpretedSetV1 · optional2 fields of
InterpretedSetV1A set named in a query by its code.
codestring- The set code.
namestring · nullable- The set name, null when more than one set carries the code.
catalogCatalogFreshnessV12 fields of
CatalogFreshnessV1How current the catalog is.
asOfstring (date-time) · nullable- The upstream data timestamp of the last successful sync.
syncedAtstring (date-time) · nullable- When that sync completed. Both are null before the first sync.
nextCursorstring · nullable- Opaque. Set when the request names exactly one set, has no q and sorts by something other than name, and more results follow; send it as cursor to read the next page past the 1,000-result limit. Null otherwise.
See a real response in the quickstart
Other responses
- 400
- A parameter is invalid, the result window passes 1,000, the cursor is invalid or not allowed for the request, or game is missing for a query that needs one.
- 429
- A request, product or monthly limit was exceeded. Retry after the interval in the Retry-After header.
- 503
- The search timed out. Narrow the query or retry after the Retry-After interval.
- 401
- As on every call; see Limits and errors.
Search picks
POST/api/v1/search/selections
Reports that a user picked a product from your search results. Among results whose match is otherwise equal, Cardspine ranks products that clients pick often above the rest. Send productId, or productIds (at most 100) to backfill. Ids that name no product do not affect ranking. A single pick is linked to the search it came from when it can be; no user data is stored. Free-plan keys are accepted but their picks are not used for ranking, and productIds needs a paid plan. For ranking, a client counts at most 5 picks of one product a day and about 1,000 different products a day. It counts toward no request, search or product allowance and is limited per minute at your plan's search rate.
Parameters
productIdbody · integer · nullable- The TCGplayer product id the user picked.
productIdsbody · integer[] · nullable- Several picked products in one call, at most 100, for a backfill. Used together with productId when both are sent.
curl "https://api.cardspine.com/api/v1/search/selections" \
-H "X-Api-Key: $CARDSPINE_KEY" \
-H "Content-Type: application/json" \
-d '{"productId":517045}'Other responses
- 202
- The pick was accepted. The response has no body.
- 400
- Neither productId nor productIds was sent, or productIds holds more than 100 ids.
- 403
- productIds was sent on the Free plan, which accepts one productId per call.
- 429
- A request, product or monthly limit was exceeded. Retry after the interval in the Retry-After header.
- 401
- As on every call; see Limits and errors.