Search documents
Titles matched against the words typed, most relevant first, up to 30. A blank query answers with nothing.
GET
/knowledge/searchAuthorization
AuthorizationBearer token · headerrequired`MEDIAN_KEY` from Settings under API, or an MCP OAuth access token. A key acts as the organization; a token acts as the person who approved it.
Query parameters
qstringrequiredsourcestringAllowed:
uploadmanualgithubnotionweblearnedResponses
200The matches.
documentsKnowledgeDoc[]Show propertiesHide properties
Array of
KnowledgeDocidstringtitlestringsourcestringAllowed:
uploadmanualgithubnotionweblearnedstatusstringAllowed:
indexingreadyerrorerrorstring | nulloriginstring | nullA repository path, a filename, or a page URL, when it came from one.
urlstring | nullThe published page a customer can open, when the document has one. Null for words with no public home, which the agent never links.
folderIdstring | nullordernumberupdatedAtinteger401The bearer token is missing, revoked, or expired.
errorobjectShow propertiesHide properties
codestringmessagestring429Too many requests. Wait the seconds in `Retry-After`. Limits depend on the plan. See [rate limits](/api/errors-and-limits#rate-limits).
errorobjectShow propertiesHide properties
codestringmessagestringRequest
curl -X GET "https://api.median.sh/v1/knowledge/search?q=string" \
-H "Authorization: Bearer YOUR_TOKEN"const response = await fetch("https://api.median.sh/v1/knowledge/search?q=string", {
method: "GET",
headers: {
"Authorization": "Bearer YOUR_TOKEN"
}
});Response
{
"documents": [
{
"id": "string",
"title": "string",
"source": "upload",
"status": "indexing",
"error": "string",
"origin": "string",
"url": "string",
"folderId": "string",
"order": 0,
"updatedAt": 0
}
]
}{
"error": {
"code": "string",
"message": "string"
}
}{
"error": {
"code": "string",
"message": "string"
}
}