Skip to content

Query indexed data

Once a subgrove is indexing, you can query it with SQL or GraphQL. Every response carries a proof, so results are verifiable, not just trusted.

The dashboard has a query panel for each subgrove:

  • SQL — run queries against the indexed tables.
  • GraphQL — query the entities defined by the subgrove’s schema.
  • Charts — instant visualizations for common shapes.

Each result shows a ✓ Willow verified line once its proofs check out.

Query the entities from the subgrove’s schema. Point at the subgrove by id:

Terminal window
curl -X POST https://api.willow.tech/graphql/uniswap-v3-eth-usdc \
-H 'content-type: application/json' \
-d '{
"query": "{ swaps(first: 10, orderBy: blockNumber, orderDirection: desc) { sqrtPriceX96 blockNumber } }"
}'

The response includes the data and a proof. The SDKs verify that proof automatically; if you call the endpoint directly, you can verify it yourself with the SDK’s verification helpers.

Run SQL against the indexed tables for the subgrove. Results come back with the same verifiable proofs as GraphQL.

With an SDK, verification is automatic — you get verified data or an error:

import { WillowClient } from '@willow-network/sdk';
const client = new WillowClient({ apiUrl: 'https://api.willow.tech' });
// Returns verified rows, or throws if a proof fails.
const rows = await client.query('uniswap-v3-eth-usdc', {
/* SQL or GraphQL — see the SDK reference */
});

Querying requires a free account and an API key, and usage is metered. The free tier is generous and needs no card; creating subgroves and running indexers is billed separately. See pricing for current limits.