A points-of-interest concierge over OpenStreetMap. An agent sends a coordinate and a category, pays $0.002 in USDC, and gets real places back in the same response — opening hours, phone, website, address, and every OSM tag. Optional Yelp ratings and reviews on the detail route.
git clone https://github.com/nirholas/x402-places
cd x402-places && npm install
npm run dev
| Route | Price | Returns |
|---|---|---|
GET /search | $0.002 | POIs near the coordinate: name, category, geo, opening hours, phone, website, address, cuisine, full OSM tags |
GET /detail/:id | $0.002 | The complete OSM record for that place plus `enrichment` — rating, review count, price level and reviews (live Yelp when keyed, fixture otherwise) |
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:4022/search?lat=41.3851&lon=2.1734&radius=300&category=cafe&limit=2"
);
const artifact = await res.json(); // purchased artifact, in-response