A movie catalogue concierge over TMDB. An agent pays a tenth of a cent to search, a tenth of a cent for the full detail bundle — cast, crew, streaming providers, release dates — and $0.002 for ranked recommendations with an explicit score and reasons per title.
git clone https://github.com/nirholas/x402-movies
cd x402-movies && npm install
npm run dev
| Route | Price | Returns |
|---|---|---|
GET /search | $0.001 | Matching titles with year, rating, vote count, overview and artwork URLs |
GET /movie/:id | $0.001 | Metadata, tagline, runtime, budget/revenue, genres, cast and key crew, streaming and rental providers by country, and release dates with certifications |
GET /recommendations/:id | $0.002 | Ranked related titles, each with a 0-1 `score` and the `reasons` behind its placement — rating, vote confidence, era proximity, language match and popularity |
GET /, GET /health, GET /.well-known/x402 |
free | Service info, liveness, discovery manifest |
Every paid route returns the purchased artifact in the 200 response body.
The 402 challenge advertises both. Your client picks whichever it can sign.
base-sepolia · base on mainnetsolana · solana-devnet on devnetimport { wrapFetchWithPayment, createSigner } from "x402-fetch";
const signer = await createSigner("base-sepolia", process.env.PRIVATE_KEY!);
const payFetch = wrapFetchWithPayment(fetch, signer);
const res = await payFetch(
"http://localhost:4024/search?q=blade%20runner"
);
const artifact = await res.json(); // purchased artifact, in-response