> ## Documentation Index
> Fetch the complete documentation index at: https://docs.streamnative.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Return the list of topics.

> Lists all topics in the Kafka cluster or within a specific namespace. Returns topic metadata including partition count and internal/external topic classification.



## OpenAPI

````yaml get /admin/v1/topics
openapi: 3.0.0
info:
  title: StreamNative Kafka REST API
  description: >-
    REST API for managing Kafka resources and producing/consuming messages in
    StreamNative Cloud
  version: v1
servers: []
security: []
paths:
  /admin/v1/topics:
    get:
      tags:
        - ksn-topics
      summary: Return the list of topics.
      description: >-
        Lists all topics in the Kafka cluster or within a specific namespace.
        Returns topic metadata including partition count and internal/external
        topic classification.
      operationId: listTopics
      parameters:
        - name: namespace
          in: query
          description: List topics for the special namespace.
          required: false
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KafkaTopicList'
        '400':
          description: Wrong request params
        '401':
          description: Unauthorized
        '500':
          description: Internal server error
components:
  schemas:
    KafkaTopicList:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/KafkaTopic'
        metadata:
          $ref: '#/components/schemas/Metadata'
        kind:
          type: string
    KafkaTopic:
      type: object
      properties:
        topic_name:
          type: string
        partitions_count:
          type: integer
          format: int32
        metadata:
          $ref: '#/components/schemas/Metadata'
        internal:
          type: boolean
        kind:
          type: string
    Metadata:
      type: object

````