---
agentTools:
  projectIndex: https://seafile-api.readme.io/llms.txt
---

# Search user

By providing keywords for precise or fuzzy matching, users who meet the search criteria can be found.

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "Account Operations - System Admin",
    "description": "The official SeaTable API Reference (OpenAPI 3.0). - Part 'User Account Operations'.",
    "version": "13.0"
  },
  "servers": [
    {
      "url": "https://{server}",
      "variables": {
        "server": {
          "default": "cloud.seafile.com"
        }
      }
    }
  ],
  "x-readme": {
    "explorer-enabled": true,
    "metrics-enabled": false,
    "proxy-enabled": false
  },
  "components": {
    "securitySchemes": {
      "AccountTokenAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "This is the [Account-Token](/reference/authentication).",
        "bearerFormat": "Account-Token"
      }
    },
    "parameters": {
      "page": {
        "name": "page",
        "in": "query",
        "required": false,
        "schema": {
          "type": "integer",
          "default": 1
        },
        "example": 1
      },
      "per_page": {
        "name": "per_page",
        "in": "query",
        "required": false,
        "schema": {
          "type": "integer"
        },
        "example": 25
      },
      "query": {
        "name": "query",
        "in": "query",
        "required": true,
        "description": "keyword for searching",
        "schema": {
          "type": "string"
        }
      }
    }
  },
  "paths": {
    "/api/v2.1/admin/search-user/": {
      "get": {
        "tags": [
          "Accounts"
        ],
        "summary": "Search user",
        "description": "By providing keywords for precise or fuzzy matching, users who meet the search criteria can be found.",
        "security": [
          {
            "AccountTokenAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/query"
          },
          {
            "$ref": "#/components/parameters/page"
          },
          {
            "$ref": "#/components/parameters/per_page"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "user_list": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "description": "User info",
                        "properties": {
                          "email": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "contact_email": {
                            "type": "string"
                          },
                          "is_staff": {
                            "type": "boolean"
                          },
                          "is_active": {
                            "type": "boolean"
                          },
                          "source": {
                            "type": "string"
                          },
                          "quota_usage": {
                            "type": "integer"
                          },
                          "quota_total": {
                            "type": "integer"
                          },
                          "create_time": {
                            "type": "string"
                          },
                          "last_login": {
                            "type": "string"
                          },
                          "last_access_time": {
                            "type": "string"
                          },
                          "role": {
                            "type": "string"
                          },
                          "institution": {
                            "type": "string"
                          },
                          "social_auth": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "description": "Account bound to a third-party service, such as SAML or LDAP.",
                              "properties": {
                                "provider": {
                                  "type": "string"
                                },
                                "uid": {
                                  "type": "string"
                                }
                              }
                            }
                          }
                        }
                      }
                    },
                    "page_info": {
                      "type": "object",
                      "properties": {
                        "has_next_page": {
                          "type": "boolean"
                        },
                        "current_page": {
                          "type": "integer"
                        }
                      }
                    }
                  },
                  "example": {
                    "user_list": [
                      {
                        "email": "admin@seafile.com",
                        "name": "Teamfile",
                        "contact_email": "admin@seafile.com",
                        "is_staff": true,
                        "is_active": true,
                        "source": "db",
                        "quota_usage": 0,
                        "quota_total": 1000000000000,
                        "create_time": "2023-03-13T17:56:02+08:00",
                        "last_login": "2024-03-25T15:38:33+08:00",
                        "last_access_time": "2024-03-26T10:56:58+08:00",
                        "role": "default",
                        "institution": null,
                        "social_auth": []
                      },
                      {
                        "email": "admin123@seafile.com",
                        "name": "admin123",
                        "contact_email": "admin123@seafile.com",
                        "is_staff": false,
                        "is_active": true,
                        "source": "db",
                        "quota_usage": 0,
                        "quota_total": 3000000000,
                        "create_time": "2023-04-12T13:07:54+08:00",
                        "last_login": "2023-04-12T13:14:47+08:00",
                        "last_access_time": "2023-04-12T13:14:47+08:00",
                        "role": "default",
                        "institution": null,
                        "social_auth": [
                          {
                            "provider": "ldap",
                            "uid": "admin123@seafile.com"
                          }
                        ]
                      }
                    ],
                    "page_info": {
                      "has_next_page": true,
                      "current_page": 1
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "_id": {
    "buffer": {
      "0": 103,
      "1": 183,
      "2": 248,
      "3": 230,
      "4": 103,
      "5": 20,
      "6": 160,
      "7": 0,
      "8": 41,
      "9": 50,
      "10": 176,
      "11": 75
    }
  }
}
```