Search API
Perform semantic search across your content library. Ideal for building custom search UIs or integrating search into existing product flows.
Search content
Performs semantic search across your ingested content. Returns ranked results with relevance scores.
POST/widget/search
Request body
querystringrequired
The search query (semantic search).
section_typesarray
Filter by section types.
dosingside_effectspatient_supportstoragefaq
limitinteger
Number of results (1-20, default 5).
Response
resultsarray
Array of matching content items.
results[].relevance_scorefloat
Similarity score (0-1, higher is better).
results[].video_idstring | null
YouTube video ID for video content.
results[].timestamp_startinteger | null
Video timestamp in seconds.
Request
curl -X POST https://api.isomera.ai/api/v1/widget/search \
-H "Content-Type: application/json" \
-H "X-API-Key: wk_your_api_key" \
-d '{
"query": "how to inject",
"section_types": ["dosing"],
"limit": 5
}'Response
{
"results": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"title": "How to Use the Injection Pen",
"content": "Step-by-step guide for using the pen: 1. PREPARE: Wash your hands thoroughly...",
"section_type": "dosing",
"source_type": "webpage",
"source_url": "https://example.com/dosing",
"relevance_score": 0.8923
},
{
"id": "550e8400-e29b-41d4-a716-446655440001",
"title": "Injection Tutorial",
"content": "Learn how to properly administer your injection...",
"section_type": "dosing",
"source_type": "youtube",
"source_url": "https://youtube.com/watch?v=xyz",
"relevance_score": 0.8456,
"video_id": "xyz",
"timestamp_start": 45,
"timestamp_display": "0:45"
}
],
"query": "how to inject",
"total_results": 2
}Get suggestions
Returns autocomplete suggestions based on partial queries. Use for search-as-you-type experiences.
GET/widget/suggestions
Query parameters
qstringrequired
Partial search query (min 2 characters).
limitinteger
Number of suggestions (default 5).
Request
curl "https://api.isomera.ai/api/v1/widget/suggestions?q=side%20eff" \
-H "X-API-Key: wk_your_api_key"Response
{
"suggestions": [
"side effects",
"side effects management",
"side effects nausea",
"side effects diarrhea"
]
}