跳转到主要内容
POST
/
search
/
{domain}
Search documentation
curl --request POST \
  --url https://api-dsc.mintlify.com/v1/search/{domain} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "query": "<string>",
  "pageSize": 10,
  "filter": {
    "version": "<string>",
    "language": "<string>"
  }
}
'
[
  {
    "content": "<string>",
    "path": "<string>",
    "metadata": {}
  }
]

授权

Authorization
string
header
必填

The Authorization header expects a Bearer token. See the Assistant API Key documentation for details on how to get your API key.

路径参数

domain
string
必填

The domain identifier from your domain.mintlify.app URL. Can be found at the end of your dashboard URL. For example, dashboard.mintlify.com/organization/domain has a domain identifier of domain.

请求体

application/json
query
string
必填

The search query to execute against your documentation content.

pageSize
number
默认值:10

Number of search results to return. Defaults to 10 if not specified.

filter
object

Optional filtering parameters to narrow search results.

响应

200 - application/json

Search results

content
string

The matching content from your documentation.

path
string

The path or URL to the source document.

metadata
object

Additional metadata about the search result, including relevance scoring and other contextual information.