Semantic search over feedback records
client.feedbackRecords.search.performSemanticSearch(SearchPerformSemanticSearchParams { query, tenant_id, cursor, 2 more } params, RequestOptionsoptions?): SearchPerformSemanticSearchResponse { data, limit, next_cursor }
POST/v1/feedback-records/search/semantic
Embeds the search query and returns feedback record IDs with similarity scores (cosine, 0..1). Only available when embeddings are configured (EMBEDDING_PROVIDER and EMBEDDING_MODEL set). Supported providers: openai, google (Gemini Developer API / Google AI Studio), google-gemini (Gemini Enterprise Agent Platform API). When embeddings are disabled, this endpoint returns 503 Service Unavailable. Request body must include query and tenant_id (required for tenant isolation).
Parameters
Returns
Semantic search over feedback records
import FormbricksHub from '@formbricks/hub';
const client = new FormbricksHub({
apiKey: process.env['HUB_API_KEY'], // This is the default and can be omitted
});
const response = await client.feedbackRecords.search.performSemanticSearch({
query: 'What do users think about login speed?',
tenant_id: 'org-123',
});
console.log(response.data);{
"data": [
{
"feedback_record_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"field_label": "field_label",
"score": 0,
"value_text": "value_text"
}
],
"limit": 0,
"next_cursor": "eyJkIjowLjEsImkiOiIwMThlMTIzNC01Njc4LTlhYmMtZGVmMC0xMTExMTExMTExMTEifQ=="
}Returns Examples
{
"data": [
{
"feedback_record_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"field_label": "field_label",
"score": 0,
"value_text": "value_text"
}
],
"limit": 0,
"next_cursor": "eyJkIjowLjEsImkiOiIwMThlMTIzNC01Njc4LTlhYmMtZGVmMC0xMTExMTExMTExMTEifQ=="
}