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

# List topics by tag

> List the topics that carry every one of the given tags.

This is a hard filter, not a ranking: a topic is returned only if it has all of the tags you asked for, and `total` counts every match before paging.



## OpenAPI

````yaml /api-reference/openapi.json get /api/v2/knowledge_bases/{kb_id}/topics
openapi: 3.1.0
info:
  title: EverOS Cloud Memory API
  version: 2.0.0
  license:
    name: Apache-2.0
    identifier: Apache-2.0
  contact:
    name: EverMind AI
    email: service@evermind.ai
    url: https://github.com/EverMind-AI/everos-cloud-sdk-python
  description: >-
    Official Python client for the EverOS Cloud Memory API. Add, search,
    retrieve, and manage long-term memory for your AI applications over a typed
    interface (pydantic v2, with full type hints). Install and usage guides:
    https://github.com/EverMind-AI/everos-cloud-sdk-python
servers:
  - url: https://api.evermind.ai
    description: Production
security:
  - BearerAuth: []
paths:
  /api/v2/knowledge_bases/{kb_id}/topics:
    get:
      tags:
        - Knowledge
      summary: List topics by tag
      description: >-
        List the topics that carry every one of the given tags.


        This is a hard filter, not a ranking: a topic is returned only if it has
        all of the tags you asked for, and `total` counts every match before
        paging.
      operationId: listTopicsByTags
      parameters:
        - name: kb_id
          in: path
          required: true
          description: The knowledge base to search within.
          schema:
            type: string
            title: Kb Id
        - name: tag_ids
          in: query
          required: true
          description: >-
            Hard filter: a topic is returned only if it carries EVERY one of
            these tag ids. Use `boost_tag_ids` on the search endpoint instead to
            reweight without excluding anything.
          schema:
            type: array
            items:
              type: string
              maxLength: 128
              minLength: 1
              description: Opaque semantic tag id
            minItems: 1
            maxItems: 100
            description: >-
              Hard filter: a topic is returned only if it carries EVERY one of
              these tag ids.
            title: Tag Ids
        - name: page
          in: query
          required: false
          description: 1-based page number.
          schema:
            type: integer
            minimum: 1
            default: 1
            title: Page
        - name: page_size
          in: query
          required: false
          description: Items per page, 1 to 100 (default 20).
          schema:
            type: integer
            maximum: 100
            minimum: 1
            default: 20
            title: Page Size
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessEnvelope_TopicFilterListData_'
        '401':
          description: Missing or invalid bearer token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayError'
        '403':
          description: >-
            Authenticated but not permitted — either rejected by the auth
            service, or the account's memory API version does not match the
            interface version implied by the path (a v1 account calling an
            /api/v2 route).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayError'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '429':
          description: Rate limit or quota exceeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayError'
        '503':
          description: >-
            The gateway could not reach the authentication service. Transient —
            retry with backoff.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayError'
components:
  schemas:
    SuccessEnvelope_TopicFilterListData_:
      properties:
        request_id:
          type: string
          title: Request Id
          description: Request trace id (peer to data)
        data:
          $ref: '#/components/schemas/TopicFilterListData'
          description: Endpoint-defined business result
      type: object
      required:
        - request_id
        - data
      title: SuccessEnvelope[TopicFilterListData]
    GatewayError:
      type: object
      additionalProperties: true
      description: >-
        Gateway error body. NOTE: shape is not yet uniform across auth/quota/
        rate-limit paths — treat fields as best-effort. Commonly includes a
        `code`/`message` (flat) or an `error` object/string with a `message`.
      title: GatewayError
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
          description: One entry per field that failed validation.
      type: object
      title: HTTPValidationError
    TopicFilterListData:
      properties:
        topics:
          items:
            $ref: '#/components/schemas/TopicFilterItem'
          type: array
          title: Topics
          description: The matching topics, one page of them.
        total:
          type: integer
          minimum: 0
          title: Total
          description: >-
            How many topics satisfy the all-tags-on-one-topic condition in
            total, counted before paging.
      additionalProperties: false
      type: object
      required:
        - topics
        - total
      title: TopicFilterListData
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
          description: Path to the offending field, from the body root.
        msg:
          type: string
          title: Message
          description: What is wrong with it.
        type:
          type: string
          title: Error Type
          description: Machine-readable validation-error kind.
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    TopicFilterItem:
      properties:
        id:
          type: string
          title: Id
          description: Topic (node) id
        doc_id:
          type: string
          title: Doc Id
          description: Owning document id
          default: ''
        kb_id:
          type: string
          title: Kb Id
          description: Owning knowledge base id
          default: ''
        name:
          type: string
          title: Name
          description: Topic title
        type:
          type: string
          enum:
            - root
            - section
            - element
          title: Type
          default: section
          description: >-
            Structural role of the topic — "root" for the synthetic
            document-root node, "section" for a real topic.
        depth:
          type: integer
          minimum: 0
          title: Depth
          default: 0
          description: >-
            Depth in the document tree — 0 is the document root, 1 a top-level
            topic.
        seq:
          type: integer
          minimum: 0
          title: Seq
          default: 0
          description: >-
            Depth-first position within the document. Use it as an ordering, not
            as an index to compute with.
        parent_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Parent Id
          description: The topic above this one. Null only on the document root.
        summary:
          type: string
          title: Summary
          default: ''
          description: >-
            Retrieval-oriented summary covering this topic and everything under
            it.
        tag_ids:
          items:
            type: string
            maxLength: 128
            minLength: 1
            description: Opaque semantic tag id
          type: array
          maxItems: 50
          uniqueItems: true
          title: Tag Ids
          description: Opaque final materialized semantic tag ids (maximum 50)
        version:
          type: integer
          minimum: 0
          title: Version
          description: Current topic tag CAS version
      additionalProperties: false
      type: object
      required:
        - id
        - name
        - tag_ids
        - version
      title: TopicFilterItem
      description: >-
        Slim item for the KB-wide tag-filter endpoint.


        This is deliberately separate from :class:`TopicListItem`: the
        document-tree API

        may hydrate content and exposes timestamps, while the cross-service
        tag-filter wire

        is frozen without those fields.
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: 'API key issued by EverOS, sent as `Authorization: Bearer <api_key>`.'

````