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

# Get Block Transaction Counts by Block Number

> Retrieves transaction counts for a specified Ethereum block.

export const chain = '1';

<Badge color="yellow">Ethereum</Badge>

<ResponseExample>
  ```json Example response theme={null}
  {
    "status": "1",
    "message": "OK",
    "result": {
      "block": 24884529,
      "txsCount": 87,
      "internalTxsCount": 55,
      "erc20TxsCount": 103,
      "erc721TxsCount": 1,
      "erc1155TxsCount": 0
    }
  }
  ```
</ResponseExample>


## OpenAPI

````yaml openapi/api-reference/endpoint/getblocktxnscount.json GET /v2/api
openapi: 3.1.0
info:
  title: Get Block Transaction Counts by Block Number
  version: 2.0.0
  description: Retrieves transaction counts for a specified Ethereum block.
  license:
    name: Etherscan API Terms
    url: https://etherscan.io/terms
servers:
  - url: https://api.etherscan.io
    description: Etherscan API.
security:
  - apiKey: []
paths:
  /v2/api:
    get:
      summary: Get Block Transaction Counts by Block Number
      description: Retrieves transaction counts for a specified Ethereum block.
      operationId: getGetblocktxnscount
      parameters:
        - name: chainid
          in: query
          required: true
          description: >-
            Chain ID to query, eg 1 for Ethereum from our [supported
            chains](/supported-chains).
          schema:
            type: string
          example: '1'
        - name: module
          in: query
          required: true
          description: Set to block for this endpoint.
          schema:
            type: string
            default: block
          example: block
        - name: action
          in: query
          required: true
          description: Set to getblocktxnscount for this endpoint.
          schema:
            type: string
            default: getblocktxnscount
          example: getblocktxnscount
        - name: blockno
          in: query
          required: true
          description: Block number to check transaction counts for.
          schema:
            type: integer
          example: 24884529
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: >-
                      1 if the request returned data, 0 otherwise. A status of 0
                      can indicate an error or a valid request that returned no
                      records.
                  message:
                    type: string
                    description: >-
                      OK on success, otherwise an error description such as
                      NOTOK. See [common error
                      messages](/common-error-messages).
                  result:
                    type: object
                    properties:
                      block:
                        type: number
                        description: The block number.
                      txsCount:
                        type: number
                        description: Number of transactions in the block.
                      internalTxsCount:
                        type: number
                        description: Number of internal transactions in the block.
                      erc20TxsCount:
                        type: number
                        description: Number of ERC-20 token transfers in the block.
                      erc721TxsCount:
                        type: number
                        description: Number of ERC-721 token transfers in the block.
                      erc1155TxsCount:
                        type: number
                        description: Number of ERC-1155 token transfers in the block.
      security:
        - apiKey: []
components:
  securitySchemes:
    apiKey:
      type: apiKey
      in: query
      name: apikey
      description: >-
        Enter your Etherscan API key, or [set one up](/set-up-your-api-key) if
        you don't have one.

````