> For the complete documentation index, see [llms.txt](https://dev.uniultra.xyz/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dev.uniultra.xyz/docs/core-concepts/mirror-nodes/hedera-mirror-node.md).

# Hedera Mirror Node

The Hedera Consensus Service (HCS) is a gRPC API endpoint on the mirror node to stream HCS messages. It offers the ability to subscribe to HCS topics and receive messages for the topic subscribed to. API docs for the mirror nodes can be found here:

{% content-ref url="/pages/akukUdF7ROU5OaG2mlDy" %}
[REST API](/docs/sdks-and-apis/rest-api.md)
{% endcontent-ref %}

{% content-ref url="/pages/Mbp5IWLnBID2i9WqBH6e" %}
[Hedera Consensus Service gRPC API](/docs/sdks-and-apis/hedera-consensus-service-api.md)
{% endcontent-ref %}

## Mainnet

The non-production public mainnet mirror node serves to help developers build their applications without having to run their own mirror node. For production-ready mainnet mirror nodes, please check out [Arkhia](https://www.arkhia.io/), [Dragonglass](https://dragonglass.me/), or [Ledger Works](http://lworks.io/). When building your Hedera client via [SDK](/docs/sdks-and-apis/sdks.md), you can use `setMirrorNetwork()` and enter the public mainnet mirror node endpoint. The gRPC API requires TLS. The following SDK versions support TLS:

* **Java:** v2.0.6+
* **JavaScript:** v2.0.23+
* **Go:** v2.1.9+

{% hint style="warning" %}
Requests are throttled at 100 requests per second (rps). This may change in the future depending on performance or security considerations. At this time, no authentication is required.
{% endhint %}

{% tabs %}
{% tab title="Java" %}

```java
//You will need to upgrade to v2.0.6 or higher
Client client = Client.forMainnet();
client.setMirrorNetwork(Collections.singletonList("mainnet-public.mirrornode.hedera.com:443"))
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
//You will need to upgrade to v2.0.23 or higher
const client = Client.forMainnet()
client.setMirrorNetwork("mainnet-public.mirrornode.hedera.com:443")
```

{% endtab %}

{% tab title="Go" %}

```go
client := hedera.ClientForMainnet()
client.SetMirrorNetwork([]string{"mainnet-public.mirrornode.hedera.com:443"})
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
**Mainnet Mirror Node Endpoint:** mainnet-public.mirrornode.hedera.com:443\
\
**REST API Mainnet Root Endpoint:**[ https://mainnet-public.mirrornode.hedera.com](https://mainnet-public.mirrornode.hedera.com/)
{% endhint %}

## Testnet

The endpoints provided below allow developers to access the testnet mirror node, which contains testnet transaction data.

{% hint style="info" %}
**HCS Testnet Mirror Node Endpoint:** testnet.mirrornode.hedera.com:443

**REST API Testnet Root Endpoint:**[ https://testnet.mirrornode.hedera.com](https://testnet.mirrornode.hedera.com/)
{% endhint %}

## Previewnet

The endpoints provided below allow developers to access the previewnet mirror node, which contains previewnet transaction data.

{% hint style="info" %}
**HCS Previewnet Mirror Node Endpoint:** previewnet.mirrornode.hedera.com:443

**REST API Preview Testnet Root Endpoint:** <https://previewnet.mirrornode.hedera.com>
{% endhint %}

## FAQ

<details>

<summary>How is data stored in a Hedera Mirror Node? Is it a specific type of database, or does it use a unique data structure?</summary>

Hedera Mirror Nodes use [PostgreSQL](/docs/support-and-community/glossary.md#postgresql) databases to store the transaction and event data organized in a structure that mirrors the Hedera Network. Once the mirror node receives record files from Hedera Consensus nodes, the data is validated and loaded into the database.

</details>

<details>

<summary>How can I set up a Hedera Mirror Node? What are the hardware and software requirements?</summary>

Setting up a Hedera Mirror Node involves both hardware and software components. The requirements can be found [here](/docs/core-concepts/mirror-nodes/run-your-own-beta-mirror-node.md).

</details>

<details>

<summary>Are there costs associated with running a mirror node?</summary>

No, Hedera does not charge for running a mirror node. However, there are costs associated with purchasing the hardware, internet connection, and potential cloud service fees. The hardware and software requirements can be found [here](/docs/core-concepts/mirror-nodes/run-your-own-beta-mirror-node.md).

</details>

<details>

<summary>How can I provide feedback or create an issue to log errors?</summary>

To provide feedback or log errors, please refer to the [Contributing Guide](/docs/support-and-community/contributing-guide.md) and submit an issue in the Hedera Docs [GitHub repository](https://github.com/hashgraph/hedera-json-rpc-relay/issues).

</details>
