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

> Get Cardano datum details by datum hash including CBOR data and JSON representation for smart contract interactions.

# Datum by datum hash



## OpenAPI

````yaml cardano/blockchain-indexer-api/openapi.json get /datums/{datum_hash}
openapi: 3.0.3
info:
  title: Cardano - Blockchain Indexer API
  description: Core indexer endpoints dedicated to Cardano.
  contact:
    name: Maestro Blockchain Inc.
    url: https://gomaestro.org/
    email: info@gomaestro.org
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.txt
  version: v1.8.0
servers:
  - url: https://mainnet.gomaestro-api.org/v1
    description: Cardano Mainnet
  - url: https://preprod.gomaestro-api.org/v1
    description: Cardano Preprod
  - url: https://preview.gomaestro-api.org/v1
    description: Cardano Preview
security:
  - api-key: []
tags:
  - name: Maestro
paths:
  /datums/{datum_hash}:
    get:
      tags:
        - Datums
      summary: Datum by datum hash
      description: >-
        Returns the datum corresponding to the specified datum hash, if the
        datum has been seen on-chain
      operationId: datum_by_hash
      parameters:
        - name: datum_hash
          in: path
          description: Hex encoded datum hash
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Datum corresponding to the datum hash
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TimestampedDatum'
              example:
                data:
                  json:
                    fields:
                      - bytes: >-
                          76140b3e82b58a9439ce10473d0d7c40ec9165fb03662c499a9162f95b9ec34641adbb83203c5276eaa35fc95c3776e00779ca412777cdc5201b53184d365306
                      - fields:
                          - fields:
                              - int: 100000
                              - int: 36069
                          - fields:
                              - fields:
                                  - constructor: 1
                                    fields:
                                      - int: 1676063825000
                                  - constructor: 1
                                    fields: []
                              - fields:
                                  - constructor: 1
                                    fields:
                                      - int: 1676065625000
                                  - constructor: 1
                                    fields: []
                          - bytes: '555344'
                      - bytes: >-
                          0c64d6d0371d11185aae649cf3a169040e94214137137b531ebb16c2
                  bytes: >-
                    d8799f584076140b3e82b58a9439ce10473d0d7c40ec9165fb03662c499a9162f95b9ec34641adbb83203c5276eaa35fc95c3776e00779ca412777cdc5201b53184d365306d8799fd8799f1a000186a0198ce5ffd8799fd8799fd87a9f1b000001863d305c68ffd87a80ffd8799fd87a9f1b000001863d4bd3a8ffd87a80ffff43555344ff581c0c64d6d0371d11185aae649cf3a169040e94214137137b531ebb16c2ff
                last_updated:
                  timestamp: '2022-10-10 20:25:28'
                  block_hash: >-
                    391e8974a46a05addd54593722380fdea42f29d7de4acc5729a6ec0663955293
                  block_slot: 32284048
        '400':
          description: Malformed query parameters
        '404':
          description: No results found
        '500':
          description: Internal server error
components:
  schemas:
    TimestampedDatum:
      type: object
      description: >-
        Timestamped response. Returns the endpoint response data along with the
        chain-tip of the indexer, which details at which point in the chain's
        history the data was correct as-of.
      required:
        - data
        - last_updated
      properties:
        data:
          $ref: '#/components/schemas/Datum'
        last_updated:
          $ref: '#/components/schemas/LastUpdated'
    Datum:
      type: object
      required:
        - bytes
      properties:
        bytes:
          type: string
          description: Hex encoded datum CBOR bytes
        json:
          type: object
          description: JSON representation of the datum
          nullable: true
    LastUpdated:
      type: object
      description: >-
        Details of the most recent block processed by the indexer (aka chain
        tip); that is, the data returned is correct as of this block in time.
      required:
        - timestamp
        - block_hash
        - block_slot
      properties:
        block_hash:
          type: string
          description: >-
            Hex-encoded hash of the most recently processed block (aka chain
            tip)
        block_slot:
          type: integer
          format: int64
          description: Absolute slot of the most recently processed block (aka chain tip)
          minimum: 0
        timestamp:
          type: string
          description: UTC timestamp of when the most recently processed block was minted
  securitySchemes:
    api-key:
      type: apiKey
      in: header
      name: api-key
      description: Project API Key

````