cd /news/ai-agents/i-let-my-ai-agent-buy-every-api-in-a… · home › topics › ai-agents › article
[ARTICLE · art-173436] src=dev.to ↗ pub= topic=ai-agents verified=true sentiment=↑ positive

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

A developer used an autonomous agent to purchase one call of every unindexed endpoint in the x402 pay-per-call ecosystem, spending about 6.37 USDC on Base to generate settlement events for roughly 160 of a catalog's ~220 APIs and bootstrap their discoverability on the Bazaar index. The agent ran on a few hundred lines of Node.js, diffing the official catalog against the Bazaar index and attempting a purchase per missing endpoint, with three endpoints left unindexed after upstream 502s and rescheduled for retry. The developer credited guardrails — a separate buyer wallet, per-call spend caps and a hard-blocked merchant wallet — with making the unattended spending spree safe.

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 playbook: Designing agent systems
by read2 min views7 publishedNov 20, 2026

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 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.

── more in #ai-agents 4 stories · sorted by recency
── more on @x402 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/i-let-my-ai-agent-bu…] indexed:0 read:2min 2026-11-20 · —