{"components":{"securitySchemes":{"ApiKeyHeader":{"in":"header","name":"X-API-Key","type":"apiKey"},"BearerKey":{"scheme":"bearer","type":"http"}}},"info":{"contact":{"email":"alexnewsome6@gmail.com","url":"https://www.pokeinvest.io/data-api"},"description":"Pokemon card prices as the median of completed sales for every grade at every grading company, PSA and CGC populations, price and population history back to 2022, the sales behind each price, and verified eBay deals. Free key (1,000 calls/month): POST /data-api/free. Show \"Prices by PokeInvest\" linking to https://www.pokeinvest.io wherever the data appears.","title":"PokeInvest Data API","version":"1.1.0"},"openapi":"3.1.0","paths":{"/api/identify":{"post":{"description":"Raw card or slab, any angle. Top candidates with IDs, prices and population; 91% right card on 1,000 real eBay photos, 95% in the top 3, about a second. 60 scans a day per IP without a key; with a key, metered like any other call. Send a file as multipart \"image\" or JSON {\"url\": ...}.","requestBody":{"content":{"application/json":{"schema":{"properties":{"url":{"format":"uri","type":"string"}},"required":["url"],"type":"object"}},"multipart/form-data":{"schema":{"properties":{"image":{"format":"binary","type":"string"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"best":{"type":["object","null"]},"candidates":{"items":{"properties":{"confidence":{"enum":["verified","likely","possible"],"type":"string"},"feature_matches":{"type":"integer"},"id":{"type":"string"},"image":{"type":["string","null"]},"name":{"type":"string"},"page_url":{"type":"string"},"psa_10_usd":{"type":["number","null"]},"psa_population":{"type":["integer","null"]},"set":{"type":"string"},"similarity":{"type":"number"},"ungraded_usd":{"type":["number","null"]}},"type":"object"},"type":"array"},"method":{"type":"string"},"scanner_ms":{"type":"integer"}},"type":"object"}}},"description":"candidates, best first"},"400":{"description":"no image"},"429":{"description":"daily scans used up (keyless)"},"503":{"description":"scanner offline"}},"security":[{},{"ApiKeyHeader":[]},{"BearerKey":[]}],"summary":"Identify a card from a photo","tags":["Scanner"]}},"/api/population-history/{card}":{"get":{"description":"PSA population over time; a point only when a count changed.","parameters":[{"description":"PokeInvest ID (pi_16322), the numeric ID in a card URL, or a TCGplayer product ID","example":"pi_16322","in":"path","name":"card","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"grader":{"type":"string"},"method":{"type":"string"},"name":{"type":"string"},"points":{"items":{"properties":{"date":{"type":"string"},"psa_10":{"type":["integer","null"]},"psa_9":{"type":["integer","null"]},"total":{"type":["integer","null"]}},"type":"object"},"type":"array"},"pokeinvest_id":{"example":"pi_16322","type":"string"},"set_name":{"type":"string"},"tcgplayer_id":{"type":["string","null"]}},"type":"object"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"type":"string"}},"type":"object"}}},"description":"Missing, unknown or exhausted key"},"404":{"description":"card not found"},"429":{"description":"monthly call limit reached"}},"security":[{"ApiKeyHeader":[]},{"BearerKey":[]}],"summary":"PSA population history","tags":["Cards"]}},"/api/population/{card}":{"get":{"description":"Copies graded at each PSA grade, total, gem rate, last updated.","parameters":[{"description":"PokeInvest ID (pi_16322), the numeric ID in a card URL, or a TCGplayer product ID","example":"pi_16322","in":"path","name":"card","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"gem_rate_pct":{"type":["number","null"]},"name":{"type":"string"},"pokeinvest_id":{"example":"pi_16322","type":"string"},"population":{"additionalProperties":{"type":["integer","null"]},"type":"object"},"psa_last_updated":{"type":["string","null"]},"set_name":{"type":"string"},"tcgplayer_id":{"type":["string","null"]}},"type":"object"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"type":"string"}},"type":"object"}}},"description":"Missing, unknown or exhausted key"},"404":{"description":"card not found"},"429":{"description":"monthly call limit reached"}},"security":[{"ApiKeyHeader":[]},{"BearerKey":[]}],"summary":"PSA population","tags":["Cards"]}},"/api/price-history/{card}":{"get":{"description":"Weekly price per grade back to 2022.","parameters":[{"description":"PokeInvest ID (pi_16322), the numeric ID in a card URL, or a TCGplayer product ID","example":"pi_16322","in":"path","name":"card","required":true,"schema":{"type":"string"}},{"example":"PSA 10","in":"query","name":"grade","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"currency":{"type":"string"},"grades":{"additionalProperties":{"items":{"properties":{"basis":{"type":"string"},"date":{"type":"string"},"high_usd":{"type":["number","null"]},"low_usd":{"type":["number","null"]},"price_usd":{"type":"number"},"sales":{"type":"integer"},"window_days":{"type":"integer"}},"type":"object"},"type":"array"},"type":"object"},"method":{"type":"string"},"name":{"type":"string"},"pokeinvest_id":{"example":"pi_16322","type":"string"},"set_name":{"type":"string"},"tcgplayer_id":{"type":["string","null"]}},"type":"object"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"type":"string"}},"type":"object"}}},"description":"Missing, unknown or exhausted key"},"404":{"description":"card not found"},"429":{"description":"monthly call limit reached"}},"security":[{"ApiKeyHeader":[]},{"BearerKey":[]}],"summary":"Price history","tags":["Cards"]}},"/api/prices/{card}":{"get":{"description":"Median of completed sales for ungraded copies and every grade at PSA, CGC, BGS, TAG, ACE and SGC, with evidence; plus the card page, an eBay buy link and the cheapest verified live listing.","parameters":[{"description":"PokeInvest ID (pi_16322), the numeric ID in a card URL, or a TCGplayer product ID","example":"pi_16322","in":"path","name":"card","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"best_live_listing":{"properties":{"checked_at":{"type":["string","null"]},"grade":{"type":"string"},"pct_under_median":{"type":"number"},"total_usd":{"type":"number"},"url":{"type":"string"}},"type":["object","null"]},"buy_url":{"description":"eBay search for this card, PokeInvest affiliate tagged","type":"string"},"currency":{"type":"string"},"graded":{"items":{"properties":{"change_vs_previous_window":{"description":"fraction, e.g. -0.12 is 12% down","type":["number","null"]},"grade":{"type":"string"},"grader":{"type":"string"},"high_usd":{"type":["number","null"]},"low_usd":{"type":["number","null"]},"median_usd":{"type":["number","null"]},"newest_sale":{"properties":{"date":{"type":["string","null"]},"usd":{"type":["number","null"]}},"type":"object"},"sales":{"type":"integer"},"window_days":{"type":"integer"}},"type":"object"},"type":"array"},"method":{"type":"string"},"name":{"type":"string"},"page_url":{"type":"string"},"pokeinvest_id":{"example":"pi_16322","type":"string"},"population":{"properties":{"cgc_total":{"type":["integer","null"]},"psa_10":{"type":["integer","null"]},"psa_last_updated":{"type":["string","null"]},"psa_total":{"type":["integer","null"]}},"type":"object"},"set_name":{"type":"string"},"tcgplayer_id":{"type":["string","null"]},"ungraded":{"properties":{"change_vs_previous_window":{"description":"fraction, e.g. -0.12 is 12% down","type":["number","null"]},"high_usd":{"type":["number","null"]},"low_usd":{"type":["number","null"]},"median_usd":{"type":["number","null"]},"newest_sale":{"properties":{"date":{"type":["string","null"]},"usd":{"type":["number","null"]}},"type":"object"},"sales":{"type":"integer"},"window_days":{"type":"integer"}},"type":["object","null"]}},"type":"object"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"type":"string"}},"type":"object"}}},"description":"Missing, unknown or exhausted key"},"404":{"description":"card not found"},"429":{"description":"monthly call limit reached"}},"security":[{"ApiKeyHeader":[]},{"BearerKey":[]}],"summary":"Prices by grade","tags":["Cards"]}},"/api/sales/{card}":{"get":{"description":"The sales behind a price, newest first, up to 500.","parameters":[{"description":"PokeInvest ID (pi_16322), the numeric ID in a card URL, or a TCGplayer product ID","example":"pi_16322","in":"path","name":"card","required":true,"schema":{"type":"string"}},{"example":"PSA 10","in":"query","name":"grade","schema":{"type":"string"}},{"in":"query","name":"days","schema":{"default":1095,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"count":{"type":"integer"},"currency":{"type":"string"},"filter":{"type":"object"},"name":{"type":"string"},"pokeinvest_id":{"example":"pi_16322","type":"string"},"sales":{"items":{"properties":{"date":{"type":"string"},"grade":{"type":["string","null"]},"grader":{"type":["string","null"]},"platform":{"type":"string"},"price_usd":{"type":"number"},"sale_type":{"type":"string"},"title":{"type":["string","null"]},"url":{"type":["string","null"]}},"type":"object"},"type":"array"},"set_name":{"type":"string"},"tcgplayer_id":{"type":["string","null"]}},"type":"object"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"properties":{"error":{"type":"string"}},"type":"object"}}},"description":"Missing, unknown or exhausted key"},"404":{"description":"card not found"},"429":{"description":"monthly call limit reached"}},"security":[{"ApiKeyHeader":[]},{"BearerKey":[]}],"summary":"Completed sales","tags":["Cards"]}},"/api/search":{"get":{"description":"Keyless. \"charizard base set 4\", \"umbreon vmax 215\". Returns IDs for the other calls.","parameters":[{"in":"query","name":"q","required":true,"schema":{"type":"string"}},{"in":"query","name":"limit","schema":{"default":8,"maximum":25,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"cards":{"items":{"properties":{"id":{"type":"string"},"name":{"type":"string"},"page_url":{"type":"string"},"psa_10_usd":{"type":["number","null"]},"psa_population":{"type":["integer","null"]},"set":{"type":"string"},"ungraded_usd":{"type":["number","null"]}},"type":"object"},"type":"array"}},"type":"object"}}},"description":"OK"},"404":{"description":"card not found"}},"summary":"Find a card ID by name","tags":["Search"]}},"/data-api/free":{"post":{"description":"1,000 calls a month, issued instantly. One key per email; a repeat returns the same key.","requestBody":{"content":{"application/json":{"schema":{"properties":{"email":{"format":"email","type":"string"}},"required":["email"],"type":"object"}},"application/x-www-form-urlencoded":{"schema":{"properties":{"email":{"format":"email","type":"string"}},"required":["email"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"api_key":{"type":"string"},"attribution":{"type":"string"},"calls_per_month":{"type":"integer"},"docs":{"type":"string"},"example":{"type":"string"},"new":{"type":"boolean"}},"type":"object"}}},"description":"the key"},"400":{"description":"bad email"},"429":{"description":"too many keys from one address today"}},"summary":"Get a free API key","tags":["Keys"]}}},"servers":[{"url":"https://www.pokeinvest.io"}]}
