> ## Documentation Index
> Fetch the complete documentation index at: https://hedera-0c6e0218-docs-evm-account-model.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Get topic by ID

> Returns the topic details for the given topic ID.



## OpenAPI

````yaml /openapi.yaml get /api/v1/topics/{topicId}
openapi: 3.0.3
info:
  title: Mirror Node REST API
  version: 0.154.0
  license:
    name: Apache-2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  description: >-
    The REST API offers the ability to query transactions and entity information
    from a mirror node.


    Base url: [/api/v1](/api/v1)


    OpenAPI Spec: [/api/v1/docs/openapi.yml](/api/v1/docs/openapi.yml)
  contact:
    name: Mirror Node Team
    email: mirrornode@hedera.com
    url: https://github.com/hiero-ledger/hiero-mirror-node
servers:
  - description: Hedera Mainnet Mirror Node
    url: https://mainnet.mirrornode.hedera.com
  - description: The production REST API servers
    url: '{scheme}://{network}.mirrornode.hedera.com'
    variables:
      scheme:
        default: https
        description: The URI scheme
        enum:
          - http
          - https
      network:
        default: testnet
        description: The Hedera network in use
        enum:
          - mainnet-public
          - mainnet
          - previewnet
          - testnet
security: []
tags:
  - name: accounts
    description: >-
      The accounts object represents the information associated with an account
      entity and returns a list of account information.The accounts list
      endpoint is cached and not updated as frequently as the account lookup by
      a specific ID endpoint.
    externalDocs:
      url: >-
        https://docs.hedera.com/guides/docs/mirror-node-api/cryptocurrency-api#accounts
  - name: balances
    description: >-
      The balance object represents the balance of accounts on the Hedera
      network.
    externalDocs:
      url: >-
        https://docs.hedera.com/guides/docs/mirror-node-api/cryptocurrency-api#balances
  - name: contracts
    description: >-
      The contracts objects represents the information associated with contract
      entities.The contracts list endpoint is cached and not updated as
      frequently as the contract lookup by a specific ID endpoint.
  - name: schedules
    description: >-
      The schedules object represents the information associated with a schedule
      entity.The schedules list endpoints is cached and not updated as
      frequently as the schedule lookup by a specific ID endpoint.
  - name: transactions
    description: >-
      The transaction object represents the transactions processed on the Hedera
      network.
    externalDocs:
      url: >-
        https://docs.hedera.com/guides/docs/mirror-node-api/cryptocurrency-api#transactions
  - name: topics
    description: >-
      The topics object represents the information associated with a topic
      entity and returns topic messages information.
    externalDocs:
      url: >-
        https://docs.hedera.com/guides/docs/mirror-node-api/cryptocurrency-api#topic-messages
  - name: tokens
    description: >-
      The tokens object represents the information associated with a token
      entity and returns a list of token information.The tokens list endpoint is
      cached and not updated as frequently as the token lookup by a specific ID.
externalDocs:
  description: REST API Docs
  url: https://docs.hedera.com/guides/docs/mirror-node-api/cryptocurrency-api
paths:
  /api/v1/topics/{topicId}:
    get:
      tags:
        - topics
      summary: Get topic by ID
      description: Returns the topic details for the given topic ID.
      operationId: getTopic
      parameters:
        - $ref: '#/components/parameters/topicIdPathParam'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Topic'
        '400':
          $ref: '#/components/responses/InvalidParameterError'
        '404':
          $ref: '#/components/responses/NotFoundError'
components:
  parameters:
    topicIdPathParam:
      name: topicId
      in: path
      required: true
      description: Topic id
      schema:
        $ref: '#/components/schemas/EntityId'
  schemas:
    Topic:
      type: object
      properties:
        admin_key:
          $ref: '#/components/schemas/Key'
        auto_renew_account:
          $ref: '#/components/schemas/EntityId'
        auto_renew_period:
          description: >-
            The amount of time to attempt to extend the topic's lifetime after
            expiration.
          example: 7776000
          format: int64
          nullable: true
          type: integer
        created_timestamp:
          $ref: '#/components/schemas/TimestampNullable'
        custom_fees:
          $ref: '#/components/schemas/ConsensusCustomFees'
        deleted:
          description: Whether the topic is deleted or not.
          example: false
          nullable: true
          type: boolean
        fee_exempt_key_list:
          description: >-
            Keys permitted to submit messages to the topic without paying custom
            fees
          type: array
          items:
            $ref: '#/components/schemas/Key'
        fee_schedule_key:
          $ref: '#/components/schemas/Key'
        memo:
          description: The memo associated with the topic.
          example: topic memo
          type: string
        submit_key:
          $ref: '#/components/schemas/Key'
        timestamp:
          $ref: '#/components/schemas/TimestampRange'
        topic_id:
          $ref: '#/components/schemas/EntityId'
      required:
        - admin_key
        - auto_renew_account
        - auto_renew_period
        - created_timestamp
        - custom_fees
        - deleted
        - fee_exempt_key_list
        - fee_schedule_key
        - memo
        - submit_key
        - timestamp
        - topic_id
    EntityId:
      type: string
      description: Network entity ID in the format of `shard.realm.num`
      pattern: ^\d{1,10}\.\d{1,10}\.\d{1,10}$
      example: 0.0.2
      nullable: true
    Key:
      description: The public key which controls access to various network entities.
      type: object
      nullable: true
      properties:
        _type:
          type: string
          enum:
            - ECDSA_SECP256K1
            - ED25519
            - ProtobufEncoded
          example: ProtobufEncoded
        key:
          type: string
          example: 15706b229b3ba33d4a5a41ff54ce1cfe0a3d308672a33ff382f81583e02bd743
    TimestampNullable:
      description: A Unix timestamp in seconds.nanoseconds format
      type: string
      example: '1586567700.453054000'
      pattern: ^\d{1,10}(\.\d{1,9})?$
      nullable: true
    ConsensusCustomFees:
      description: Custom fees assessed for each message submitted to the topic
      type: object
      properties:
        created_timestamp:
          $ref: '#/components/schemas/Timestamp'
        fixed_fees:
          type: array
          items:
            $ref: '#/components/schemas/FixedCustomFee'
    TimestampRange:
      type: object
      description: A timestamp range an entity is valid for
      properties:
        from:
          allOf:
            - $ref: '#/components/schemas/Timestamp'
            - description: The inclusive from timestamp in seconds
        to:
          allOf:
            - $ref: '#/components/schemas/TimestampNullable'
            - description: The exclusive to timestamp in seconds
    Error:
      type: object
      properties:
        _status:
          type: object
          properties:
            messages:
              type: array
              items:
                type: object
                properties:
                  data:
                    description: Error message in hexadecimal
                    example: '0x3000'
                    format: binary
                    nullable: true
                    pattern: ^0x[0-9a-fA-F]+$
                    type: string
                  detail:
                    description: Detailed error message
                    example: Generic detailed error message
                    nullable: true
                    type: string
                  message:
                    description: Error message
                    example: Generic error message
                    nullable: false
                    type: string
    Timestamp:
      description: A Unix timestamp in seconds.nanoseconds format
      type: string
      example: '1586567700.453054000'
      pattern: ^\d{1,10}(\.\d{1,9})?$
    FixedCustomFee:
      type: object
      properties:
        amount:
          example: 100
          format: int64
          type: integer
        collector_account_id:
          $ref: '#/components/schemas/EntityId'
        denominating_token_id:
          $ref: '#/components/schemas/EntityId'
  responses:
    InvalidParameterError:
      description: Invalid parameter
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            _status:
              messages:
                - message: 'Invalid parameter: account.id'
                - message: >-
                    Invalid Transaction id. Please use \shard.realm.num-sss-nnn\
                    format where sss are seconds and nnn are nanoseconds
    NotFoundError:
      description: Not Found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            _status:
              messages:
                - message: Not found

````