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

# List Knowledge Bases

> List knowledge bases accessible to the API key.



## OpenAPI

````yaml https://registry.scalar.com/@profound/apis/external-api/latest/openapi.json?variant=processed get /v1/knowledge-bases
openapi: 3.1.0
info:
  title: External API
  version: 0.60.2
  x-scalar-sdk-installation:
    - lang: Python
      description: |-
        ```sh
        pip install profound
        ```
    - lang: TypeScript
      description: |-
        ```sh
        npm install @profoundai/client
        ```
    - lang: Rust
      description: |-
        ```sh
        cargo add profound
        ```
servers:
  - url: https://api.tryprofound.com
    description: Production Server
security:
  - APIKeyHeader:
      - X-API-Key
  - BearerAuth: []
paths:
  /v1/knowledge-bases:
    get:
      tags:
        - Knowledge bases
      summary: List Knowledge Bases
      description: List knowledge bases accessible to the API key.
      operationId: list_knowledge_bases_v1_knowledge_bases_get
      parameters:
        - name: organization_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            description: >-
              Organization scope for API keys that can access multiple
              organizations.
            title: Organization Id
          description: >-
            Organization scope for API keys that can access multiple
            organizations.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListKnowledgeBasesResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
        - BearerAuth: []
      x-codeSamples:
        - label: Python
          lang: Python
          source: |-
            import os

            from profound import Profound

            client = Profound(
                api_key=os.environ.get("PROFOUND_API_KEY"),
            )

            knowledge_base = client.knowledge_bases.list()

            print(knowledge_base)
        - label: TypeScript
          lang: TypeScript
          source: |-
            import Profound from '@profoundai/client';

            const client = new Profound({
              apiKey: process.env['PROFOUND_API_KEY'], // defaults to the PROFOUND_API_KEY env var
              environment: 'production',
            });

            const knowledgeBase = await client.knowledgeBases.list();

            console.log(knowledgeBase);
        - label: rust
          lang: rust
          source: |-
            use profound::*;

            #[tokio::main]
            async fn main() -> Result<(), Box<dyn std::error::Error>> {
                let client = ProfoundClient::builder()
                    .api_key(std::env::var("PROFOUND_API_KEY")?)
                    .build()?;

                let response = client.knowledge_bases().list().send().await?;

                println!("{:?}", response);

                Ok(())
            }
components:
  schemas:
    ListKnowledgeBasesResponse:
      properties:
        data:
          items:
            $ref: '#/components/schemas/KnowledgeBaseItem'
          type: array
          title: Data
          description: Knowledge bases accessible to the API key.
        pagination:
          $ref: '#/components/schemas/CursorPagination'
          description: Pagination metadata.
      additionalProperties: false
      type: object
      required:
        - data
      title: ListKnowledgeBasesResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    KnowledgeBaseItem:
      properties:
        id:
          type: string
          format: uuid
          title: Id
          description: Unique knowledge base ID.
        name:
          type: string
          title: Name
          description: Knowledge base name.
        slug:
          anyOf:
            - type: string
            - type: 'null'
          title: Slug
          description: Knowledge base slug.
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: Knowledge base description.
        created_at:
          type: string
          format: date-time
          title: Created At
          description: Creation timestamp.
      additionalProperties: false
      type: object
      required:
        - id
        - name
        - created_at
      title: KnowledgeBaseItem
    CursorPagination:
      properties:
        limit:
          type: integer
          maximum: 50000
          exclusiveMinimum: 0
          title: Limit
          description: >-
            Maximum number of results to return. Default is 10,000, maximum is
            50,000.
          default: 10000
        next_cursor:
          anyOf:
            - type: string
            - type: 'null'
          title: Next Cursor
          description: Token for the next page, if more results are available.
      additionalProperties: false
      type: object
      title: CursorPagination
      description: Cursor-based pagination metadata.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````