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 }'
Copy
{ "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
Copy
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 }'
Copy
{ "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}
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 }'
Copy
{ "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)