> ## 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 specific Cardano transaction output (UTxO) by transaction hash and output index with asset details and datum information.

# Transaction output by output reference



## OpenAPI

````yaml cardano/blockchain-indexer-api/openapi.json get /transactions/{tx_hash}/outputs/{index}/txo
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:
  /transactions/{tx_hash}/outputs/{index}/txo:
    get:
      tags:
        - Transactions
      summary: Transaction output by output reference
      description: >-
        Returns the specified transaction output. Attempts to resolve the datum
        hash to the corresponding bytes and JSON, should the output contain a
        datum hash.
      operationId: txo_by_txo_ref
      parameters:
        - name: with_cbor
          in: query
          description: Include the CBOR encoding of the transaction output in the response
          required: false
          schema:
            type: boolean
            nullable: true
        - name: tx_hash
          in: path
          description: Transaction Hash
          required: true
          schema:
            type: string
        - name: index
          in: path
          description: Output Index
          required: true
          schema:
            type: integer
            minimum: 0
        - name: amounts-as-strings
          in: header
          description: Large numbers returned as strings if set to `true`
          required: false
          schema:
            type: string
            nullable: true
      responses:
        '200':
          description: Get a transaction output via it's output reference
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TimestampedUtxo'
              example:
                data:
                  tx_hash: >-
                    291b983ac75275a933415475d6417413b34eaccc5f0794fd7b9e8d04e7fe077e
                  index: 0
                  assets:
                    - unit: lovelace
                      amount: 1224040
                    - unit: >-
                        0c64d6d0371d11185aae649cf3a169040e94214137137b531ebb16c2446a65644f7261636c654e4654
                      amount: 1
                  address: >-
                    addr_test1wzdtu0djc76qyqak9cj239udezj2544nyk3ksmfqvaksv7c9xanpg
                  datum:
                    type: hash
                    hash: >-
                      5fc2400956b1d1828bea0be9c94e95f2b3cebda27c21b07e8a6bada2b2588163
                    bytes: >-
                      d8799f584073ab91123886242e4d02de6ed05490d684e99a99c49b957a5f943a80655ac0744372adeacdc7dedb95a818ce676886f1306d439152b82d48de71688008840d00d8799fd8799f1a00030d401a000116e5ffd8799fd8799fd87a9f1b000001863d492040ffd87a80ffd8799fd87a9f1b000001863d649780ffd87a80ffff43555344ff581c0c64d6d0371d11185aae649cf3a169040e94214137137b531ebb16c2ff
                    json:
                      fields:
                        - bytes: >-
                            73ab91123886242e4d02de6ed05490d684e99a99c49b957a5f943a80655ac0744372adeacdc7dedb95a818ce676886f1306d439152b82d48de71688008840d00
                        - fields:
                            - fields:
                                - int: 200000
                                - int: 71397
                            - fields:
                                - fields:
                                    - constructor: 1
                                      fields:
                                        - int: 1676065448000
                                    - constructor: 1
                                      fields: []
                                - fields:
                                    - constructor: 1
                                      fields:
                                        - int: 1676067248000
                                    - constructor: 1
                                      fields: []
                            - bytes: '555344'
                        - bytes: >-
                            0c64d6d0371d11185aae649cf3a169040e94214137137b531ebb16c2
                  reference_script: null
                  txout_cbor: null
                last_updated:
                  timestamp: '2022-10-10 20:25:28'
                  block_hash: >-
                    3c504cc4ce12a511db04838b544820c4e2281c0209a906ca17981cf63a084b7b
                  block_slot: 32295757
        '400':
          description: Malformed query parameters
        '404':
          description: No results found
        '500':
          description: Internal server error
components:
  schemas:
    TimestampedUtxo:
      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/Utxo'
        last_updated:
          $ref: '#/components/schemas/LastUpdated'
    Utxo:
      type: object
      description: Transaction output
      required:
        - tx_hash
        - index
        - assets
        - address
      properties:
        address:
          type: string
          description: Address which controls the UTxO
        assets:
          type: array
          items:
            $ref: '#/components/schemas/Asset'
          description: List of assets contained in the UTxO
        datum:
          allOf:
            - $ref: '#/components/schemas/DatumOption'
          nullable: true
        index:
          type: integer
          format: int64
          description: UTxO transaction index
          minimum: 0
        reference_script:
          allOf:
            - $ref: '#/components/schemas/Script'
          nullable: true
        tx_hash:
          type: string
          description: UTxO transaction hash
    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
    Asset:
      type: object
      description: Lovelace or native asset
      required:
        - unit
        - amount
      properties:
        amount:
          $ref: '#/components/schemas/NumOrString'
        unit:
          type: string
          description: >-
            Asset (either `lovelace` or concatenation of hex encoded policy ID
            and asset name for native asset)
    DatumOption:
      type: object
      description: Datum (inline or hash)
      required:
        - type
        - hash
      properties:
        bytes:
          type: string
          description: >-
            Hex encoded datum CBOR bytes (`null` if datum type is `hash` and
            corresponding datum bytes have not been seen on-chain)
          nullable: true
        hash:
          type: string
          description: Datum hash
        json:
          type: object
          description: >-
            JSON representation of the datum (`null` if datum type is `hash` and
            corresponding datum bytes have not been seen on-chain)
          nullable: true
        type:
          $ref: '#/components/schemas/DatumOptionType'
    Script:
      type: object
      description: Details of a Native or Plutus script
      required:
        - hash
        - type
        - bytes
      properties:
        bytes:
          type: string
          description: Script bytes
        hash:
          type: string
          description: Script hash
        json:
          type: object
          description: >-
            JSON representation of script (`null` if script not of `native`
            type)
          nullable: true
        type:
          $ref: '#/components/schemas/ScriptType'
    NumOrString:
      oneOf:
        - type: integer
          format: int64
          description: Unsigned 64-bit integer
          minimum: 0
        - type: integer
          description: Unsigned 128-bit integer
          minimum: 0
        - type: integer
          format: int64
          description: Signed 64-bit integer
        - type: number
          format: double
          description: 64-bit floating point number
        - type: string
          description: String representation of an integer or number
      description: >-
        Integer or number by default, or a string representation if the
        `amounts-as-strings` header is set to `true`
    DatumOptionType:
      type: string
      description: Datum type (inline datum or datum hash)
      enum:
        - hash
        - inline
    ScriptType:
      type: string
      description: Script type and version
      enum:
        - native
        - plutusv1
        - plutusv2
        - plutusv3
  securitySchemes:
    api-key:
      type: apiKey
      in: header
      name: api-key
      description: Project API Key

````