Get Query Result logo

Catalog action Blockchain Data

Retrieve results from a Dune Analytics query by query ID. Returns cached results including rows, column metadata, and execution timing. Supports pagination, sorting, and filtering. Ideal for: blockchain analytics, on-chain metrics, historical data analysis, custom dashboards.

At a Glance

FieldValue
Action IDdune-get-query-result
CategoryBlockchain Data
ConnectorNot required
Requires gasNo
Funds movementNone declared
Tagsdune, query, analytics, blockchain, data, read

Payload Schema

FieldTypeRequiredDescription
queryIdnumberYesThe Dune query ID to fetch results for.
limitnumberNoMaximum number of rows to return. Default: returns all rows.
offsetnumberNoNumber of rows to skip for pagination.
sortBystringNoSQL ORDER BY clause-style expression defining result sort order (e.g., 'date desc', 'amount asc').
filtersstringNoSQL WHERE clause-style expression to filter result rows. Incompatible with sampleCount.
columnsstringNoComma-separated list of specific column names to return. Omit to return all columns.
sampleCountnumberNoReturn uniformized sample of specified row count from results. Incompatible with offset, limit, and filters.
allowPartialResultsbooleanNoEnable retrieval of query results that exceeded size limits with only partial data available.
ignoreMaxDatapointsPerRequestbooleanNoBypass default 250,000 datapoint limit safeguard. Use to prevent accidental credit overages.

Result Schema

FieldTypeRequiredDescription
executionIdstringYesUnique identifier for this query execution.
queryIdnumberYesThe query ID that was executed.
isExecutionFinishedbooleanYesWhether the query execution has finished.
statestringYesCurrent execution state.
submittedAtstringYesISO timestamp when the query was submitted.
expiresAtstringYesISO timestamp when the cached results expire.
executionStartedAtstringYesISO timestamp when execution started.
executionEndedAtstringYesISO timestamp when execution ended.
cancelledAtstringNoISO timestamp when execution was cancelled (if applicable).
resultobjectNoQuery results (only present when state is COMPLETED).
errorobjectNoError information (only present when state is FAILED).
nextOffsetnumberNoOffset for fetching next page of results (for pagination).
nextUristringNoURI for fetching next page of results.

Examples

json
{ "type": "dune-get-query-result", "payload": { "queryId": "status:open" }, "children": []}

Payload fields can use workflow expressions such as {{$trigger.body.amount}}, {{$nodes.fetch.result.price}}, and {{$props.asset}} when the value should come from a trigger, prior node, or reusable workflow prop.

Ask a question... ⌘I