---
title: "Estimate query"
method: POST
path: "/api/v1/services/stats/query/estimate"
tags: ["stats_service"]
---

# Estimate query

`POST /api/v1/services/stats/query/estimate`

## Query parameters

- `chain` 'mainnet' | 'testnet'

## Request body

- object
  - `project_id` integer, required
  - `name` string
  - `query` string
  - `gpt_message` string
  - `repeat_interval` integer — cyclic execution of requests

## Response `200`

Estimate query

- StatsEstimateQuery
  - `approximate_time` integer, required
  - `approximate_usd_cost` number, required
  - `explain` string

## Other responses

- `400` — Something went wrong on client side
- `403` — Access token is missing or invalid
- `404` — The specified resource was not found
- `500` — Something went wrong on server side

## Changes

- **2025-10-21** `356252841f50` — 1 breaking, 1 info
  - removed the required property `approximate_cost` from the response with the `200` status
  - added the required property `approximate_usd_cost` to the response with the `200` status
- **2024-11-06** `dc03bb6c514d` — 1 info
  - added the new optional request property `name`
- **2024-03-22** `dbd561304b3b` — 1 info
  - added the new optional `query` request parameter `chain`
- **2023-12-11** `e83620df7542` — 3 info
  - api tag `stats_service` added
  - api tag `db` removed
  - added the optional property `explain` to the response with the `200` status
- **2023-12-04** `b179482c50fc` — 2 info
  - added the new optional request property `gpt_message`
  - the request property `query` became optional

[Full history](https://skmtc.dev/tonkeeper/apis/rest-api-to-ton-console/changes/api/v1/services/stats/query/estimate/post.md)

---

[API](https://skmtc.dev/tonkeeper/apis/rest-api-to-ton-console.md) · [All operations](https://skmtc.dev/tonkeeper/apis/rest-api-to-ton-console/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/tonkeeper/rest-api-to-ton-console/revisions/bffcc11719d3/schema)
