# Search Articles

> Source: https://docs.recombee.com/recipes/news/search-articles

> For the complete documentation index, see [llms.txt](/llms.txt).

**Table of contents**

* [Introduction](#introduction)
* [Scenario Setup](#scenario-setup)
* [Logic](#logic)
* [Requesting Search Results](#requesting-search-results)

# Search Articles

![](/img/recipes/news/search-articles.png) 

## Introduction

For news and publishing sites, search quality depends on more than matching the query. A reader searching for _"elections"_, _"climate"_, or _"football"_ often expects recent articles, currently popular stories, and content that fits their reading habits.

Recombee’s personalized news search combines the search query with article freshness, trendingness, and user preferences to create a more engaging discovery experience.

## Scenario Setup

In the Recombee Admin UI, navigate to the **[Scenarios](/scenarios)** section and choose **Create Scenario**.

1. Enter a **Scenario ID**, such as _"search"_
2. Choose **Recommendation type** \- _[Search Items](/api#search-items)_

![Admin UI - Scenario Setup](/img/recipes/news/search-articles-create-scenario.png)

## Logic

The [Logic](/recommendation_logics) defines the behavior of the recommendation engine.

* Choose the **[news:search](/recommendation_logics#news-search)** logic type from the **News** models to get smart full-text search optimized for searching news articles.

This Logic lets you balance multiple ranking signals:

**Freshness Impact**

* `freshnessWeight` controls how much recently published articles are prioritized.
* `freshnessDateProperty` specifies the item property that stores the article publication date.

For news sites, we recommend setting `freshnessDateProperty` to the property that contains the article publication date, such as `publishedAt` or `datePublished`.

**Trendingness Impact**

* `trendingnessWeight` controls how much currently trending articles affect the ranking.
* `trendingnessPeriod` defines the time window used to calculate trendingness.

**Personalization Impact**

* `personalizationWeight` controls how much the results are personalized for the individual reader.

**Other Parameters**

* `allowEmptyQueryFallback` controls what happens when the search query is empty. When enabled, Recombee can return personalized recommendations instead of an empty result list.

![Admin UI - Logic](/img/recipes/news/search-articles-logic.png)

## Requesting Search Results

There are three ways to get search results.

1. **[No-Code Widget](/no-code-widgets)** \- create a [Quick Search No-Code Widget](/no-code-widgets#html-widget-full-text-search) using the **visual editor in the Admin UI**.
2. **[Widget SDKs](/widget-sdks)** \- use the Quick Search SDK for [vanilla JavaScript](/widget-sdks/quick-search-widget-js) or [React](/widget-sdks/quick-search-widget-react) to create a search widget with the design of your choice.
3. **[API SDK](/api_clients)** \- request the [Search Items endpoint](/api#search-items) of the Recombee API using an SDK of your choice.

For more information, navigate to the Integration tab of the Scenario in the Admin UI.

![Quick Search No-Code Widget](/img/recipes/news/search-articles-no-code-widget.png)

Quick Search No-Code Widget