<?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: Laurent HALBRUN</title>
    <description>The latest articles on DEV Community by Laurent HALBRUN (@laurent_halbrun_0dbdc876c).</description>
    <link>https://dev.to/laurent_halbrun_0dbdc876c</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%2F4040692%2F097ea4d9-f571-4c8c-828d-b869f86f06ad.png</url>
      <title>DEV Community: Laurent HALBRUN</title>
      <link>https://dev.to/laurent_halbrun_0dbdc876c</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/laurent_halbrun_0dbdc876c"/>
    <language>en</language>
    <item>
      <title>I built 53 pay-per-call APIs that AI agents can pay for autonomously (x402 + USDC on Base)</title>
      <dc:creator>Laurent HALBRUN</dc:creator>
      <pubDate>Wed, 22 Jul 2026 01:59:37 +0000</pubDate>
      <link>https://dev.to/laurent_halbrun_0dbdc876c/i-built-53-pay-per-call-apis-that-ai-agents-can-pay-for-autonomously-x402-usdc-on-base-11a1</link>
      <guid>https://dev.to/laurent_halbrun_0dbdc876c/i-built-53-pay-per-call-apis-that-ai-agents-can-pay-for-autonomously-x402-usdc-on-base-11a1</guid>
      <description>&lt;p&gt;AI agents are getting good at &lt;em&gt;deciding&lt;/em&gt; what data they need. What they're bad at is the human paperwork around getting it: creating accounts, clicking email confirmations, pasting API keys, entering a credit card. Every one of those is a wall an autonomous agent can't climb on its own.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.x402.org/" rel="noopener noreferrer"&gt;x402&lt;/a&gt; removes that wall. It's an open payment protocol: the server answers &lt;code&gt;402 Payment Required&lt;/code&gt;, the client pays a few cents in USDC on-chain, and the request goes through — no account, no key, no human. So I built a farm of APIs designed to be consumed exactly that way.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's in it
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Base URL:&lt;/strong&gt; &lt;code&gt;https://api.x-402.online/&lt;/code&gt; — the root returns a machine-readable JSON catalog, and there's an &lt;code&gt;/openapi.json&lt;/code&gt; + &lt;code&gt;/llms.txt&lt;/code&gt; for agents.&lt;/p&gt;

&lt;p&gt;53 endpoints, all pay-per-call in USDC (from &lt;strong&gt;$0.005&lt;/strong&gt;), settled on &lt;strong&gt;Base&lt;/strong&gt; (also accepts Polygon &amp;amp; Arbitrum):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Web tooling&lt;/strong&gt; — clean-markdown extraction, JS-rendered HTML, screenshots, PDF, link/meta extraction&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;French business &amp;amp; open data&lt;/strong&gt; — company lookup (SIREN/SIRET), full KYB dossiers, financial scores, real-estate AVM &amp;amp; investment scorecards, BODACC, cadastre, DVF sale prices, geocoding, weather, holidays, IBAN validation…&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;UK company data&lt;/strong&gt; — Companies House profiles, officers, PSC/beneficial owners, one-call KYB verdict&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;US public companies&lt;/strong&gt; — SEC EDGAR profiles, annual financials, filings, one-call financial snapshot&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The friction &lt;em&gt;is&lt;/em&gt; the value: these wrap sources that need signup, keys, or heavy parsing (XBRL, registries) and expose them as one clean, payable call.&lt;/p&gt;

&lt;h2&gt;
  
  
  How an agent uses it
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;wrapFetchWithPaymentFromConfig&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@x402/fetch&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;ExactEvmScheme&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@x402/evm&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;privateKeyToAccount&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;viem/accounts&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;account&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;privateKeyToAccount&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;AGENT_KEY&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;fetchPaid&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;wrapFetchWithPaymentFromConfig&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;schemes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[{&lt;/span&gt; &lt;span class="na"&gt;network&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;eip155:8453&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;client&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;ExactEvmScheme&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;account&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;}],&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="c1"&gt;// The wrapper handles the 402 -&amp;gt; sign -&amp;gt; retry automatically.&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;fetchPaid&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;https://api.x-402.online/v1/us/snapshot?ticker=AAPL&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The agent's wallet just needs USDC on Base. No gas needed on the client side — the facilitator settles.&lt;/p&gt;

&lt;h2&gt;
  
  
  It's live and already settling
&lt;/h2&gt;

&lt;p&gt;Real on-chain payments are going through today (verifiable on &lt;a href="https://basescan.org/" rel="noopener noreferrer"&gt;BaseScan&lt;/a&gt;). If you're building agents that need company data, web extraction, or open-data lookups without the account/key dance, point them at &lt;code&gt;https://api.x-402.online/&lt;/code&gt; and let them pay their own way.&lt;/p&gt;

&lt;p&gt;Feedback welcome — happy to add endpoints agents actually ask for.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>web3</category>
      <category>api</category>
    </item>
  </channel>
</rss>
