Skip to content
Back to top
View this page
Edit this page

# Main Results

class searx.result_types._base.MainResult(template: str = 'default.html', title: str = '', content: str = '', img_src: str = '', iframe_src: str = '', audio_src: str = '', thumbnail: str = '', publishedDate: datetime | None = None, pubdate: str = '', length: timedelta | None = None, views: str = '', author: str = '', metadata: str = '', priority: Literal['', 'high', 'low']='', engines: set[str] = <factory>, open_group: bool = False, close_group: bool = False, positions: list[int] = <factory>, score: float = 0, category: str = '', *, url: str | None = None, engine: str | None = '', parsed_url: ParseResult | None = None)

  Base class of all result types displayed in area main results.

  template: str

    Name of the template used to render the result.

    By default result_templates/default.html is used.

  title: str

    Link title of the result item.

  content: str

    Extract or description of the result item

  img_src: str

    URL of a image that is displayed in the result item.

  iframe_src: str

    URL of an embedded `<iframe>` / the frame is collapsible.

  audio_src: str

    URL of an embedded `<audio controls>`.

  thumbnail: str

    URL of a thumbnail that is displayed in the result item.

  publishedDate: datetime | None

    The date on which the object was published.

  pubdate: str

    String representation of `MainResult.publishedDate`

    Deprecated: it is still partially used in the templates, but will one day be completely eliminated.

  length: timedelta | None

    Playing duration in seconds.

  views: str

    View count in humanized number format.

  author: str

    Author of the title.

  metadata: str

    Miscellaneous metadata.

  priority: Literal['', 'high', 'low']

    The priority can be set via Hostnames, for example.

  engines: set[str]

    In a merged results list, the names of the engines that found this result are listed in this field.

  normalize_result_fields()

    Normalize fields `url` and `parse_sql`.

    - If field `url` is set and field `parse_url` is unset, init `parse_url` from field `url`. The `url` field is initialized with the resulting value in `parse_url`, if `url` and `parse_url` are not equal.