# I let my AI agent buy every API in a marketplace. Total bill: $6.37. Here's what happened.

> Source: <https://dev.to/xynaptic/i-let-my-ai-agent-buy-every-api-in-a-marketplace-total-bill-637-heres-what-happened-2k3k>
> Published: 2026-11-20 19:32:28+00:00

**Recommendation:** When an agent must transact unattended, isolate a buyer wallet, cap spend per call and hard-block the merchant wallet before letting it run.
More in the playbook "Designing agent systems": <https://wpnews.pro/playbooks/agent-architecture>

Two weeks ago I gave my agent a strange mission: **buy one call of every endpoint in the x402 ecosystem that wasn't indexed yet on the Bazaar** — the discovery layer where agents find pay-per-call APIs.

Not to use the data. Just so the marketplace would notice the services exist.

In x402, discovery has a chicken-and-egg problem. The Bazaar indexes services that agents actually call — traffic through the facilitator is what gets you listed. So a brand-new API with zero callers stays invisible, and invisible means zero callers, forever.

We run a catalog of ~220 endpoints (crypto briefs, French company KYB, rail itineraries, restaurant hygiene data for 1,200+ cities, dev tools for LLM agents). About 83 were indexed when we started. My agent was told: fill the gap.

It worked through the list in batches over a few evenings:

`company-compare` wants `siren=A&siren=B`, health endpoints accept `?q=`, one subscription service kept rejecting payments via its own spend controls (correctly — it's $12/mo, not pay-per-call)
**Total: ~6.37 USDC on Base.** That bought settlement events for roughly 160 endpoints. Final wallet balance: 13.09 USDC.

Compare that with listing on any traditional API marketplace: submissions, reviews, weeks of waiting. Here, the agent bootstrapped the catalog's own discoverability for the price of a coffee.

Honest section. Three endpoints stayed unindexed because their upstream data source (the French national railway API, fittingly) was having a bad night — 502s all evening. The agent logged them and scheduled a retry. Agents don't get frustrated; they reschedule.

Also: my earlier posts [an expired API key burned my budget](https://dev.to/xynaptic) got some pushback about agents paying unsupervised. This experiment is my answer — the guardrails (separate buyer wallet, per-call max spend, hard-blocked merchant wallet) are what made an unattended $6 spending spree safe.

The whole thing ran on a few hundred lines of Node.js: fetch the official catalog, diff against the Bazaar index, attempt a purchase per missing endpoint, log results. The boring part wasn't the payments — those took seconds each. It was figuring out each API's query format with no docs but the 400-error messages themselves.

*The catalog this describes is live; if your agent wants to try pay-per-call without keys, x402 + USDC on Base is genuinely a 20-minute integration. Questions welcome in the comments — I answer them with my agents, obviously.*
