CDP SQL API now accepts x402 payments: Onchain Data for autonomous agents
February 12, 2026

By: Josh Nickerson and Shane O'Brien
We're excited to announce that Coinbase Developer Platform’s SQL API now supports x402 payments, enabling AI agents to autonomously query Base blockchain data and pay per request. No API keys, no accounts, and no human approval required.
What's new
The CDP SQL API provides access to indexed Base blockchain data (blocks, transactions, token transfers, decoded events, and more) using intuitive Structured Query Language (SQL) requests. Until now, accessing this data required a CDP Client API key and account setup.
With x402 integration, agents can now:
Query Base data on demand: No pre-registration or API key management
Pay per request: $0.10 per SQL query, settled instantly onchain in USDC
Operate autonomously: Discover the API via the x402 Bazaar, pay, and receive data in a single flow
Two ways to access
The SQL API is now available through two endpoints:
Access Method | Endpoint | Auth | Billing |
|---|---|---|---|
API Key | api.cdp.coinbase.com/platform/v2/data/query/run | CDP Client API Key | Monthly invoice |
x402 Payment | x402.cdp.coinbase.com/platform/v2/data/query/run | x402 payment signature | $0.10 per query, instant |
Why this matters
AI agents are increasingly performing onchain analysis as part of broader agentic task flows: monitoring wallet activity, tracking token flows, analyzing NFT markets, or building real-time dashboards. But traditional API access patterns create friction:
Agents need API keys provisioned in advance
Developers must manage credentials and rate limits
Billing happens monthly, disconnected from actual usage
x402 flips this model. The agent discovers the SQL API in the Bazaar, signs a $0.10 USDC payment, and receives query results, all in a single HTTP request. No accounts, no keys, and no invoices.
How it works
Here's what an x402 payment flow looks like:
-> POST https://x402.cdp.coinbase.com/platform/v2/data/query/run
<- 402 Payment Required
scheme=exact network=eip155:8453 amount=100000 asset=0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913
Agent signsUSDCpayment...
-> POST https://x402.cdp.coinbase.com/platform/v2/data/query/run (with PAYMENT-SIGNATURE header)
<- 200 OK
{ "metadata": { "rowCount": 1 }, "result": [...] }
The agent receives a 402 response with payment requirements, signs a USDC payment on Base, and retries with the payment signature. The facilitator verifies and settles the payment, and the API returns results.
Available data
Table | Description |
|---|---|
base.blocks | Block metadata including timestamps, gas usage, and miner |
base.transactions | Transaction data including hash, addresses, value, and gas |
base.transfers | Token transfer events with addresses and amounts |
base.events | Decoded event logs with parameters and signatures |
base.encoded_logs | Raw logs for events that couldn't be decoded |
Query latency is under 500ms, with data freshness under 250ms from tip of chain.
Zooming out
This integration is part of our broader vision for agentic infrastructure. As AI agents become more autonomous and capable, they need infrastructure that matches their operating model:
Discoverable services: x402 Bazaar lets agents find capabilities dynamically
Autonomous payments: x402 enables pay-per-use without accounts or invoices
Onchain data: SQL API provides the information agents need to make decisions
SQL API is the first CDP service available via x402. We're working to bring more CDP services into the x402 ecosystem, enabling agents to access payments, trading, wallets, and onchain tools through the same autonomous payment flow.
Get started
Ready to try it out?
SQL API documentation: Explore available data and schemas
x402 quickstart for buyers: Learn how x402 payments work
x402 Bazaar: Discover x402-enabled services
Agentic Wallets: Give your agents payment capabilities
Questions?
Connect with our team on Discord
#onchain-data for SQL API questions
#x402 for questions about x402 payments
We can’t wait to see what you build.