> ## Documentation Index
> Fetch the complete documentation index at: https://supermemory-personal-brain-docs.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Get user profile

> Get user profile with optional search results



## OpenAPI

````yaml https://api.supermemory.ai/v4/openapi post /v4/profile
openapi: 3.1.0
info:
  title: supermemory API
  description: >-
    The Memory API for the AI era. OpenAPI operations include x-codeSamples for
    the official TypeScript and Python SDKs (Mintlify-compatible).
  version: 3.0.0
servers:
  - description: Production Server
    url: https://api.supermemory.ai
security:
  - bearerAuth: []
tags:
  - name: Ingest
    description: Ingest documents, files, URLs, conversations, and other content
  - name: Recall (Search)
    description: >-
      Semantic recall across your content — supports memories, hybrid, and
      documents modes
  - name: Profiles
    description: >-
      Entity profiles for users, participants, or any entity — includes profile
      search
  - name: Content Management
    description: List, get, update, and delete content and memories
  - name: Container Tags
    description: List and manage container tags (spaces) — settings, merge, and delete
  - name: Connections
    description: External service integrations
  - name: Settings
    description: Organization settings
  - name: Documents
    description: List, get, and search documents
paths:
  /v4/profile:
    post:
      tags:
        - Profiles
      summary: Get user profile
      description: Get user profile with optional search results
      operationId: postV4Profile
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                q:
                  description: >-
                    Optional search query to include search results in the
                    response
                  type: string
                containerTag:
                  type: string
                  description: >-
                    Tag to filter the profile by. This can be an ID for your
                    user, a project ID, or any other identifier you wish to use
                    to filter memories.
                threshold:
                  description: >-
                    Threshold for search results. Only results with a score
                    above this threshold will be included.
                  type: number
                  minimum: 0
                  maximum: 1
                filters:
                  $ref: '#/components/schemas/QueryFilter'
                  description: >-
                    Optional metadata filters to apply to profile results and
                    search results. Supports complex AND/OR queries with
                    multiple conditions.
                include:
                  description: >-
                    Profile sections to return. Omit to return all sections.
                    Pass a subset to reduce payload — e.g. ["buckets"] skips
                    static and dynamic entirely.
                  type: array
                  items:
                    type: string
                    enum:
                      - static
                      - dynamic
                      - buckets
                buckets:
                  description: >-
                    Specific bucket keys to return. Omit to return all
                    configured buckets. Only relevant when "buckets" is
                    included.
                  type: array
                  items:
                    type: string
              required:
                - containerTag
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  profile:
                    type: object
                    properties:
                      static:
                        description: >-
                          Static profile information that remains relevant
                          long-term
                        type: array
                        items:
                          type: string
                      dynamic:
                        description: Dynamic profile information (recent memories)
                        type: array
                        items:
                          type: string
                      buckets:
                        description: Per-bucket memory lists, keyed by bucket key
                        type: object
                        propertyNames:
                          type: string
                        additionalProperties:
                          type: array
                          items:
                            type: string
                  searchResults:
                    description: Search results if a search query was provided
                    type: object
                    properties:
                      results:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              description: Memory entry ID or chunk ID
                              example: mem_abc123
                            memory:
                              description: >-
                                The memory content (only present for memory
                                results)
                              example: >-
                                The user prefers detailed API responses over
                                minimal ones.
                              type: string
                            chunk:
                              description: >-
                                The chunk content (only present for chunk
                                results from hybrid search)
                              example: This is a chunk of content from a document...
                              type: string
                            metadata:
                              anyOf:
                                - type: object
                                  propertyNames:
                                    type: string
                                  additionalProperties: {}
                                - type: 'null'
                              description: Memory metadata
                              example:
                                source: conversation
                                confidence: 0.9
                            updatedAt:
                              type: string
                              description: Memory last update date
                              format: datetime
                            similarity:
                              type: number
                              description: >-
                                Similarity score between the query and memory
                                entry
                              example: 0.89
                              maximum: 1
                              minimum: 0
                            filepath:
                              description: >-
                                Filepath of the source document this memory or
                                chunk came from
                              x-hidden: true
                              anyOf:
                                - type: string
                                - type: 'null'
                            version:
                              description: Version number of this memory entry
                              example: 3
                              anyOf:
                                - type: number
                                - type: 'null'
                            rootMemoryId:
                              description: >-
                                ID of the root (first version) memory entry this
                                one descends from. Null for memories that have
                                never been superseded. Only present on memory
                                results, not on standalone chunk results.
                              example: mem_abc123
                              anyOf:
                                - type: string
                                - type: 'null'
                            context:
                              description: >-
                                Object containing version history
                                (parents/children via updates) and related
                                memories (extends/derives)
                              type: object
                              properties:
                                parents:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      relation:
                                        type: string
                                        enum:
                                          - updates
                                          - extends
                                          - derives
                                        description: >-
                                          Relation type between this memory and
                                          its parent/child
                                        example: updates
                                      version:
                                        description: >-
                                          Relative version distance from the
                                          primary memory (-1 for direct parent, -2
                                          for grand-parent, etc.)
                                        example: -1
                                        anyOf:
                                          - type: number
                                          - type: 'null'
                                      memory:
                                        type: string
                                        description: The contextual memory content
                                        example: >-
                                          Earlier version: API rate limit is 50
                                          req/min on the free tier.
                                      metadata:
                                        description: Contextual memory metadata
                                        anyOf:
                                          - type: object
                                            propertyNames:
                                              type: string
                                            additionalProperties: {}
                                          - type: 'null'
                                      updatedAt:
                                        type: string
                                        description: Contextual memory last update date
                                        format: datetime
                                    required:
                                      - relation
                                      - memory
                                      - updatedAt
                                children:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      relation:
                                        type: string
                                        enum:
                                          - updates
                                          - extends
                                          - derives
                                        description: >-
                                          Relation type between this memory and
                                          its parent/child
                                        example: extends
                                      version:
                                        description: >-
                                          Relative version distance from the
                                          primary memory (+1 for direct child, +2
                                          for grand-child, etc.)
                                        example: 1
                                        anyOf:
                                          - type: number
                                          - type: 'null'
                                      memory:
                                        type: string
                                        description: The contextual memory content
                                        example: >-
                                          Later version: API rate limit increased
                                          to 100 req/min on the free tier.
                                      metadata:
                                        description: Contextual memory metadata
                                        anyOf:
                                          - type: object
                                            propertyNames:
                                              type: string
                                            additionalProperties: {}
                                          - type: 'null'
                                      updatedAt:
                                        type: string
                                        description: Contextual memory last update date
                                        format: datetime
                                    required:
                                      - relation
                                      - memory
                                      - updatedAt
                                related:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      relation:
                                        type: string
                                        enum:
                                          - extends
                                          - derives
                                        description: Relation type
                                      memory:
                                        type: string
                                        description: The related memory content
                                      metadata:
                                        description: Related memory metadata
                                        anyOf:
                                          - type: object
                                            propertyNames:
                                              type: string
                                            additionalProperties: {}
                                          - type: 'null'
                                      updatedAt:
                                        type: string
                                        description: Related memory last update date
                                    required:
                                      - relation
                                      - memory
                                      - updatedAt
                            documents:
                              description: Associated documents for this memory entry
                              type: array
                              items:
                                type: object
                                properties:
                                  id:
                                    type: string
                                    description: Document ID
                                    example: doc_xyz789
                                  title:
                                    description: >-
                                      Document title (only included when
                                      documents=true)
                                    example: API Rate Limiting Policy
                                    type: string
                                  type:
                                    description: >-
                                      Document type (only included when
                                      documents=true)
                                    example: web
                                    type: string
                                  metadata:
                                    description: >-
                                      Document metadata (only included when
                                      documents=true)
                                    example:
                                      source: upload
                                      language: en
                                    anyOf:
                                      - type: object
                                        propertyNames:
                                          type: string
                                        additionalProperties: {}
                                      - type: 'null'
                                  summary:
                                    description: >-
                                      Document summary (only included when
                                      summaries=true)
                                    example: >-
                                      API rate limit policy: 100 req/min free,
                                      1000 req/min pro.
                                    anyOf:
                                      - type: string
                                      - type: 'null'
                                  createdAt:
                                    type: string
                                    description: Document creation date
                                    format: datetime
                                  updatedAt:
                                    type: string
                                    description: Document last update date
                                    format: datetime
                                required:
                                  - id
                                  - createdAt
                                  - updatedAt
                            chunks:
                              description: >-
                                Relevant chunks from associated documents (only
                                included when chunks=true)
                              type: array
                              items:
                                type: object
                                properties:
                                  content:
                                    type: string
                                    description: Content of the chunk
                                    example: >-
                                      This is a chunk of content from the
                                      document...
                                  position:
                                    type: number
                                    description: >-
                                      Position of chunk in the document
                                      (0-indexed)
                                    example: 0
                                  documentId:
                                    type: string
                                    description: ID of the document this chunk belongs to
                                    example: doc_xyz789
                                required:
                                  - content
                                  - position
                                  - documentId
                            isAggregated:
                              description: >-
                                Indicates if this memory was created by
                                aggregating multiple source memories
                              example: false
                              type: boolean
                          required:
                            - id
                            - metadata
                            - updatedAt
                            - similarity
                        description: Search results for the provided query
                      total:
                        type: number
                        description: Total number of search results
                      timing:
                        type: number
                        description: Search timing in milliseconds
                    required:
                      - results
                      - total
                      - timing
                required:
                  - profile
          description: User profile with optional search results
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Invalid request parameters
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unauthorized
        '402':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Search quota or credits exhausted (when search query is provided)
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Server error
      x-codeSamples:
        - lang: typescript
          label: TypeScript SDK
          source: |-
            import Supermemory from "supermemory";

            const client = new Supermemory({
              apiKey: process.env.SUPERMEMORY_API_KEY,
            });

            const { profile } = await client.profile({
              containerTag: "user_123",
            });

            console.log(profile.static);  // long-term facts
            console.log(profile.dynamic); // recent context
        - lang: python
          label: Python SDK
          source: |-
            from supermemory import Supermemory

            client = Supermemory()  # uses SUPERMEMORY_API_KEY

            result = client.profile(container_tag="user_123")
            print(result.profile.static)
            print(result.profile.dynamic)
        - lang: bash
          label: cURL
          source: |-
            curl -X POST "https://api.supermemory.ai/v4/profile" \
              -H "Authorization: Bearer $SUPERMEMORY_API_KEY" \
              -H "Content-Type: application/json" \
              -d '{ "containerTag": "user_123" }'
components:
  schemas:
    QueryFilter:
      description: >-
        Root query object that must contain either an AND or OR array of filter
        expressions
      anyOf:
        - type: object
          properties:
            OR:
              type: array
              items:
                $ref: '#/components/schemas/LogicalExpression'
              description: Array of OR filter expressions
          required:
            - OR
        - type: object
          properties:
            AND:
              type: array
              items:
                $ref: '#/components/schemas/LogicalExpression'
              description: Array of AND filter expressions
          required:
            - AND
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: Error message
          example: Invalid request parameters
        details:
          type: string
          description: Additional error details
          example: Query must be at least 1 character long
      required:
        - error
    LogicalExpression:
      description: >-
        A single filter condition or a nested AND/OR expression. The API
        validates up to 5 levels of nesting.
      anyOf:
        - $ref: '#/components/schemas/FilterCondition'
        - type: object
          properties:
            OR:
              type: array
              items:
                $ref: '#/components/schemas/LogicalExpression'
              description: 'OR: Array of conditions or nested expressions'
          required:
            - OR
        - type: object
          properties:
            AND:
              type: array
              items:
                $ref: '#/components/schemas/LogicalExpression'
              description: 'AND: Array of conditions or nested expressions'
          required:
            - AND
    FilterCondition:
      type: object
      properties:
        filterType:
          default: metadata
          type: string
          enum:
            - metadata
            - numeric
            - array_contains
            - string_contains
        key:
          type: string
        negate:
          anyOf:
            - type: boolean
            - type: string
              enum:
                - 'true'
                - 'false'
        ignoreCase:
          anyOf:
            - type: boolean
            - type: string
              enum:
                - 'true'
                - 'false'
        numericOperator:
          default: '='
          type: string
          enum:
            - '>'
            - <
            - '>='
            - <=
            - '='
        value:
          type: string
      required:
        - key
        - value
      description: >-
        A single filter condition based on metadata, numeric values, array
        contents, or string matching
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````