GET /knowledge/search
Updated Oct 1, 20261 minute read
Search documents
Titles matched against the words typed, most relevant first, up to 30. A blank query answers with nothing.
Part of Knowledge.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
q | query | string | Yes | |
source | query | "upload" | "manual" | "github" | "notion" | "web" | "learned" | No |
Responses
| Status | Description |
|---|---|
200 | The matches. |
401 | The bearer token is missing, revoked, or expired. |
429 | Too many requests. Wait the seconds in Retry-After. Limits depend on the plan. See rate limits. |
200 body
| Field | Type | Required | Description |
|---|---|---|---|
documents | object[] | No | |
documents[].id | string | No | |
documents[].title | string | No | |
documents[].source | "upload" | "manual" | "github" | "notion" | "web" | "learned" | No | |
documents[].status | "indexing" | "ready" | "error" | No | |
documents[].error | any | No | |
documents[].origin | any | No | A repository path, a filename, or a page URL, when it came from one. |
documents[].url | any | No | The published page a customer can open, when the document has one. Null for words with no public home, which the agent never links. |
documents[].folderId | any | No | |
documents[].order | number | No | |
documents[].updatedAt | integer | No |
Example request
curl https://api.median.sh/v1/knowledge/search?q=YOUR_Q \
-H "Authorization: Bearer $BEARER_AUTH"