> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chainstack.com/llms.txt
> Use this file to discover all available pages before exploring further.

<AgentInstructions>

## Submitting Feedback

If you encounter incorrect, outdated, or confusing documentation on this page, submit feedback:

POST https://docs.chainstack.com/feedback

```json
{
  "path": "/reference/bitcoin-getblockchaininfo",
  "feedback": "Description of the issue"
}
```

Only submit feedback when you have something specific and actionable to report.

</AgentInstructions>

# getblockchaininfo | Bitcoin

The `getblockchaininfo` method returns an object containing various state info regarding blockchain processing.

<Check>
  **Get your own node endpoint today**

  [Start for free](https://console.chainstack.com/) and get your app to production levels immediately. No credit card required.

  You can sign up with your GitHub, X, Google, or Microsoft account.
</Check>

## Parameters

* `none`

## Response

* `result` — an object containing various state info with the following fields:
  * `chain` — current network name (main, test, regtest)
  * `blocks` — the height of the most-work fully-validated chain. The genesis block has height 0
  * `headers` — the current number of headers we have validated
  * `bestblockhash` — the hash of the currently best block
  * `difficulty` — the current difficulty
  * `mediantime` — median time for the current best block
  * `verificationprogress` — estimate of verification progress \[0..1]
  * `initialblockdownload` — (debug information) estimate of whether this node is in Initial Block Download mode
  * `chainwork` — total amount of work in active chain, in hexadecimal
  * `size_on_disk` — the estimated size of the block and undo files on disk
  * `pruned` — if the blocks are subject to pruning
  * `pruneheight` — lowest-height complete block stored (only present if pruning is enabled)
  * `automatic_pruning` — whether automatic pruning is enabled (only present if pruning is enabled)
  * `prune_target_size` — the target size used by pruning (only present if automatic pruning is enabled)
  * `softforks` — status of softforks
  * `bip9_softforks` — status of BIP9 softforks in progress
  * `warnings` — any network and blockchain warnings
* `error` — an object containing an error message if an error occurred, otherwise `null`
* `id` — an integer representing the ID of the request, used to match requests with responses

## Use case

The `getblockchaininfo` method is useful for retrieving various state information about the blockchain. This information can be used for monitoring the health and progress of the blockchain, as well as for making decisions in blockchain-based applications. For example, a mining pool might use the `difficulty` field to adjust the pool's target share difficulty.


## OpenAPI

````yaml /openapi/bitcoin_node_api/getblockchaininfo.json POST /788f110831fe13808302bd79796d55e8
openapi: 3.0.0
info:
  title: getblockchaininfo example
  version: 1.0.0
  description: >-
    This is an API example for getblockchaininfo, a method to retrieve various
    state info regarding blockchain  processing.
servers:
  - url: https://nd-202-842-353.p2pify.com
security: []
paths:
  /788f110831fe13808302bd79796d55e8:
    post:
      tags:
        - Blockchain Operations
      summary: getblockchaininfo
      operationId: getBlockchainInfo
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                jsonrpc:
                  type: string
                  default: '1.0'
                method:
                  type: string
                  default: getblockchaininfo
                params:
                  type: array
                  items: {}
                  default: []
                id:
                  type: integer
                  default: 1
      responses:
        '200':
          description: Various state info regarding blockchain processing
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    type: object
                    description: An object containing various state info
                  error:
                    type: object
                  id:
                    type: integer

````