{
"id": "parts.page.mention.search",
"defs": {
"main": {
"type": "query",
"output": {
"schema": {
"type": "object",
"required": [
"results"
],
"properties": {
"results": {
"type": "array",
"items": {
"ref": "#result",
"type": "ref"
},
"maxLength": 50
}
}
},
"encoding": "application/json"
},
"parameters": {
"type": "params",
"required": [
"service",
"search"
],
"properties": {
"limit": {
"type": "integer",
"default": 20,
"maximum": 50,
"minimum": 1,
"description": "Maximum number of results to return"
},
"scope": {
"type": "string",
"description": "Optional scope identifier to narrow results within a service, as returned by a previous result's subscope.scope field"
},
"search": {
"type": "string",
"description": "Search query string"
},
"service": {
"type": "string",
"format": "at-uri",
"description": "AT URI of the parts.page.mention.service record identifying which service to query"
}
}
},
"description": "Search a mention service for matching results. A single XRPC host can serve multiple mention services, distinguished by the service AT URI."
},
"result": {
"type": "object",
"required": [
"uri",
"name"
],
"properties": {
"uri": {
"type": "string",
"description": "Identifier for the mentioned entity"
},
"href": {
"type": "string",
"format": "uri",
"description": "Optional web URL for the mentioned entity"
},
"icon": {
"type": "string",
"format": "uri",
"description": "Optional icon URL for the mentioned entity, displayed next to the mention"
},
"name": {
"type": "string",
"description": "Display name for the mentioned entity"
},
"embed": {
"ref": "#embedInfo",
"type": "ref",
"description": "Optional embed info for creating an embed block instead of an inline mention"
},
"labels": {
"type": "array",
"items": {
"ref": "#mentionLabel",
"type": "ref"
},
"description": "A set of labels to be rendered with the mentionedEntity"
},
"subscope": {
"ref": "#subscopeInfo",
"type": "ref",
"description": "Optional subscope info indicating this result can be scoped into for further searching"
},
"description": {
"type": "string",
"description": "A description for the mentioned entity"
}
}
},
"embedInfo": {
"type": "object",
"required": [
"src"
],
"properties": {
"src": {
"type": "string",
"format": "uri",
"description": "Source URL for the iframe embed"
},
"width": {
"type": "integer",
"maximum": 3200,
"minimum": 16,
"description": "Default width of the embed in pixels"
},
"height": {
"type": "integer",
"maximum": 3200,
"minimum": 16,
"description": "Default height of the embed in pixels"
},
"aspectRatio": {
"ref": "#aspectRatio",
"type": "ref",
"description": "Aspect ratio of the embed. If provided, takes precedence over width/height for sizing."
}
}
},
"aspectRatio": {
"type": "object",
"required": [
"width",
"height"
],
"properties": {
"width": {
"type": "integer"
},
"height": {
"type": "integer"
}
}
},
"mentionLabel": {
"type": "object",
"properties": {
"text": {
"type": "string"
}
}
},
"subscopeInfo": {
"type": "object",
"required": [
"scope",
"label"
],
"properties": {
"label": {
"type": "string",
"maxLength": 100,
"description": "Display label for the scope-down button (e.g. 'Posts', 'Tracks')"
},
"scope": {
"type": "string",
"description": "Scope identifier passed back to the service in subsequent search queries"
}
}
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}