{"slug": "i-let-my-ai-agent-buy-every-api-in-a-marketplace-total-bill-6-37-here-s-what", "title": "I let my AI agent buy every API in a marketplace. Total bill: $6.37. Here's what happened.", "summary": "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.", "body_md": "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.\n\nNot to use the data. Just so the marketplace would notice the services exist.\n\nIn 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.\n\nWe 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.\n\nIt worked through the list in batches over a few evenings:\n\n`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)\n**Total: ~6.37 USDC on Base.** That bought settlement events for roughly 160 endpoints. Final wallet balance: 13.09 USDC.\n\nCompare 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.\n\nHonest 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.\n\nAlso: 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.\n\nThe 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.\n\n*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.*", "url": "https://wpnews.pro/news/i-let-my-ai-agent-buy-every-api-in-a-marketplace-total-bill-6-37-here-s-what", "canonical_source": "https://dev.to/xynaptic/i-let-my-ai-agent-buy-every-api-in-a-marketplace-total-bill-637-heres-what-happened-2k3k", "published_at": "2026-11-20 19:32:28+00:00", "updated_at": "2026-11-20 19:45:53.448341+00:00", "lang": "en", "topics": ["ai-agents", "agent-protocols", "ai-tools"], "entities": ["x402", "Bazaar", "Base", "USDC", "Node.js"], "also_reported_by": [], "takeaway": "An agent can bootstrap pay-per-call API discoverability by spending about 6.37 USDC to trigger settlement events for ~160 unindexed endpoints, with a separate buyer wallet, per-call spend caps and a blocked merchant wallet containing the risk.", "recommendation": {"advice": "When an agent must transact unattended, isolate a buyer wallet, cap spend per call and hard-block the merchant wallet before letting it run.", "playbook": "agent-architecture", "playbook_url": "https://wpnews.pro/playbooks/agent-architecture"}, "alternates": {"html": "https://wpnews.pro/news/i-let-my-ai-agent-buy-every-api-in-a-marketplace-total-bill-6-37-here-s-what", "markdown": "https://wpnews.pro/news/i-let-my-ai-agent-buy-every-api-in-a-marketplace-total-bill-6-37-here-s-what.md", "text": "https://wpnews.pro/news/i-let-my-ai-agent-buy-every-api-in-a-marketplace-total-bill-6-37-here-s-what.txt", "jsonld": "https://wpnews.pro/news/i-let-my-ai-agent-buy-every-api-in-a-marketplace-total-bill-6-37-here-s-what.jsonld"}}