---
schema_version: "1"
id: 32801916e2dd2b6c0c99039fb338aa804779580ab4222fdbc11a574dca64321c
title: GetTopic RPC Method
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/event-bus/pub-sub-api/references/gettopic-rpc.md
canonical_url: https://developer.salesforce.com/docs/platform/pub-sub-api/references/methods/gettopic-rpc.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: ef9aaa5e2057eb0f1b43a58aa877c6fb89df655d7bea7584f90b2c2150f2d408
products:
  - Pub/Sub API
  - Event Bus Docs
---
# GetTopic RPC Method

The `GetTopic` RPC method returns information for an event, such as the event topic name and the schema ID. The topic is the API name of the event object preceded by a path. The topic indicates the type of event to publish and the type of event to subscribe to. For example, the topic of a custom platform event with the API name of `Order_Event__e` is `/event/Order_Event__e`. Pass in the topic name in `TopicRequest`. The schema ID, that's returned in `TopicInfo`, is used to get the event schema with `GetSchema`.

```
rpc GetTopic (TopicRequest) returns (TopicInfo);
```

For more information about the fields in TopicRequest and TopicInfo, see the [Pub/Sub API proto file](https://github.com/forcedotcom/pub-sub-api/blob/main/pubsub_api.proto).
