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

# Get User Blobs

Retrieve all memory blobs of a specific type for a user. This endpoint supports pagination to manage large sets of memory data efficiently.

Query Parameters:

* page: Page number (default: 0)
* page\_size: Number of items per page (default: 10)


## OpenAPI

````yaml get /api/v1/users/blobs/{user_id}/{blob_type}
openapi: 3.1.0
info:
  title: Memobase API
  summary: APIs for Memobase, a user memory system for LLM Apps
  version: 0.0.40
servers:
  - url: https://api.memobase.dev
  - url: https://api.memobase.cn
security:
  - BearerAuth: []
paths:
  /api/v1/users/blobs/{user_id}/{blob_type}:
    get:
      tags:
        - user
      summary: Get User All Blobs
      operationId: get_user_all_blobs_api_v1_users_blobs__user_id___blob_type__get
      parameters:
        - name: user_id
          in: path
          required: true
          schema:
            anyOf:
              - type: string
                format: uuid4
              - type: string
                format: uuid5
            description: The ID of the user to fetch blobs for
            title: User Id
          description: The ID of the user to fetch blobs for
        - name: blob_type
          in: path
          required: true
          schema:
            $ref: '#/components/schemas/BlobType'
            description: The type of blobs to retrieve
          description: The type of blobs to retrieve
        - name: page
          in: query
          required: false
          schema:
            type: integer
            description: Page number for pagination, starting from 0
            default: 0
            title: Page
          description: Page number for pagination, starting from 0
        - name: page_size
          in: query
          required: false
          schema:
            type: integer
            description: Number of items per page, default is 10
            default: 10
            title: Page Size
          description: Number of items per page, default is 10
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IdsResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      x-code-samples:
        - lang: python
          source: >+
            # To use the Python SDK, install the package:

            # pip install memobase


            from memobase import MemoBaseClient

            from memobase.core.blob import BlobType


            client = MemoBaseClient(project_url='PROJECT_URL',
            api_key='PROJECT_TOKEN')


            user = client.get_user('user_id')

            blobs = user.get_all(BlobType.chat)

          label: Python
        - lang: javascript
          source: >+
            // To use the JavaScript SDK, install the package:

            // npm install @memobase/memobase


            import { MemoBaseClient, BlobType } from '@memobase/memobase';


            const client = new MemoBaseClient(process.env.MEMOBASE_PROJECT_URL,
            process.env.MEMOBASE_API_KEY);


            const user = client.getUser('user_id');

            const blobs = await user.getAll(BlobType.Enum.chat);

          label: JavaScript
        - lang: go
          source: >+
            // To use the Go SDK, install the package:

            // go get
            github.com/memodb-io/memobase/src/client/memobase-go@latest


            import (
                "fmt"
                "log"

                "github.com/memodb-io/memobase/src/client/memobase-go/blob"
                "github.com/memodb-io/memobase/src/client/memobase-go/core"
            )


            func main() {
                projectURL := "YOUR_PROJECT_URL"
                apiKey := "YOUR_API_KEY"
                // Initialize the client
                client, err := core.NewMemoBaseClient(
                    projectURL,
                    apiKey,
                )
                if err != nil {
                    log.Fatalf("Failed to create client: %v", err)
                }

                // Get a user
                userID := "EXISTING_USER_ID" // Replace with an actual user ID
                user, err := client.GetUser(userID, false)
                if err != nil {
                    log.Fatalf("Failed to get user: %v", err)
                }

                // Get all chat blobs
                blobIDs, err := user.GetAll(blob.ChatType, 0, 10)
                if err != nil {
                    log.Fatalf("Failed to get blobs: %v", err)
                }

                fmt.Printf("Found %d chat blobs
            ", len(blobIDs))

            }

          label: Go
components:
  schemas:
    BlobType:
      type: string
      enum:
        - chat
        - summary
        - doc
        - image
        - code
        - transcript
      title: BlobType
    IdsResponse:
      properties:
        data:
          anyOf:
            - $ref: '#/components/schemas/IdsData'
            - type: 'null'
          description: Response containing multiple IDs
        errno:
          $ref: '#/components/schemas/CODE'
          description: Error code, 0 means success
          default: 0
        errmsg:
          type: string
          title: Errmsg
          description: Error message, empty when success
          default: ''
      type: object
      title: IdsResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    IdsData:
      properties:
        ids:
          items:
            anyOf:
              - type: string
                format: uuid4
              - type: string
                format: uuid5
          type: array
          title: Ids
          description: List of UUID identifiers
      type: object
      required:
        - ids
      title: IdsData
    CODE:
      type: integer
      enum:
        - 0
        - 400
        - 401
        - 403
        - 404
        - 405
        - 409
        - 422
        - 500
        - 501
        - 502
        - 503
        - 504
        - 520
      title: CODE
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````