curl -X POST "https://api.mielto.com/api/v1/collections/search" \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"query": "How to configure API authentication",
"collection_id": "col_123456789",
"search_type": "hybrid",
"max_results": 10
}'
import requests
response = requests.post(
"https://api.mielto.com/api/v1/collections/search",
headers={
"X-API-Key": "YOUR_API_KEY",
"Content-Type": "application/json"
},
json={
"query": "How to configure API authentication",
"collection_id": "col_123456789",
"search_type": "hybrid",
"max_results": 10
}
)
search_results = response.json()
const response = await fetch("https://api.mielto.com/api/v1/collections/search", {
method: "POST",
headers: {
"X-API-Key": "YOUR_API_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
query: "How to configure API authentication",
collection_id: "col_123456789",
search_type: "hybrid",
max_results: 10
})
});
const searchResults = await response.json();
{
"results": [
{
"content": "API authentication can be configured using either API keys or Bearer tokens. To use API keys, include the X-API-Key header in your requests...",
"score": 0.95,
"metadata": {
"document_title": "Authentication Guide",
"section": "API Keys",
"page": 1
},
"content_id": "content_123456",
"source": "authentication-guide.pdf"
},
{
"content": "When configuring authentication, ensure you store your API keys securely and never expose them in client-side code...",
"score": 0.87,
"metadata": {
"document_title": "Security Best Practices",
"section": "API Security",
"page": 3
},
"content_id": "content_789012",
"source": "security-guide.pdf"
}
],
"total_results": 2,
"query": "How to configure API authentication",
"search_type": "hybrid",
"collection_id": "col_123456789",
"execution_time_ms": 45.2
}
Search Collection
Search within collections using fulltext, semantic, or hybrid search capabilities
POST
/
api
/
v1
/
collections
/
search
curl -X POST "https://api.mielto.com/api/v1/collections/search" \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"query": "How to configure API authentication",
"collection_id": "col_123456789",
"search_type": "hybrid",
"max_results": 10
}'
import requests
response = requests.post(
"https://api.mielto.com/api/v1/collections/search",
headers={
"X-API-Key": "YOUR_API_KEY",
"Content-Type": "application/json"
},
json={
"query": "How to configure API authentication",
"collection_id": "col_123456789",
"search_type": "hybrid",
"max_results": 10
}
)
search_results = response.json()
const response = await fetch("https://api.mielto.com/api/v1/collections/search", {
method: "POST",
headers: {
"X-API-Key": "YOUR_API_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
query: "How to configure API authentication",
collection_id: "col_123456789",
search_type: "hybrid",
max_results: 10
})
});
const searchResults = await response.json();
{
"results": [
{
"content": "API authentication can be configured using either API keys or Bearer tokens. To use API keys, include the X-API-Key header in your requests...",
"score": 0.95,
"metadata": {
"document_title": "Authentication Guide",
"section": "API Keys",
"page": 1
},
"content_id": "content_123456",
"source": "authentication-guide.pdf"
},
{
"content": "When configuring authentication, ensure you store your API keys securely and never expose them in client-side code...",
"score": 0.87,
"metadata": {
"document_title": "Security Best Practices",
"section": "API Security",
"page": 3
},
"content_id": "content_789012",
"source": "security-guide.pdf"
}
],
"total_results": 2,
"query": "How to configure API authentication",
"search_type": "hybrid",
"collection_id": "col_123456789",
"execution_time_ms": 45.2
}
Search Collection
Search within a collection using knowledge search with support for different search types including fulltext, semantic, and hybrid search.Headers
string
Bearer token for authentication
string
API key for authentication (alternative to Authorization header)
string
Optional. Derived from API Key, but can be specified if you have access to multiple workspaces
Request Body
string
required
Search query string
string
required
ID of the collection to search in
string
default:"hybrid"
Type of search to perform (vector, keyword, hybrid)
integer
default:"10"
Maximum number of results to return (1-100)
object
Additional filters to apply to the search
Response
array
integer
Total number of results found
string
Original search query
string
Type of search performed
string
Collection that was searched
number
Search execution time in milliseconds
curl -X POST "https://api.mielto.com/api/v1/collections/search" \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"query": "How to configure API authentication",
"collection_id": "col_123456789",
"search_type": "hybrid",
"max_results": 10
}'
import requests
response = requests.post(
"https://api.mielto.com/api/v1/collections/search",
headers={
"X-API-Key": "YOUR_API_KEY",
"Content-Type": "application/json"
},
json={
"query": "How to configure API authentication",
"collection_id": "col_123456789",
"search_type": "hybrid",
"max_results": 10
}
)
search_results = response.json()
const response = await fetch("https://api.mielto.com/api/v1/collections/search", {
method: "POST",
headers: {
"X-API-Key": "YOUR_API_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
query: "How to configure API authentication",
collection_id: "col_123456789",
search_type: "hybrid",
max_results: 10
})
});
const searchResults = await response.json();
{
"results": [
{
"content": "API authentication can be configured using either API keys or Bearer tokens. To use API keys, include the X-API-Key header in your requests...",
"score": 0.95,
"metadata": {
"document_title": "Authentication Guide",
"section": "API Keys",
"page": 1
},
"content_id": "content_123456",
"source": "authentication-guide.pdf"
},
{
"content": "When configuring authentication, ensure you store your API keys securely and never expose them in client-side code...",
"score": 0.87,
"metadata": {
"document_title": "Security Best Practices",
"section": "API Security",
"page": 3
},
"content_id": "content_789012",
"source": "security-guide.pdf"
}
],
"total_results": 2,
"query": "How to configure API authentication",
"search_type": "hybrid",
"collection_id": "col_123456789",
"execution_time_ms": 45.2
}
Search types:
- vector: Semantic similarity search using embeddings
- keyword: Traditional keyword-based search
- hybrid: Combination of vector and keyword search (recommended)