---
title: "List topic messages by id"
method: GET
path: "/api/v1/topics/{topicId}/messages"
tags: ["topics"]
---

# List topic messages by id

`GET /api/v1/topics/{topicId}/messages`

Returns the list of topic messages for the given topic id.

## Path parameters

- `topicId` string, nullable, required — Network entity ID in the format of `shard.realm.num`

## Query parameters

- `encoding` string
- `limit` integer
- `order` 'asc' | 'desc'
- `sequencenumber` integer
- `timestamp` string[]

## Response `200`

OK

- TopicMessagesResponse
  - `messages` TopicMessage[]
    - `chunk_info` ChunkInfo, nullable
      - `initial_transaction_id` TransactionId
        - `account_id` string, nullable — Network entity ID in the format of `shard.realm.num`
        - `nonce` integer, nullable
        - `scheduled` boolean, nullable
        - `transaction_valid_start` string — A Unix timestamp in seconds.nanoseconds format
      - `number` integer
      - `total` integer
    - `consensus_timestamp` string, required — A Unix timestamp in seconds.nanoseconds format
    - `message` string, required
    - `payer_account_id` string, nullable, required — Network entity ID in the format of `shard.realm.num`
    - `running_hash` string, byte, required
    - `running_hash_version` integer, required
    - `sequence_number` integer, required
    - `topic_id` string, nullable, required — Network entity ID in the format of `shard.realm.num`
  - `links` Links
    - `next` string, nullable

## Other responses

- `400` — Invalid parameter
- `404` — Topic Not Found

---

[API](https://skmtc.dev/hedera/apis/mirror-node-rest-api.md) · [All operations](https://skmtc.dev/hedera/apis/mirror-node-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/hedera/mirror-node-rest-api/revisions/45f5ccac560c/schema)
