Skip to content

Commit b23068b

Browse files
committed
add search endpoint
1 parent 3faea2f commit b23068b

File tree

2 files changed

+94
-1
lines changed

2 files changed

+94
-1
lines changed

api-reference/chat/search.mdx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---
2+
openapi: "POST /search/{domain}"
3+
---

discovery-openapi.json

Lines changed: 91 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"x-mcp": {
2222
"enabled": true
2323
},
24-
"summary": "Generate Assistant Message",
24+
"summary": "Generate assistant message",
2525
"description": "Generates a response message from the assistant for the specified domain. For best results, use the [useChat hook from ai-sdk](https://ai-sdk.dev/docs/reference/ai-sdk-ui/use-chat#usechat) to send requests and handle responses. You can set `fp`, `threadId`, and `filter` in the `body` field of the options parameter passed to the hook.",
2626
"parameters": [
2727
{
@@ -498,6 +498,96 @@
498498
}
499499
}
500500
}
501+
},
502+
"/search/{domain}": {
503+
"post": {
504+
"x-mcp": {
505+
"enabled": true
506+
},
507+
"summary": "Search for documentation",
508+
"description": "Perform semantic and keyword searches across your documentation with configurable filtering and pagination.",
509+
"parameters": [
510+
{
511+
"name": "domain",
512+
"in": "path",
513+
"required": true,
514+
"schema": {
515+
"type": "string"
516+
},
517+
"description": "The domain identifier from your `domain.mintlify.app` URL. Can be found in the top left of your dashboard."
518+
}
519+
],
520+
"requestBody": {
521+
"required": true,
522+
"content": {
523+
"application/json": {
524+
"schema": {
525+
"type": "object",
526+
"required": ["query"],
527+
"properties": {
528+
"query": {
529+
"type": "string",
530+
"description": "The search query to execute against your documentation content."
531+
},
532+
"pageSize": {
533+
"type": "number",
534+
"default": 10,
535+
"description": "Number of search results to return. Defaults to 10 if not specified."
536+
},
537+
"filter": {
538+
"type": "object",
539+
"description": "Optional filtering parameters to narrow search results.",
540+
"properties": {
541+
"version": {
542+
"type": "string",
543+
"description": "Filter results by documentation version."
544+
},
545+
"language": {
546+
"type": "string",
547+
"description": "Filter results by content language."
548+
}
549+
}
550+
}
551+
}
552+
}
553+
}
554+
}
555+
},
556+
"responses": {
557+
"200": {
558+
"description": "Search results",
559+
"content": {
560+
"application/json": {
561+
"schema": {
562+
"type": "array",
563+
"items": {
564+
"type": "object",
565+
"properties": {
566+
"content": {
567+
"type": "string",
568+
"description": "The matching content from your documentation."
569+
},
570+
"path": {
571+
"type": "string",
572+
"description": "The path or URL to the source document."
573+
},
574+
"metadata": {
575+
"type": "object",
576+
"description": "Additional metadata about the search result, including relevance scoring and other contextual information."
577+
}
578+
}
579+
}
580+
}
581+
}
582+
}
583+
}
584+
},
585+
"security": [
586+
{
587+
"bearerAuth": []
588+
}
589+
]
590+
}
501591
}
502592
},
503593
"components": {

0 commit comments

Comments
 (0)