{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "artworks": {
              "items": {
                "ref": "app.bivri.feed.defs#artworkView",
                "type": "ref"
              },
              "type": "array"
            },
            "cursor": {
              "type": "string"
            },
            "suggestedTags": {
              "description": "Popular tags suggested when the search matched no artworks.",
              "items": {
                "ref": "#tagSuggestion",
                "type": "ref"
              },
              "type": "array"
            }
          },
          "required": [
            "artworks"
          ],
          "type": "object"
        }
      },
      "parameters": {
        "properties": {
          "cursor": {
            "description": "Opaque pagination cursor. Valid only for the sort mode it was issued under; pass it back unchanged on the next request.",
            "type": "string"
          },
          "limit": {
            "default": 25,
            "description": "Maximum number of artworks to return.",
            "maximum": 100,
            "minimum": 1,
            "type": "integer"
          },
          "q": {
            "description": "Search query. Supports boolean tag search, with 'tag:xxx' terms combined by AND, OR and NOT.",
            "type": "string"
          },
          "sort": {
            "default": "relevance",
            "description": "Ordering of the results. 'relevance' is by match score; 'latest' is reverse-chronological; 'popular' is by like count.",
            "knownValues": [
              "relevance",
              "latest",
              "popular"
            ],
            "type": "string"
          }
        },
        "required": [
          "q"
        ],
        "type": "params"
      },
      "type": "query"
    },
    "tagSuggestion": {
      "properties": {
        "count": {
          "type": "integer"
        },
        "tag": {
          "type": "string"
        }
      },
      "required": [
        "tag",
        "count"
      ],
      "type": "object"
    }
  },
  "description": "Search artworks by keyword, tag, or author name. A 'tag:' prefix enables boolean tag search.",
  "id": "app.bivri.search.searchArtworks",
  "lexicon": 1
}
