TCGplayer
TCGplayer Search Suggestions API
The tcgplayer.com search-box autocomplete for a partial query: suggested products (product id, name, URL, set, game and score), matching sets, and the games the matches come from with counts. There is no game filter; every game is searched. Useful for type-ahead in a collection app and for turning a card name into a product id. Costs 1 credit per request.
POST/api/v1/tcgplayer/suggestions
Authorizations
AuthorizationstringheaderrequiredBearer authentication header of the form Bearer <token>, where <token> is your Scavio API key (e.g. Bearer sk_live_your_key).
Body
application/jsonquerystringrequiredWhat the shopper has typed so far, 1-100 characters.
Example: charizard
Request
from scavio import ScavioClient
client = ScavioClient(api_key="sk_live_your_key")
res = client.tcgplayer.suggestions(query="charizard")["data"]
for p in res["products"]:
print(p["product_id"], p["name"], p["set_name"], p["game"])Response
"query": "charizard",
"count": 5,
},
"response_time": 1164
}