Skip to main content

RecommendRequest

Request object for the search/recommendation feature.

Properties

PropertyRequiredTypeDescription
articleFalseArticleFull article used as the target for recommendations. Mutually exclusive with textSnippet.
textSnippetFalseStringShort plain-text snippet used as the target. Mutually exclusive with article.
languageFalseStringLanguage of textSnippet as an ISO 639-1 two-letter code.
modeTrueStringRecommendation mode, e.g., similarity.
modeParamsFalseMapMode-specific parameters.
minScoreFalseFloatMinimum similarity score (0.0–1.0, default 0.5).
maxArticlesFalseIntegerMaximum number of recommended articles (1–100, default 10).
articleFiltersFalseMapMetadata filters restricting the search scope. See this guide for details.
returnDuplicatesFalseBooleanWhether to return ArticleDuplicate objects.
returnFieldsFalseList[String]Article fields to return in the response. id and score are always included.

Exactly one of article or textSnippet must be provided.

Currently, only one recommendation mode is supported: similarity — Performs a semantic search based on content similarity.