reusefulshop

Developer docs

Everything a developer (or an agent) needs: endpoints, payment flow, code examples, MCP setup.

Endpoints & prices

EndpointReturnsPrice
GET /api/worth?q=<item>low / typical / high, sample size, confidence, source$0.01
GET /api/deal?q=<item>&price=<asking>verdict: great deal / good deal / fair price / above average / overpriced$0.01
GET /api/history?q=<item>daily price snapshots$0.02
GET /api/sold?q=<item>real sold prices from our own eBay shop (actual transactions)$0.01
GET /healthstatus + integrationsfree

/api/worth answers also include a sold block automatically when matching shop sales exist.

Payment: x402 v2, USDC on Base (eip155:8453), facilitator https://x402.dexter.cash. No signup, no API key.

Quickstart — curl

# 1. ask for the price (no payment yet)
curl -i "https://reusefulshop.com/api/worth?q=used+playstation+5+console"
# → HTTP 402 with a PAYMENT-REQUIRED header describing the exact price

# 2. pay with any x402 client, then retry with the payment header
# → HTTP 200 + JSON

Quickstart — TypeScript (buyer)

import { wrapFetchWithPaymentFromConfig } from '@x402/fetch';
import { ExactEvmScheme } from '@x402/evm/exact/client';
import { privateKeyToAccount } from 'viem/accounts';

const account = privateKeyToAccount(process.env.PRIVATE_KEY as `0x${string}`);
const fetchWithPayment = wrapFetchWithPaymentFromConfig(fetch, {
  schemes: [{ network: 'eip155:*', client: new ExactEvmScheme(account) }],
});

const res = await fetchWithPayment(
  'https://reusefulshop.com/api/worth?q=used+playstation+5+console'
);
console.log(res.status, await res.json());

The buyer wallet only needs USDC on Base; the facilitator covers gas. A working example lives in the project's scripts/pay-test.mjs.

MCP server (Claude, Cursor, any MCP client)

Endpoint: https://reusefulshop.com/mcp (Streamable HTTP). Tools: get_worth, check_deal, get_history. Cached answers are free via MCP.

Cursor / generic MCP config:

{
  "mcpServers": {
    "reusefulshop": { "url": "https://reusefulshop.com/mcp" }
  }
}

Claude Desktop: Settings → Connectors → Add custom connector → URL above.

Behaviour & errors

  • 402 — payment required (header carries price, asset, payTo, network).
  • 400 — missing or invalid query parameters (e.g. price=0 for /api/deal).
  • 404 — unknown route; JSON error lists the valid endpoints.
  • Fresh answers: cached for 24h; brand-new items are fetched on first request (typically 5–15 seconds; the API returns the cached answer once ready).
  • Free tier: 10 browser-style lookups per day per IP; machine requests always get the 402 challenge.

Machine-readable