provider user_interviews POST /api/projects/{project_id}/user_interviews/search/
@utdk/posthog /api/projects/{project_id}/user_interviews/search/
Search interview responses by semantic similarity
Embed `query` with the same model used to index interview transcripts and summaries, then return the top matches by cosine distance. Each match is a single (interview, document_type) pair — an interview can appear up to twice if both its transcript and summary score above other interviews. Useful for surfacing relevant interview snippets in natural language, without exact keyword matches.
project_id path required
Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.
string

Try it

Authentication
Configure credentials for PostHog API
userInterviewsSearchCreate
POST/api/projects/{project_id}/user_interviews/search/
Embed `query` with the same model used to index interview transcripts and summaries, then return the top matches by cosine distance. Each match is a single (interview, document_type) pair — an interview can appear up to twice if both its transcript and summary score above other interviews. Useful for surfacing relevant interview snippets in natural language, without exact keyword matches.

Parameters

required

Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.

Input

required

Natural-language query to match semantically against interview transcripts and summaries.

Which document types to search across. Omit to default to both `transcript` and `summary`. Pass a non-empty subset to restrict the search.

Optional. Restrict results to interviews belonging to a specific UserInterviewTopic.

Optional. Restrict results to interviews carrying any of these classifications (OR). Combines with `topic_id` as AND.

Maximum number of matches to return (1-50). Defaults to 10. Two matches per interview are possible — one for the transcript, one for the summary.

Configure credentials above to enable sending.

Code snippet
Updates live as you fill in the form above.

TypeScript

import posthog from '@utdk/posthog';

await posthog.userInterviewsSearchCreate()