Search Documents
curl --request POST \
--url https://{tenant_id}.api.useago.com/api/v1/documents/search \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"query": "<string>",
"filters": {
"document_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"page_id": "<string>",
"title": "<string>",
"status": "<string>",
"default_language": "<string>",
"doc_type_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"metadata": {}
},
"limit": 5,
"include_content": false
}
'import requests
url = "https://{tenant_id}.api.useago.com/api/v1/documents/search"
payload = {
"query": "<string>",
"filters": {
"document_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"page_id": "<string>",
"title": "<string>",
"status": "<string>",
"default_language": "<string>",
"doc_type_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"metadata": {}
},
"limit": 5,
"include_content": False
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
query: '<string>',
filters: {
document_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
source_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
page_id: '<string>',
title: '<string>',
status: '<string>',
default_language: '<string>',
doc_type_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
metadata: {}
},
limit: 5,
include_content: false
})
};
fetch('https://{tenant_id}.api.useago.com/api/v1/documents/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"mode": "semantic",
"data": [
{
"id": "<string>",
"title": "<string>",
"is_internal": true,
"excerpt": "<string>",
"object": "document",
"page_id": "<string>",
"status": "<string>",
"public_display": true,
"default_language": "en",
"source_id": "<string>",
"source_name": "<string>",
"parent_id": "<string>",
"position": 0,
"created_at": "<string>",
"updated_at": "<string>",
"metadata": "<unknown>",
"doc_type_id": "<string>",
"url": "<string>",
"score": 123,
"content": "<string>"
}
],
"has_more": true,
"object": "search_result"
}Documents
Search Documents
Search by semantic query, exact document attributes, or both.
POST
/
api
/
v1
/
documents
/
search
Search Documents
curl --request POST \
--url https://{tenant_id}.api.useago.com/api/v1/documents/search \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"query": "<string>",
"filters": {
"document_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"page_id": "<string>",
"title": "<string>",
"status": "<string>",
"default_language": "<string>",
"doc_type_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"metadata": {}
},
"limit": 5,
"include_content": false
}
'import requests
url = "https://{tenant_id}.api.useago.com/api/v1/documents/search"
payload = {
"query": "<string>",
"filters": {
"document_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"page_id": "<string>",
"title": "<string>",
"status": "<string>",
"default_language": "<string>",
"doc_type_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"metadata": {}
},
"limit": 5,
"include_content": False
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
query: '<string>',
filters: {
document_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
source_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
page_id: '<string>',
title: '<string>',
status: '<string>',
default_language: '<string>',
doc_type_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
metadata: {}
},
limit: 5,
include_content: false
})
};
fetch('https://{tenant_id}.api.useago.com/api/v1/documents/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"mode": "semantic",
"data": [
{
"id": "<string>",
"title": "<string>",
"is_internal": true,
"excerpt": "<string>",
"object": "document",
"page_id": "<string>",
"status": "<string>",
"public_display": true,
"default_language": "en",
"source_id": "<string>",
"source_name": "<string>",
"parent_id": "<string>",
"position": 0,
"created_at": "<string>",
"updated_at": "<string>",
"metadata": "<unknown>",
"doc_type_id": "<string>",
"url": "<string>",
"score": 123,
"content": "<string>"
}
],
"has_more": true,
"object": "search_result"
}Authorizations
Body
application/json
