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

# Get latest block number

> Get the latest block height of blockchain network.



## OpenAPI

````yaml get /v1/block/number/latest
openapi: 3.0.2
info:
  title: 🛠️ Basic API
  version: v1.0.0
servers:
  - url: https://api.chainbase.online
    description: production server
security: []
paths:
  /v1/block/number/latest:
    get:
      tags:
        - Block
      summary: Get latest block number
      description: Get the latest block height of blockchain network.
      operationId: GetBlockNumberLatest
      parameters:
        - description: >-
            chain network id, see [list of
            details](/platform/features/api/web3-api)
          required: true
          schema:
            title: Chain Id
            type: integer
            description: >-
              chain network id, see [list of
              details](/platform/features/api/web3-api)
          example: '1'
          name: chain_id
          in: query
        - required: true
          schema:
            title: X-Api-Key
            type: string
            example: demo
          example: demo
          name: x-api-key
          in: header
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseGetLastBlockNumber'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
components:
  schemas:
    ResponseGetLastBlockNumber:
      title: ResponseGetLastBlockNumber
      required:
        - data
      type: object
      properties:
        code:
          title: Code
          type: integer
          default: 0
        message:
          title: Message
          type: string
          default: ok
        data:
          $ref: '#/components/schemas/GetLastBlockNumberData'
    ErrorMessage:
      title: ErrorMessage
      required:
        - code
        - message
      type: object
      properties:
        code:
          title: Code
          type: integer
        message:
          title: Message
          type: string
    GetLastBlockNumberData:
      title: GetLastBlockNumberData
      required:
        - number
        - hash
      type: object
      properties:
        number:
          title: Number
          type: integer
        hash:
          title: Hash
          type: string

````