Load Engines

This module implements the engine loader.

Load and initialize the engines, see load_engines() and register engine_shortcuts.


load_engines( settings['engines'] )
class searx.engines.Engine[source]

This class is currently never initialized and only used for type hinting.

searx.engines.engine_shortcuts = {'1337x': '1337x', '1x': '1x', 'ai': 'archive is', 'al': 'arch linux wiki', 'alx': 'alexandria', 'apkm': 'apk mirror', 'arc': 'artic', 'arx': 'arxiv', 'bb': 'bitbucket', 'bc': 'bandcamp', 'bi': 'bing', 'bii': 'bing images', 'bin': 'bing news', 'biv': 'bing videos', 'brave': 'brave', 'bt': 'btdigg', 'c3tv': 'ccc-tv', 'cb': 'codeberg', 'cc': 'currency', 'cl': 'curlie', 'cr': 'crossref', 'da': 'deviantart', 'dc': 'dictzone', 'ddd': 'ddg definitions', 'ddg': 'duckduckgo', 'ddi': 'duckduckgo images', 'def': 'wordnik', 'dh': 'docker hub', 'dm': 'dailymotion', 'du': 'duden', 'dz': 'deezer', 'em': 'emojipedia', 'et': 'etymonline', 'ew': 'erowid', 'fd': 'fdroid', 'fl': 'flickr', 'frk': 'frinkiac', 'frl': 'framalibre', 'fsd': 'free software directory', 'gb': 'gigablast', 'ge': 'gentoo', 'gen': 'genius', 'gh': 'github', 'gl': 'gitlab', 'go': 'google', 'goi': 'google images', 'gon': 'google news', 'gos': 'google scholar', 'gov': 'google videos', 'gpa': 'google play apps', 'gpm': 'google play movies', 'gpod': 'gpodder', 'habr': 'habrahabr', 'ho': 'hoogle', 'imdb': 'imdb', 'in': 'ina', 'iv': 'invidious', 'js': 'jisho', 'kc': 'kickass', 'lg': 'library genesis', 'lo': 'lobste.rs', 'loc': 'library of congress', 'lrs': 'lib.rs', 'lv': 'lingva', 'lyrics': 'azlyrics', 'man': 'mankier', 'mar': 'marginalia', 'mc': 'mixcloud', 'mjk': 'mojeek', 'mvw': 'mediathekviewweb', 'npm': 'npm', 'nt': 'nyaa', 'nvr': 'naver', 'oad': 'openairedatasets', 'oap': 'openairepublications', 'opv': 'openverse', 'or': 'openrepos', 'osm': 'openstreetmap', 'pack': 'packagist', 'pd': 'pub.dev', 'pdb': 'pdbe', 'ph': 'photon', 'ptb': 'peertube', 'pts': 'petalsearch', 'ptsi': 'petalsearch images', 'ptsn': 'petalsearch news', 'pub': 'pubmed', 'pypi': 'pypi', 'qw': 'qwant', 'qwi': 'qwant images', 'qwn': 'qwant news', 'qwv': 'qwant videos', 'rbg': 'rubygems', 're': 'reddit', 'ru': 'rumble', 'sc': 'soundcloud', 'scc': 'searchcode code', 'se': 'semantic scholar', 'sep': 'sepiasearch', 'sjp': 'sjp.pwn', 'solid': 'solidtorrents', 'sp': 'startpage', 'srht': 'sourcehut', 'st': 'stackoverflow', 'su': 'superuser', 'szn': 'seznam', 'tin': 'tineye', 'tl': 'mymemory translated', 'tpb': 'piratebay', 'tt': 'tokyotoshokan', 'ubuntu': 'askubuntu', 'us': 'unsplash', 'vm': 'vimeo', 'wa': 'wolframalpha', 'wb': 'wikibooks', 'wd': 'wikidata', 'wib': 'wiby', 'wkmn': 'wikimini', 'wn': 'wikinews', 'woxi': 'woxikon.de synonyme', 'wp': 'wikipedia', 'wq': 'wikiquote', 'ws': 'wikisource', 'wt': 'wiktionary', 'wv': 'wikiversity', 'wy': 'wikivoyage', 'yep': 'yep', 'yh': 'yahoo', 'yhn': 'yahoo news', 'yt': 'youtube', 'zlib': 'z-library'}

Simple map of registered shortcuts to name of the engine (or None).

engine_shortcuts[engine.shortcut] = engine.name

An attribute is required when its name doesn’t start with _ (underline). Required attributes must not be None.

searx.engines.load_engine(engine_data: dict) Optional[Engine][source]

Load engine from engine_data.


engine_data (dict) – Attributes from YAML settings:engines/<engine>


initialized namespace of the <engine>.

  1. create a namespace and load module of the <engine>

  2. update namespace with the defaults from ENGINE_DEFAULT_ARGS

  3. update namespace with values from engine_data

If engine is active, return namespace of the engine, otherwise return None.

This function also returns None if initialization of the namespace fails for one of the following reasons:


usage: engine_list = settings['engines']

searx.engines.using_tor_proxy(engine: Engine)[source]

Return True if the engine configuration declares to use Tor.