---
title: Search document
slug: test-archbee/search-document
docTags: 
createdAt: 2026-02-24T08:46:16.000Z
---

\{
"id": "6-2RmwtaGhQu-CUr8X1lk",
"type": "api-oas-v2",
"data": \{
"method": "POST",
"url": "[https://api.archbee.com/api/public-api/docs/search](https://api.archbee.com/api/public-api/docs/search)",
"servers": \[
\{
"url": "[https://api.archbee.com/api/public-api/docs/search](https://api.archbee.com/api/public-api/docs/search)",
"description": "Archbee API Server"
}
],
"name": "Search document",
"description": "Search Archbee documents in docSpace. Can perform one of the 3 types of search:\n

:::Iframe{code="<ol>"}

:::

\n

:::Iframe{code="<li>"}

:::

****ai-chat to return ai generative answer accompanied by source docs;\n

:::Iframe{code="<li>"}

:::

****ai-retrieval to return just similar docs with the query;\n

:::Iframe{code="<li>"}

:::

****words to perform normal search aka. "word-based"; use empty query to return all docs\n

:::Iframe{code="<li>"}

:::

****single-doc to return document info by id\n",
"contentType": "application/json",
"request": \{
"pathParameters": \[],
"headerParameters": \[
\{
"kind": "required",
"name": "Content-Type",
"type": "string",
"example": "application/json",
"description": ""
}
],
"queryParameters": \[],
"bodyDataParameters": \[
\{
"kind": "required",
"name": "body",
"type": "object",
"description": "",
"schema": \[
\{
"name": "query",
"kind": "required",
"type": "string",
"description": "Filter text, question or document title",
"example": ""
},
\{
"name": "searchOnlyTitle",
"kind": "optional",
"type": "boolean",
"description": "OPTIONAL. Search only by title",
"example": ""
},
\{
"name": "persistSearch",
"kind": "optional",
"type": "boolean",
"description": "OPTIONAL. Wether to keep a SearchSession in our database and return its id.",
"example": ""
},
\{
"name": "searchSessionId",
"kind": "optional",
"type": "string",
"description": "OPTIONAL. id for the SearchSession object to update. More useful for AI chat.",
"example": ""
},
\{
"name": "docId",
"kind": "optional",
"type": "string",
"description": "OPTIONAL. Return only one document with this id, if there is one",
"example": "21-character\_\_string0"
},
\{
"name": "dataTextFormat",
"kind": "optional",
"type": "string\<markdown | html>",
"description": "OPTIONAL. Return documents with dataText in this format",
"example": ""
},
\{
"name": "parentDocId",
"kind": "optional",
"type": "string",
"description": "OPTIONAL. Return only child documents of the doc with this id, if there are any. Can be "null" for retrieving the root docs.",
"example": "21-character\_\_string0"
},
\{
"name": "type",
"kind": "optional",
"type": "string\<words | ai-chat | ai-retrieval>",
"description": "OPTIONAL. which type of search to use; default is word-based",
"example": ""
}
],
"isExpanded": true
}
],
"formDataParameters": \[],
"oAuthParameters": \[
\{
"id": "bearerAuth",
"name": "bearerAuth",
"kind": "optional",
"type": "http",
"description": "Requires the&#x20;

:::Iframe{code="<code>"}

:::

Authorization header in the form&#x20;

:::Iframe{code="<code>"}

:::

Authorization: Bearer \{base64(docSpaceId\~apiKey)} Where the token is base64 encoding of docSpaceId, tilde, and apiKey.",
"scheme": "bearer"
}
]
},
"responses": \[
\{
"statusCode": "200",
"description": "Process status",
"jsonExample": "",
"isExpanded": true,
"schema": \[
\{
"kind": "optional",
"type": "object",
"description": "Process status",
"schema": \[
\{
"name": "status",
"kind": "optional",
"type": "string

:::Iframe{code="<OK>"}

:::

",
"description": "Response Status",
"example": ""
},
\{
"name": "data",
"kind": "optional",
"type": "object",
"description": "Response Data",
"example": "",
"schema": \[
\{
"name": "searchSessionId",
"kind": "optional",
"type": "string",
"description": "Search session id, can be used as input for next search calls.",
"example": ""
},
\{
"name": "docs",
"kind": "optional",
"type": "array",
"description": "Array of Doc responses",
"modelRef": "#/components/schemas/DocResponse",
"customType": "DocResponse\[]",
"schema": \[
\{
"name": "id",
"kind": "optional",
"type": "string",
"description": "Archbee id, used for private access",
"example": ""
},
\{
"name": "name",
"kind": "optional",
"type": "string",
"description": "name of document",
"example": ""
},
\{
"name": "urlKey",
"kind": "optional",
"type": "string",
"description": "url of public document, used for public access (if published)",
"example": ""
},
\{
"name": "urlAlias",
"kind": "optional",
"type": "string",
"description": "In case you are migrating from another platform and you’d like to get a redirecting url to your current url, you can use this url path.",
"example": ""
},
\{
"name": "hidden",
"kind": "optional",
"type": "boolean",
"description": "indicates if document is hidden",
"example": ""
},
\{
"name": "privacy",
"kind": "optional",
"type": "string\<private | shared with team | public-via-link | public>",
"description": "describes how to access the document via public url (if published)",
"example": ""
},
\{
"name": "highlight",
"kind": "optional",
"type": "object",
"description": "text from document, similar with query (word-based search only)",
"example": "",
"schema": \[]
}
]
}
]
}
],
"isExpanded": true
}
]
},
\{
"statusCode": "400",
"description": "Invalid request",
"jsonExample": "",
"isExpanded": true,
"schema": \[
\{
"kind": "optional",
"type": "object",
"description": "",
"customType": "Response400",
"schema": \[
\{
"name": "status",
"kind": "optional",
"type": "string\<OK | Not OK>",
"description": "Response Status",
"example": "Not OK"
},
\{
"name": "messages",
"kind": "optional",
"type": "array",
"description": "Array of messages",
"example": "\["Some error message"]",
"itemType": "string",
"customType": "string\[]",
"itemExample": "Some error message",
"itemDefault": ""
}
],
"modelRef": "#/components/schemas/Response400",
"isExpanded": true
}
]
}
],
"hasXCodeSamples": false,
"examples": \{
"languages": \[
\{
"id": "E9cbTZHNyNmKsN4Zr9TRf",
"language": "curl",
"label": "cURL",
"code": "curl --request POST \\\n     --url [https://api.archbee.com/api/public-api/docs/search](https://api.archbee.com/api/public-api/docs/search) \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '\{\n     "query": ""\n     }'"
},
\{
"id": "\_kXGR4vvWm1-2DA3vYbOq",
"language": "javascript",
"label": "javascript",
"code": "var myHeaders = new Headers();\nmyHeaders.append("accept", "application/json");\nmyHeaders.append("content-type", "application/json");\n\nvar raw = JSON.stringify(\{\n   "query": ""\n});\n\nvar requestOptions = \{\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch("[https://api.archbee.com/api/public-api/docs/search](https://api.archbee.com/api/public-api/docs/search)", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
},
\{
"id": "3xZwzuvtgjR4M8v2tn2KU",
"language": "ruby",
"label": "Ruby",
"code": "require "uri"\nrequire "json"\nrequire "net/http"\n\nurl = URI("[https://api.archbee.com/api/public-api/docs/search")\n\nhttps](https://api.archbee.com/api/public-api/docs/search"\)\n\nhttps) = Net\::HTTP.new(url.host, url.port)\nhttps.use\_ssl = true\n\nrequest = Net\::HTTP\::Post.new(url)\nrequest\["accept"] = "application/json"\nrequest\["content-type"] = "application/json"\nrequest.body = JSON.dump(\{\n   "query": ""\n})\n\nresponse = https.request(request)\nputs response.read\_body\n"
},
\{
"id": "HcfH-Kh8yylfJ374Io5q-",
"language": "python",
"label": "Python",
"code": "import requests\nimport json\n\nurl = "[https://api.archbee.com/api/public-api/docs/search"\n\npayload](https://api.archbee.com/api/public-api/docs/search"\n\npayload) = json.dumps(\{\n   "query": ""\n})\nheaders = \{\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request("POST", url, headers=headers, data=payload)\n\nprint(response.text)\n"
}
],
"selectedLanguageId": "E9cbTZHNyNmKsN4Zr9TRf"
},
"results": \{
"languages": \[
\{
"id": "e7kk2cTUMuPv6qFHhC2PE",
"language": "200",
"code": "// Process status\n\{\n  "status": "",\n  "data": \{\n    "searchSessionId": "",\n    "docs": \[\n      \{\n        "id": "",\n        "name": "",\n        "urlKey": "",\n        "urlAlias": "",\n        "hidden": false,\n        "privacy": "",\n        "highlight": \{}\n      }\n    ]\n  }\n}"
},
\{
"id": "Uw3DL-LZsw9qqo97SN0s7",
"language": "400",
"code": "// Invalid request\n\{\n  "status": "Not OK",\n  "messages": \[\n    "Some error message"\n  ]\n}"
}
],
"selectedLanguageId": "e7kk2cTUMuPv6qFHhC2PE"
}
},
"children": \[
\{
"text": ""
}
]
}





























