{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Search the indexed records. q is an at:// URI, a DID (that account's records) or text; with no q, the newest records the firehose brought. Requires an admin session.",
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "cursor": {
              "type": "string"
            },
            "records": {
              "items": {
                "ref": "social.grain.admin.defs#recordView",
                "type": "ref"
              },
              "type": "array"
            }
          },
          "required": [
            "records"
          ],
          "type": "object"
        }
      },
      "parameters": {
        "properties": {
          "cursor": {
            "type": "string"
          },
          "limit": {
            "default": 20,
            "maximum": 100,
            "minimum": 1,
            "type": "integer"
          },
          "q": {
            "type": "string"
          }
        },
        "type": "params"
      },
      "type": "query"
    }
  },
  "id": "social.grain.admin.searchRecords",
  "lexicon": 1
}
