Developer docs
Everything a developer (or an agent) needs: endpoints, payment flow, code examples, MCP setup.
Endpoints & prices
| Endpoint | Returns | Price |
|---|---|---|
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 /health | status + integrations | free |
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 + JSONQuickstart — 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());
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" }
}
}
Behaviour & errors
- 402 — payment required (header carries price, asset, payTo, network).
- 400 — missing or invalid query parameters (e.g.
price=0for /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
- /openapi.json — OpenAPI 3.1 spec
- /.well-known/x402.json — resource manifest
- /data/sample.json — free sample dataset (100 items)
- /llms.txt — summary for AI assistants