Answer Results¶
The area answers is an area in which additional information can be displayed.
Typification of the answer results. Results of this type are rendered in the answers.html template.
- class searx.result_types.answer.BaseAnswer(*, url: str | None = None, engine: str | None = '', parsed_url: ParseResult | None = None)[source]¶
 Bases:
ResultBase class of all answer types. It is not intended to build instances of this class (aka abstract).
- class searx.result_types.answer.Answer(*, url: str | None = None, engine: str | None = '', parsed_url: ParseResult | None = None, template: str = 'answer/legacy.html', answer: str)[source]¶
 Bases:
BaseAnswerSimple answer type where the answer is a simple string with an optional
url fieldfield to link a resource (article, map, ..) related to the answer.
- class searx.result_types.answer.Translations(*, url: str | None = None, engine: str | None = '', parsed_url: ParseResult | None = None, template: str = 'answer/translations.html', translations: list[Item])[source]¶
 Bases:
BaseAnswerAnswer type with a list of translations.
The items in the list of
Translations.translationsare of typeTranslations.Item:def response(resp): results = [] ... foo_1 = Translations.Item( text="foobar", synonyms=["bar", "foo"], examples=["foo and bar are placeholders"], ) foo_url="https://www.deepl.com/de/translator#en/de/foo" ... Translations(results=results, translations=[foo], url=foo_url)
- template: str¶
 The template in answer/translations.html
- translations: list[Translations.Item]¶
 List of translations.
- class Item(*, text: str, transliteration: str = '', examples: list[str] = <factory>, definitions: list[str] = <factory>, synonyms: list[str] = <factory>)[source]¶
 Bases:
StructA single element of the translations / a translation. A translation consists of at least a mandatory
textproperty (the translation) , optional properties such as definitions, synonyms and examples are possible.- transliteration: str¶
 Transliteration of the requested translation.
- class searx.result_types.answer.WeatherAnswer(*, url: str | None = None, engine: str | None = '', parsed_url: ~urllib.parse.ParseResult | None = None, template: str = 'answer/weather.html', current: ~searx.result_types.answer.WeatherAnswer.Item, forecasts: list[~searx.result_types.answer.WeatherAnswer.Item] = <factory>, service: str = '')[source]¶
 Bases:
BaseAnswerAnswer type for weather data.
- template: str¶
 The template is located at answer/weather.html
- current: WeatherAnswer.Item¶
 Current weather at
location.
- forecasts: list[WeatherAnswer.Item]¶
 Weather forecasts for
location.
- class Item(*, location: GeoLocation, temperature: Temperature, condition: Literal['clear sky', 'partly cloudy', 'cloudy', 'fair', 'fog', 'light rain and thunder', 'light rain showers and thunder', 'light rain showers', 'light rain', 'rain and thunder', 'rain showers and thunder', 'rain showers', 'rain', 'heavy rain and thunder', 'heavy rain showers and thunder', 'heavy rain showers', 'heavy rain', 'light sleet and thunder', 'light sleet showers and thunder', 'light sleet showers', 'light sleet', 'sleet and thunder', 'sleet showers and thunder', 'sleet showers', 'sleet', 'heavy sleet and thunder', 'heavy sleet showers and thunder', 'heavy sleet showers', 'heavy sleet', 'light snow and thunder', 'light snow showers and thunder', 'light snow showers', 'light snow', 'snow and thunder', 'snow showers and thunder', 'snow showers', 'snow', 'heavy snow and thunder', 'heavy snow showers and thunder', 'heavy snow showers', 'heavy snow'], datetime: DateTime | None = None, summary: str | None = None, feels_like: Temperature | None = None, pressure: Pressure | None = None, humidity: RelativeHumidity | None = None, wind_from: Compass, wind_speed: WindSpeed | None = None, cloud_cover: int | None = None)[source]¶
 Bases:
StructWeather parameters valid for a specific point in time.
- location: GeoLocation¶
 The geo-location the weather data is from (e.g. Berlin, Germany).
- temperature: Temperature¶
 Air temperature at 2m above the ground.
- condition: Literal['clear sky', 'partly cloudy', 'cloudy', 'fair', 'fog', 'light rain and thunder', 'light rain showers and thunder', 'light rain showers', 'light rain', 'rain and thunder', 'rain showers and thunder', 'rain showers', 'rain', 'heavy rain and thunder', 'heavy rain showers and thunder', 'heavy rain showers', 'heavy rain', 'light sleet and thunder', 'light sleet showers and thunder', 'light sleet showers', 'light sleet', 'sleet and thunder', 'sleet showers and thunder', 'sleet showers', 'sleet', 'heavy sleet and thunder', 'heavy sleet showers and thunder', 'heavy sleet showers', 'heavy sleet', 'light snow and thunder', 'light snow showers and thunder', 'light snow showers', 'light snow', 'snow and thunder', 'snow showers and thunder', 'snow showers', 'snow', 'heavy snow and thunder', 'heavy snow showers and thunder', 'heavy snow showers', 'heavy snow']¶
 Standardized designations that summarize the weather situation (e.g.
light sleet showers and thunder).
- summary: str | None¶
 One-liner about the weather forecast / current weather conditions. If unset, a summary is build up from temperature and current weather conditions.
- feels_like: Temperature | None¶
 Apparent temperature, the temperature equivalent perceived by humans, caused by the combined effects of air temperature, relative humidity and wind speed. The measure is most commonly applied to the perceived outdoor temperature.
- humidity: RelativeHumidity | None¶
 Amount of relative humidity in the air at 2m above the ground. The unit is
%, e.g. 60%)
- class searx.result_types.answer.AnswerSet[source]¶
 Bases:
objectAggregator for
BaseAnsweritems in a result container.