# Comparison of endpoint types

The following table compares the differences between the gRPC, REST and CometBFT RPC endpoints.

<table><thead><tr><th width="131">Name</th><th>Advantages</th><th>Disadvantages</th></tr></thead><tbody><tr><td><strong>gRPC</strong></td><td><ul><li>can use code-generated stubs in various languages</li><li>supports streaming and bidirectional communication (HTTP/2)</li><li>small wire binary sizes, faster transmission</li></ul></td><td><ul><li>based on HTTP/2, not available in some browsers</li><li>learning curve (mostly due to Protobuf)</li></ul></td></tr><tr><td><strong>REST</strong></td><td><ul><li>ubiquitous</li><li>client libraries in all languages, faster implementation</li></ul></td><td><ul><li>only supports unary request-response communication (HTTP/1.1)</li><li>bigger over-the-wire message sizes (JSON)</li><li><strong>heavily rate-limited by public endpoints</strong></li></ul></td></tr><tr><td><strong>CometBFT RPC</strong></td><td><ul><li>easy to use</li><li>has endpoints that allow querying txs by event type</li><li>has websocket support for streaming data</li></ul></td><td><ul><li>bigger over-the-wire message sizes (JSON)</li><li>due to scalability issues, many documented endpoints <strong>may be disabled or heavily rate-limited by public endpoints</strong></li></ul></td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.scrt.network/secret-network-documentation/development/resources-api-contract-addresses/connecting-to-the-network/comparison-of-endpoint-types.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
