<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Mohamed Arafa</title>
    <description>The latest articles on DEV Community by Mohamed Arafa (@mohamed_arafa_87bd1baa415).</description>
    <link>https://dev.to/mohamed_arafa_87bd1baa415</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4196198%2F0fad77eb-b737-4582-84b7-e8be2a2a773d.png</url>
      <title>DEV Community: Mohamed Arafa</title>
      <link>https://dev.to/mohamed_arafa_87bd1baa415</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mohamed_arafa_87bd1baa415"/>
    <language>en</language>
    <item>
      <title>Selling APIs to AI agents with x402: 69 endpoints, Cloudflare Workers, zero API keys</title>
      <dc:creator>Mohamed Arafa</dc:creator>
      <pubDate>Tue, 20 Oct 2026 12:48:53 +0000</pubDate>
      <link>https://dev.to/mohamed_arafa_87bd1baa415/selling-apis-to-ai-agents-with-x402-69-endpoints-cloudflare-workers-zero-api-keys-34na</link>
      <guid>https://dev.to/mohamed_arafa_87bd1baa415/selling-apis-to-ai-agents-with-x402-69-endpoints-cloudflare-workers-zero-api-keys-34na</guid>
      <description>&lt;h2&gt;
  
  
  The pitch
&lt;/h2&gt;

&lt;p&gt;An AI agent needs the EUR/EGP rate. It calls &lt;code&gt;GET /v1/fx/EUR&lt;/code&gt;. The server answers &lt;code&gt;402 Payment Required&lt;/code&gt; with a price ($0.01) and a wallet. The agent signs a USDC transfer on Base, retries with an &lt;code&gt;X-PAYMENT&lt;/code&gt; header, gets JSON. No signup, no API key, no invoice. That's x402.&lt;/p&gt;

&lt;p&gt;I spent two nights building three services on top of it, all on Cloudflare Workers.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's live
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;WorldData402&lt;/strong&gt; — 39 data endpoints: FX for 160+ currencies, historical rates, SEC company filings, EU public tenders, World Bank indicators, EU VAT validation, public holidays, geocoding, weather, air quality, earthquakes, Wikipedia, arXiv, Crossref, RDAP, DNS, npm/PyPI, barcodes. $0.01–$0.05 per call.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Inference402&lt;/strong&gt; — 15 endpoints on Cloudflare Workers AI: chat (small/large), structured JSON output, summarize, translate (plus an Arabic-tuned route that handles Egyptian dialect), extract, classify, sentiment, keywords, rewrite, embeddings, moderation, image description, Whisper transcription. $0.002–$0.02.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Briefs402&lt;/strong&gt; — 10 composite reports (company, country, market, tenders, domain due-diligence, location, research literature, product, package risk, long-document translation). It calls the other two internally and sells the finished brief for $0.10–$0.50.&lt;/p&gt;

&lt;h2&gt;
  
  
  Stack
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Hono + &lt;code&gt;@x402/hono&lt;/code&gt; for the paywall&lt;/li&gt;
&lt;li&gt;PayAI facilitator (no account needed, 1,000 free settlements, then ~$0.002 each)&lt;/li&gt;
&lt;li&gt;Cloudflare Workers AI for models (10k neurons/day free, then $0.011 per 1k)&lt;/li&gt;
&lt;li&gt;One &lt;code&gt;catalog.js&lt;/code&gt; per service generates routes, &lt;code&gt;/.well-known/x402&lt;/code&gt;, &lt;code&gt;/openapi.json&lt;/code&gt; and &lt;code&gt;SKILL.md&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Settlement happens only after a 2xx response, so failed calls are never charged&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Things that bit me
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;x402.org/facilitator&lt;/code&gt; is testnet-only. For Base mainnet you need CDP (needs KYC) or PayAI/Mogami (no account).&lt;/li&gt;
&lt;li&gt;x402scan needs &lt;code&gt;/.well-known/x402&lt;/code&gt; plus an OpenAPI with an input schema on every paid route, or it won't list the route.&lt;/li&gt;
&lt;li&gt;Several US government APIs (Treasury, USAspending) refuse Cloudflare Workers egress IPs with TLS failures. GDELT rate-limits the whole Workers IP pool.&lt;/li&gt;
&lt;li&gt;RapidAPI shows &lt;code&gt;operationId&lt;/code&gt; as the endpoint name, not &lt;code&gt;summary&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Distribution
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;x402scan: all three listed&lt;/li&gt;
&lt;li&gt;Circle Agent Marketplace: submitted&lt;/li&gt;
&lt;li&gt;RapidAPI (card payments, free tier): &lt;a href="https://rapidapi.com/MohamedArafa/api/worlddata402" rel="noopener noreferrer"&gt;https://rapidapi.com/MohamedArafa/api/worlddata402&lt;/a&gt; and &lt;a href="https://rapidapi.com/MohamedArafa/api/inference402" rel="noopener noreferrer"&gt;https://rapidapi.com/MohamedArafa/api/inference402&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;MCP server for Claude Desktop / Claude Code / Cursor: &lt;code&gt;npx -y worlddata402-mcp&lt;/code&gt; — all 69 endpoints as tools, paid from a small wallet via &lt;code&gt;WALLET_PRIVATE_KEY&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Honest status
&lt;/h2&gt;

&lt;p&gt;48 hours live, ~2k requests (all mine), 0 paid calls. Supply is done. If you've sold to agents and found what drives discovery, I'd like to hear it.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>cloudflare</category>
      <category>api</category>
    </item>
  </channel>
</rss>
