Skip to content
Software capabilities
Confluent Cloud

List Confluent Cloud Kafka topics

Confluent Cloud lists topics through the Kafka REST API or Confluent CLI. Both methods are read-only and return the topics visible on a specified Kafka cluster.

Documentation reviewed · 2 methods with sources

Ways to do it

  1. API: GET /kafka/v3/clusters/{cluster_id}/topics
  2. CLI: confluent kafka topic list
API

GET /kafka/v3/clusters/{cluster_id}/topics

Return the topic collection for one Confluent Cloud Kafka cluster, including pagination metadata and topic attributes.

Read source: Confluent Cloud List Topics API
Requirements
The cluster REST endpoint, a resource API key or external access token, and Kafka authorization that permits describing or listing the cluster's topics.
Limitations
The API can return 401, 403, or 429 responses for authentication, authorization, or rate limits. Follow the metadata.next link when the collection is paginated.

Example shell

curl --fail --user "$CONFLUENT_KAFKA_API_KEY:$CONFLUENT_KAFKA_API_SECRET" "$CONFLUENT_KAFKA_REST_ENDPOINT/kafka/v3/clusters/$CONFLUENT_CLUSTER_ID/topics"
CLI

confluent kafka topic list

List topics on a Confluent Cloud cluster from the authenticated Confluent CLI context.

Read source: Confluent CLI topic list
Requirements
The current Confluent CLI, a completed confluent login or API-key setup, a selected environment, and the Kafka cluster ID.
Limitations
The CLI lists topics only for the selected or explicitly named cluster and reports an error if the identity lacks the ACLs or role bindings required to describe topics.

Example shell

confluent kafka topic list --cluster "$CONFLUENT_CLUSTER_ID" --output json