Overview
GET
/search/documentssearchFull-text search the caller's document blocks
List documents.
Auth: bearerAuth — calls run as the authenticated user.
Parameters
- qquerystring
- limitquery · optionalinteger
Responses
200
Matching document blocks (ranked) with a plain-text snippet
- resultsSearchDocumentResult[]
- limitinteger
- hasMoreboolean
Example
{
"results": [
{
"blockId": "string",
"documentId": "string",
"blockType": "string",
"position": "string",
"snippet": "string",
"rank": 0
}
],
"limit": 0,
"hasMore": true
}400
Error
- erroroptionalobject
Example
{
"error": {
"message": "string",
"code": "string"
}
}401
Error
- erroroptionalobject
Example
{
"error": {
"message": "string",
"code": "string"
}
}Code examples
cURL
curl -X GET "https://api.agenticdeveloperhub.com/search/documents" \
-H "Authorization: Bearer YOUR_TOKEN"JavaScript
const res = await fetch("https://api.agenticdeveloperhub.com/search/documents", {
method: "GET",
headers: {
"Authorization": "Bearer YOUR_TOKEN"
},
});
const data = await res.json();