Submit a read-only blockchain SQL query as a durable background job. Returns a durable SQL job identifier, lifecycle status, progress, scan estimates, errors and available result or polling references. Use one Toolmu account and a shared prepaid balance across available Tools. Pay per use; no separate supplier subscription is required. The current execution ceiling for this Tool is 0.0288 Toolmu credits per call. This is a maximum, not the settled charge. Before execution, get the current Tool contract and check availability, the latest maximumCredits, your balance and budget. Supplier response credits_used, when present, describes supplier API credits and is not the Toolmu customer charge.
Up to 0.0288 credits / call
The final charge is based on confirmed usage. Unused reserved credits return to your available balance.
Surf
Async Blockchain SQL Query Jobs | Surf
Submit a read-only blockchain SQL query as a durable background job. Returns a durable SQL job identifier, lifecycle status, progress, scan estimates, errors and available result or polling references. Use one Toolmu account and a shared prepaid balance across available Tools. Pay per use; no separate supplier subscription is required. The current execution ceiling for this Tool is 0.0288 Toolmu credits per call. This is a maximum, not the settled charge. Before execution, get the current Tool contract and check availability, the latest maximumCredits, your balance and budget. Supplier response credits_used, when present, describes supplier API credits and is not the Toolmu customer charge.
You receive
Returns a durable SQL job identifier, lifecycle status, progress, scan estimates, errors and available result or polling references. Job acceptance is not query completion. Read the returned status and result references; an accepted response must not be described as final SQL rows.
Start with your task
Tell me what blockchain activity you want to see. Add [coin name], [network], or [time period] if you know them. I’ll submit it and show whether the results are still being prepared or ready.
Inputs & outputs
Inspect the current inputs, availability, and maximum charge before starting.
Input schema
Input schema
Field / Path
Type
Requirement
Meaning
bodybody
object
Required
Required fields
sql
sqlbody.sql
string
Required
Read-only ClickHouse SELECT/WITH query to execute as a durable background job. Same shape and rules as /onchain/sql. Rules (server-enforced or query-killing): SELECT/WITH only (read-only); table references must be database-qualified as agent.<table>; ALWAYS filter on block_date or block_number (partition key — without it the query times out); compare address columns directly against lowercase literals (wrapping the column in lower() is rejected); never filter on symbol columns (unindexed full scan, and symbol matches surface scam clones — resolve a ticker to a contract address with /search/token first); on transfer tables use separate UNION ALL branches instead of OR across from/to; use single quotes for strings, e.g. toDate('2026-04-07').
Minimum length
1
max_rowsbody.max_rows
integer
Optional
Maximum result rows to retain. Example: 5000. Defaults to 1000 (server-side), capped at 10000.
Minimum
1
Maximum
10000
View raw JSON
{
"type": "object",
"required": [
"body"
],
"properties": {
"body": {
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"sql"
],
"~standard": {
"vendor": "zod",
"version": 1,
"jsonSchema": {}
},
"properties": {
"sql": {
"type": "string",
"minLength": 1,
"description": "Read-only ClickHouse SELECT/WITH query to execute as a durable background job. Same shape and rules as /onchain/sql. Rules (server-enforced or query-killing): SELECT/WITH only (read-only); table references must be database-qualified as agent.<table>; ALWAYS filter on block_date or block_number (partition key — without it the query times out); compare address columns directly against lowercase literals (wrapping the column in lower() is rejected); never filter on symbol columns (unindexed full scan, and symbol matches surface scam clones — resolve a ticker to a contract address with /search/token first); on transfer tables use separate UNION ALL branches instead of OR across from/to; use single quotes for strings, e.g. toDate('2026-04-07')."
},
"max_rows": {
"type": "integer",
"maximum": 10000,
"minimum": 1,
"description": "Maximum result rows to retain. Example: 5000. Defaults to 1000 (server-side), capped at 10000."
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}
Result schema
Output fields have not been documented yet.
Additional notes
Submit a read-only blockchain SQL query as a durable background job
How to use this Tool
Use the deployed input fields below. Required fields must be supplied; optional filters narrow the result.
body.sql (Required): Read-only ClickHouse SELECT/WITH query to execute as a durable background job. Same shape and rules as /onchain/sql. Rules (server-enforced or query-killing): SELECT/WITH only (read-only); table references must be database-qualified as agent.<table>; ALWAYS filter on block_date or block_number (partition key — without it the query times out); compare address columns directly against lowercase literals (wrapping the column in lower() is rejected); never filter on symbol columns (unindexed full scan, and symbol matches surface scam clones — resolve a ticker to a contract address with /search/token first); on transfer tables use separate UNION ALL branches instead of OR across from/to; use single quotes for strings, e.g. toDate('2026-04-07').
body.max_rows (Optional): Maximum result rows to retain. Example: 5000. Defaults to 1000 (server-side), capped at 10000.
What this Tool returns
Returns a durable SQL job identifier, lifecycle status, progress, scan estimates, errors and available result or polling references.
Response fields and how to read them
The table follows the official response contract, including nested fields and useful response metadata. [] denotes an array item. Required means required within its parent object, not that a conditional parent always exists. A nullable type permits null; an optional field can be absent. Use the documented conditions below to distinguish missing, empty and zero values. Units and reporting windows apply only where explicitly documented.
Field, type and presence
Meaning and conditions
data.cancellation_requested
boolean; Required within parent
Whether cancellation has been durably requested and is awaiting worker confirmation
data.created_at
integer; Required within parent; format: int64
Unix timestamp in seconds
data.csv_url
string; Optional within parent
The official contract declares this field but does not explain its meaning or units. Treat its interpretation as unverified; do not infer completeness or a unit from the field name.
data.elapsed_ms
integer; Required within parent; format: int64
The official contract declares this field but does not explain its meaning or units. Treat its interpretation as unverified; do not infer completeness or a unit from the field name.
data.error
object; Optional within parent
Schema-defined object or item group: #/components/schemas/AsyncSQLJobError. Read its nested fields below; the group has no separate documented meaning.
data.error.code
string; Required within parent
Stable machine-readable error code
data.error.message
string; Required within parent
Human-readable failure detail
data.estimated_bytes
integer; Optional within parent; format: int64
Approximate total bytes derived from ClickHouse progress
data.estimated_rows
integer; Optional within parent; format: int64
Approximate total rows ClickHouse expects to read
data.executed_sql
string; Required within parent
Final SQL executed after server row and scan limits are applied
data.expires_at
integer; Required within parent; format: int64
Unix timestamp in seconds
data.external_request_id
string; Optional within parent
Optional caller-supplied correlation identifier
data.finished_at
integer; Optional within parent; format: int64
Unix timestamp in seconds
data.job_id
string; Required within parent; format: uuid
The official contract declares this field but does not explain its meaning or units. Treat its interpretation as unverified; do not infer completeness or a unit from the field name.
data.max_rows
integer; Required within parent; format: int64
The official contract declares this field but does not explain its meaning or units. Treat its interpretation as unverified; do not infer completeness or a unit from the field name.
data.parameters
object; Required within parent
ClickHouse bind parameters; empty because this endpoint accepts complete SQL text
data.poll_url
string; Optional within parent
The official contract declares this field but does not explain its meaning or units. Treat its interpretation as unverified; do not infer completeness or a unit from the field name.
data.processed_bytes
integer; Required within parent; format: int64
The official contract declares this field but does not explain its meaning or units. Treat its interpretation as unverified; do not infer completeness or a unit from the field name.
data.processed_rows
integer; Required within parent; format: int64
The official contract declares this field but does not explain its meaning or units. Treat its interpretation as unverified; do not infer completeness or a unit from the field name.
data.progress_percent
number; Optional within parent; format: double
Approximate completion percentage when ClickHouse reports a total-row estimate
data.query_id
string; Required within parent; format: uuid
The official contract declares this field but does not explain its meaning or units. Treat its interpretation as unverified; do not infer completeness or a unit from the field name.
data.recommended_action
string; Required within parent
The official contract declares this field but does not explain its meaning or units. Treat its interpretation as unverified; do not infer completeness or a unit from the field name.
data.request_id
string; Required within parent
Caller-visible request correlation identifier
data.result_url
string; Optional within parent
The official contract declares this field but does not explain its meaning or units. Treat its interpretation as unverified; do not infer completeness or a unit from the field name.
data.retry_after_ms
integer; Optional within parent; format: int64
The official contract declares this field but does not explain its meaning or units. Treat its interpretation as unverified; do not infer completeness or a unit from the field name.
data.retryable
boolean; Required within parent
The official contract declares this field but does not explain its meaning or units. Treat its interpretation as unverified; do not infer completeness or a unit from the field name.
data.row_count
integer; Optional within parent; format: int64
The official contract declares this field but does not explain its meaning or units. Treat its interpretation as unverified; do not infer completeness or a unit from the field name.
data.sql
string; Required within parent
Exact submitted SQL
data.started_at
integer; Optional within parent; format: int64
The official contract declares this field but does not explain its meaning or units. Treat its interpretation as unverified; do not infer completeness or a unit from the field name.
meta.cached
boolean; Required within parent
Whether this response was served from cache
meta.credits_used
integer; Required within parent; format: int64
Credits deducted for this request
meta.empty_reason
string; Optional within parent
Hint explaining why the data array is empty, when applicable
Coverage, units and freshness
Job acceptance is not query completion. Read the returned status and result references; an accepted response must not be described as final SQL rows.
Inspect any returned observation time, cache status, watermark, pagination and errors using their documented meanings. A successful request alone does not establish complete coverage. Where no freshness or completeness guarantee is documented, treat it as unknown. Saved Examples are historical and viewing them does not refresh data or execute a new call.
Data source and references
Surf supplies this endpoint through its Data API. Response contract and deployed Tool inputs reviewed on 2026-10-03 against official OpenAPI v0.2.102. This is a contract review date, not a data observation time. Coverage depends on the selected endpoint and request.
Use one Toolmu account and a shared prepaid balance across available Tools. Pay per use; no separate supplier subscription is required. The current execution ceiling for this Tool is 0.0288 Toolmu credits per call. This is a maximum, not the settled charge. Before execution, get the current Tool contract and check availability, the latest maximumCredits, your balance and budget. Supplier response credits_used, when present, describes supplier API credits and is not the Toolmu customer charge.
Example request: [Compare daily USDC transfer totals on Ethereum and Base for the last 7 days].
Tell me what blockchain activity you want to see. Add [coin name], [network], or [time period] if you know them. I’ll submit it and show whether the results are still being prepared or ready.
Find the largest transfers
Example request: [Find the 10 largest USDC transfers on Ethereum in the last 7 days].
Questions about this tool.
Inputs, results and details to know before running it.
Describe the blockchain activity you want to see. Add the coin, network, and time period if you know them. You do not need to write code or find a long identifier. A request being accepted only means it has started; the results may still be getting ready.
Returns a durable SQL job identifier, lifecycle status, progress, scan estimates, errors and available result or polling references.
Job acceptance is not query completion. Read the returned status and result references; an accepted response must not be described as final SQL rows.
Use one Toolmu account and a shared prepaid balance across available Tools. Pay per use; no separate supplier subscription is required. The current execution ceiling for this Tool is 0.0288 Toolmu credits per call. This is a maximum, not the settled charge. Before execution, get the current Tool contract and check availability, the latest maximumCredits, your balance and budget. Supplier response credits_used, when present, describes supplier API credits and is not the Toolmu customer charge.
Ask your agent to Submit a read-only blockchain SQL query as a durable background job. Provide the required inputs above. If Toolmu is already connected, reuse that connection; otherwise use the setup instructions on this page. Before a paid execution, the agent must read the current Tool contract and check availability, the credit ceiling, balance, budget and your authorization. It should then execute the Tool and explain the returned fields and limitations.
Inspect any returned observation time, cache status, watermark, pagination and errors using their documented meanings. A successful request alone does not establish complete coverage. Where no freshness or completeness guarantee is documented, treat it as unknown. Saved Examples are historical and viewing them does not refresh data or execute a new call.