Coinbase SQL API

The SQL API enables you to write performant, high-freshness, and endlessly flexible SQL queries against onchain data.

GitHub OpenAPI
Business capability
On-Chain Data & Indexing AE-240.30

Operations 3

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

POST /v2/data/query/run Query indexed blockchain data with SQL · Run SQL Query #
Ask an LLM
“How do I run a SQL query against indexed transactions and decoded logs from Coinbase data?”
“Can I cache the results of a read-only blockchain query?”
Tell an agent
Run this SQL query against Coinbase indexed blockchain data: {sql}.
Query the blockchain data with SQL {sql} and cache the results when set to {cache}.
GET /v2/data/query/grammar Get the SQL grammar for the SQL API · Get SQL grammar #
Ask an LLM
“What SQL syntax does the SQL API accept?”
“Where can I see the ANTLR4 grammar the SQL API uses?”
Tell an agent
Get the SQL grammar for the SQL API.
Show the ANTLR4 grammar used to validate SQL queries.
GET /v2/data/query/schema Get the schema of indexed blockchain tables · Get schema details #
Ask an LLM
“Which tables and columns are available in the SQL API?”
“What data types and indexed fields does each table have?”
Tell an agent
Get the schema for the {database} database.
Show the schema of table {table}.

Documentation

Specifications

Schemas & Data

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/coinbase:coinbase-sql-api-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

coinbase-sql-api-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Coinbase Developer Platform SQL API
  description: The Coinbase Developer Platform APIs - leading the world's transition onchain.
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
  version: 2.0.0
  contact:
    name: Coinbase Developer Platform
    email: cdp@coinbase.com
    url: https://cdp.coinbase.com
servers:
- url: https://api.cdp.coinbase.com/platform
  description: The production server of the CDP APIs.
security:
- apiKeyAuth: []
tags:


# --- truncated at 32 KB (75 KB total) ---
# Full source: https://artifacts.apis.io/coinbase/openapi/coinbase-sql-api-api-openapi.yml