{"openapi":"3.1.0","info":{"title":"reusefulshop API","version":"1.0.0","description":"Second-hand price intelligence. What is a used item worth? Pay per call in USDC on Base via x402 (HTTP 402 payment challenge) — no signup, no API key. Fresh answers are cached for 24h; first-time items are fetched on demand.","contact":{"name":"reusefulshop","url":"https://reusefulshop.com/about"},"license":{"name":"Proprietary API; public pages free to read"}},"servers":[{"url":"https://reusefulshop.com"}],"paths":{"/api/worth":{"get":{"operationId":"getWorth","summary":"Used item price estimate","description":"Returns low / typical / high price estimate with sample size and confidence. Price: $0.01 per call via x402 (USDC on Base, eip155:8453). Unpaid requests receive HTTP 402 with a PAYMENT-REQUIRED header.","parameters":[{"name":"q","in":"query","required":true,"description":"Item to price, e.g. \"used playstation 5 console\"","schema":{"type":"string"}}],"responses":{"200":{"description":"Price estimate","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Estimate"}}}},"402":{"description":"Payment required (x402 challenge in the PAYMENT-REQUIRED header)"}}}},"/api/deal":{"get":{"operationId":"checkDeal","summary":"Deal check for an asking price","description":"Compares an asking price against the market range and returns a verdict. Price: $0.01 per call via x402.","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string"}},{"name":"price","in":"query","required":true,"description":"Asking price in GBP","schema":{"type":"number"}}],"responses":{"200":{"description":"Deal verdict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DealResult"}}}},"402":{"description":"Payment required (x402 challenge)"}}}},"/api/history":{"get":{"operationId":"getHistory","summary":"Tracked price history","description":"Daily price snapshots for an item (history is young and grows daily). Price: $0.02 per call via x402.","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Snapshots and trend","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HistoryResult"}}}},"402":{"description":"Payment required (x402 challenge)"}}}},"/api/sold":{"get":{"operationId":"getSoldPrices","summary":"Real sold prices from the operator shop","description":"Actual transaction prices (median, range, count, latest) from the operator's own eBay shop for matching items. Stronger than asking prices. Price: $0.01 per call via x402. /api/worth answers include the same block as `sold` when available.","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Sold price statistics","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SoldResult"}}}},"402":{"description":"Payment required (x402 challenge)"}}}},"/health":{"get":{"operationId":"health","summary":"Service status","description":"Free. Returns service health, payment status and integration flags.","responses":{"200":{"description":"Status object"}}}}},"components":{"schemas":{"Estimate":{"type":"object","properties":{"found":{"type":"boolean"},"query":{"type":"string"},"title":{"type":"string"},"category":{"type":"string"},"currency":{"type":"string","examples":["GBP"]},"low":{"type":"number"},"typical":{"type":"number"},"high":{"type":"number"},"basis":{"type":"string","enum":["asking","market"]},"sample":{"type":"integer","description":"Number of listings used"},"confidence":{"type":"number","description":"0 to 1"},"source":{"type":"string","examples":["ebay","discogs"]},"sourceUrl":{"type":"string"},"updatedAt":{"type":"string","format":"date-time"},"sold":{"$ref":"#/components/schemas/SoldStats"}}},"SoldStats":{"type":"object","description":"Real sold prices from the operator shop (actual transactions)","properties":{"median":{"type":"number"},"low":{"type":"number"},"high":{"type":"number"},"count":{"type":"integer"},"latest":{"type":"string","description":"Date of most recent matching sale"},"source":{"type":"string","enum":["shop"]}}},"SoldResult":{"allOf":[{"type":"object","properties":{"found":{"type":"boolean"},"query":{"type":"string"},"currency":{"type":"string"}}},{"$ref":"#/components/schemas/SoldStats"}]},"DealResult":{"type":"object","properties":{"found":{"type":"boolean"},"query":{"type":"string"},"asking":{"type":"number"},"currency":{"type":"string"},"low":{"type":"number"},"typical":{"type":"number"},"high":{"type":"number"},"verdict":{"type":"string","enum":["great deal","good deal","fair price","above average","overpriced","unknown"]},"savingsVsTypical":{"type":"number"},"confidence":{"type":"number"},"updatedAt":{"type":"string","format":"date-time"}}},"HistoryResult":{"type":"object","properties":{"found":{"type":"boolean"},"query":{"type":"string"},"currency":{"type":"string"},"snapshots":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"price":{"type":"number"}}}},"changePct":{"type":"number"},"updatedAt":{"type":"string","format":"date-time"}}}}}}