<!DOCTYPE html>
< html lang = "en" data-content_root = "../../../" >
< head >
< meta charset = "utf-8" / >
< meta name = "viewport" content = "width=device-width, initial-scale=1.0" / >
< meta name = "viewport" content = "width=device-width, initial-scale=1" >
< title > Demo Online Engine — SearXNG Documentation (2025.2.9+a1e2b2546)< / title >
< link rel = "stylesheet" type = "text/css" href = "../../../_static/pygments.css?v=6625fa76" / >
< link rel = "stylesheet" type = "text/css" href = "../../../_static/searxng.css?v=52e4ff28" / >
< script src = "../../../_static/documentation_options.js?v=09da0b18" > < / script >
< script src = "../../../_static/doctools.js?v=9a2dae69" > < / script >
< script src = "../../../_static/sphinx_highlight.js?v=dc90522c" > < / script >
< script data-project = "searxng" data-version = "2025.2.9+a1e2b2546" src = "../../../_static/describe_version.js?v=fa7f30d0" > < / script >
< link rel = "index" title = "Index" href = "../../../genindex.html" / >
< link rel = "search" title = "Search" href = "../../../search.html" / >
< link rel = "next" title = "XPath Engine" href = "../xpath.html" / >
< link rel = "prev" title = "Engine Overview" href = "../engine_overview.html" / >
< / head > < body >
< div class = "related" role = "navigation" aria-label = "Related" >
< h3 > Navigation< / h3 >
< ul >
< li class = "right" style = "margin-right: 10px" >
< a href = "../../../genindex.html" title = "General Index"
accesskey = "I" > index< / a > < / li >
< li class = "right" >
< a href = "../../../py-modindex.html" title = "Python Module Index"
> modules< / a > |< / li >
< li class = "right" >
< a href = "../xpath.html" title = "XPath Engine"
accesskey = "N" > next< / a > |< / li >
< li class = "right" >
< a href = "../engine_overview.html" title = "Engine Overview"
accesskey = "P" > previous< / a > |< / li >
< li class = "nav-item nav-item-0" > < a href = "../../../index.html" > SearXNG Documentation (2025.2.9+a1e2b2546)< / a > » < / li >
< li class = "nav-item nav-item-1" > < a href = "../../index.html" > Developer documentation< / a > » < / li >
< li class = "nav-item nav-item-2" > < a href = "../index.html" accesskey = "U" > Engine Implementations< / a > » < / li >
< li class = "nav-item nav-item-this" > < a href = "" > Demo Online Engine< / a > < / li >
< / ul >
< / div >
< div class = "document" >
< div class = "documentwrapper" >
< div class = "bodywrapper" >
< div class = "body" role = "main" >
< section id = "demo-online-engine" >
< span id = "id1" > < / span > < h1 > Demo Online Engine< a class = "headerlink" href = "#demo-online-engine" title = "Link to this heading" > ¶< / a > < / h1 >
< p id = "module-searx.engines.demo_online" > Within this module we implement a < em > demo online engine< / em > . Do not look to
close to the implementation, its just a simple example which queries < a class = "reference external" href = "https://www.artic.edu" > The Art
Institute of Chicago< / a > < / p >
< p > To get in use of this < em > demo< / em > engine add the following entry to your engines
list in < code class = "docutils literal notranslate" > < span class = "pre" > settings.yml< / span > < / code > :< / p >
< div class = "highlight-yaml notranslate" > < div class = "highlight" > < pre > < span > < / span > < span class = "p p-Indicator" > -< / span > < span class = "w" > < / span > < span class = "nt" > name< / span > < span class = "p" > :< / span > < span class = "w" > < / span > < span class = "l l-Scalar l-Scalar-Plain" > my online engine< / span >
< span class = "w" > < / span > < span class = "nt" > engine< / span > < span class = "p" > :< / span > < span class = "w" > < / span > < span class = "l l-Scalar l-Scalar-Plain" > demo_online< / span >
< span class = "w" > < / span > < span class = "nt" > shortcut< / span > < span class = "p" > :< / span > < span class = "w" > < / span > < span class = "l l-Scalar l-Scalar-Plain" > demo< / span >
< span class = "w" > < / span > < span class = "nt" > disabled< / span > < span class = "p" > :< / span > < span class = "w" > < / span > < span class = "l l-Scalar l-Scalar-Plain" > false< / span >
< / pre > < / div >
< / div >
< dl class = "py function" >
< dt class = "sig sig-object py" id = "searx.engines.demo_online.init" >
< span class = "sig-prename descclassname" > < span class = "pre" > searx.engines.demo_online.< / span > < / span > < span class = "sig-name descname" > < span class = "pre" > init< / span > < / span > < span class = "sig-paren" > (< / span > < em class = "sig-param" > < span class = "n" > < span class = "pre" > engine_settings< / span > < / span > < / em > < span class = "sig-paren" > )< / span > < a class = "reference internal" href = "../../../_modules/searx/engines/demo_online.html#init" > < span class = "viewcode-link" > < span class = "pre" > [source]< / span > < / span > < / a > < a class = "headerlink" href = "#searx.engines.demo_online.init" title = "Link to this definition" > ¶< / a > < / dt >
< dd > < p > Initialization of the (online) engine. If no initialization is needed, drop
this init function.< / p >
< / dd > < / dl >
< dl class = "py function" >
< dt class = "sig sig-object py" id = "searx.engines.demo_online.request" >
< span class = "sig-prename descclassname" > < span class = "pre" > searx.engines.demo_online.< / span > < / span > < span class = "sig-name descname" > < span class = "pre" > request< / span > < / span > < span class = "sig-paren" > (< / span > < em class = "sig-param" > < span class = "n" > < span class = "pre" > query< / span > < / span > < / em > , < em class = "sig-param" > < span class = "n" > < span class = "pre" > params< / span > < / span > < / em > < span class = "sig-paren" > )< / span > < a class = "reference internal" href = "../../../_modules/searx/engines/demo_online.html#request" > < span class = "viewcode-link" > < span class = "pre" > [source]< / span > < / span > < / a > < a class = "headerlink" href = "#searx.engines.demo_online.request" title = "Link to this definition" > ¶< / a > < / dt >
< dd > < p > Build up the < code class = "docutils literal notranslate" > < span class = "pre" > params< / span > < / code > for the online request. In this example we build a
URL to fetch images from < a class = "reference external" href = "https://artic.edu" > artic.edu< / a > < / p >
< / dd > < / dl >
< dl class = "py function" >
< dt class = "sig sig-object py" id = "searx.engines.demo_online.response" >
< span class = "sig-prename descclassname" > < span class = "pre" > searx.engines.demo_online.< / span > < / span > < span class = "sig-name descname" > < span class = "pre" > response< / span > < / span > < span class = "sig-paren" > (< / span > < em class = "sig-param" > < span class = "n" > < span class = "pre" > resp< / span > < / span > < / em > < span class = "sig-paren" > )< / span > < span class = "sig-return" > < span class = "sig-return-icon" > → < / span > < span class = "sig-return-typehint" > < a class = "reference internal" href = "../index.html#searx.result_types.EngineResults" title = "searx.result_types.EngineResults" > < span class = "pre" > EngineResults< / span > < / a > < / span > < / span > < a class = "reference internal" href = "../../../_modules/searx/engines/demo_online.html#response" > < span class = "viewcode-link" > < span class = "pre" > [source]< / span > < / span > < / a > < a class = "headerlink" href = "#searx.engines.demo_online.response" title = "Link to this definition" > ¶< / a > < / dt >
< dd > < p > Parse out the result items from the response. In this example we parse the
response from < a class = "reference external" href = "https://artic.edu" > api.artic.edu< / a > and filter out all
images.< / p >
< / dd > < / dl >
< / section >
< div class = "clearer" > < / div >
< / div >
< / div >
< / div >
< span id = "sidebar-top" > < / span >
< div class = "sphinxsidebar" role = "navigation" aria-label = "Main" >
< div class = "sphinxsidebarwrapper" >
< p class = "logo" > < a href = "../../../index.html" >
< img class = "logo" src = "../../../_static/searxng-wordmark.svg" alt = "Logo of SearXNG" / >
< / a > < / p >
< h3 > < a href = "../../../index.html" > Table of Contents< / a > < / h3 >
< ul class = "current" >
< li class = "toctree-l1" > < a class = "reference internal" href = "../../../user/index.html" > User information< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "../../../own-instance.html" > Why use a private instance?< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "../../../admin/index.html" > Administrator documentation< / a > < / li >
< li class = "toctree-l1 current" > < a class = "reference internal" href = "../../index.html" > Developer documentation< / a > < ul class = "current" >
< li class = "toctree-l2" > < a class = "reference internal" href = "../../quickstart.html" > Development Quickstart< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "../../rtm_asdf.html" > Runtime Management< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "../../contribution_guide.html" > How to contribute< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "../../extended_types.html" > Extended Types< / a > < / li >
< li class = "toctree-l2 current" > < a class = "reference internal" href = "../index.html" > Engine Implementations< / a > < ul class = "current" >
< li class = "toctree-l3" > < a class = "reference internal" href = "../enginelib.html" > Engine Library< / a > < / li >
< li class = "toctree-l3" > < a class = "reference internal" href = "../engines.html" > SearXNG’ s engines loader< / a > < / li >
< li class = "toctree-l3" > < a class = "reference internal" href = "../engine_overview.html" > Engine Overview< / a > < / li >
< li class = "toctree-l3" > < a class = "reference internal" href = "../index.html#resultlist-and-engines" > ResultList and engines< / a > < / li >
< li class = "toctree-l3 current" > < a class = "reference internal" href = "../index.html#engine-types" > Engine Types< / a > < ul class = "current" >
< li class = "toctree-l4 current" > < a class = "reference internal" href = "../index.html#online-engines" > Online Engines< / a > < ul class = "current" >
< li class = "toctree-l5 current" > < a class = "current reference internal" href = "#" > Demo Online Engine< / a > < / li >
< li class = "toctree-l5" > < a class = "reference internal" href = "../xpath.html" > XPath Engine< / a > < / li >
< li class = "toctree-l5" > < a class = "reference internal" href = "../mediawiki.html" > MediaWiki Engine< / a > < / li >
< li class = "toctree-l5" > < a class = "reference internal" href = "../json_engine.html" > JSON Engine< / a > < / li >
< li class = "toctree-l5" > < a class = "reference internal" href = "../online/adobe_stock.html" > Adobe Stock< / a > < / li >
< li class = "toctree-l5" > < a class = "reference internal" href = "../online/alpinelinux.html" > Alpine Linux Packages< / a > < / li >
< li class = "toctree-l5" > < a class = "reference internal" href = "../online/annas_archive.html" > Anna’ s Archive< / a > < / li >
< li class = "toctree-l5" > < a class = "reference internal" href = "../online/archlinux.html" > Arch Linux< / a > < / li >
< li class = "toctree-l5" > < a class = "reference internal" href = "../online/bing.html" > Bing Engines< / a > < / li >
< li class = "toctree-l5" > < a class = "reference internal" href = "../online/bpb.html" > Bpb< / a > < / li >
< li class = "toctree-l5" > < a class = "reference internal" href = "../online/brave.html" > Brave Engines< / a > < / li >
< li class = "toctree-l5" > < a class = "reference internal" href = "../online/bt4g.html" > BT4G< / a > < / li >
< li class = "toctree-l5" > < a class = "reference internal" href = "../online/dailymotion.html" > Dailymotion< / a > < / li >
< li class = "toctree-l5" > < a class = "reference internal" href = "../online/discourse.html" > Discourse Forums< / a > < / li >
< li class = "toctree-l5" > < a class = "reference internal" href = "../online/duckduckgo.html" > DuckDuckGo Engines< / a > < / li >
< li class = "toctree-l5" > < a class = "reference internal" href = "../online/geizhals.html" > Geizhals< / a > < / li >
< li class = "toctree-l5" > < a class = "reference internal" href = "../online/gitea.html" > Gitea< / a > < / li >
< li class = "toctree-l5" > < a class = "reference internal" href = "../online/gitlab.html" > GitLab< / a > < / li >
< li class = "toctree-l5" > < a class = "reference internal" href = "../online/google.html" > Google Engines< / a > < / li >
< li class = "toctree-l5" > < a class = "reference internal" href = "../online/lemmy.html" > Lemmy< / a > < / li >
< li class = "toctree-l5" > < a class = "reference internal" href = "../online/loc.html" > Library of Congress< / a > < / li >
< li class = "toctree-l5" > < a class = "reference internal" href = "../online/mastodon.html" > Mastodon< / a > < / li >
< li class = "toctree-l5" > < a class = "reference internal" href = "../online/moviepilot.html" > Moviepilot< / a > < / li >
< li class = "toctree-l5" > < a class = "reference internal" href = "../online/mrs.html" > Matrix Rooms Search (MRS)< / a > < / li >
< li class = "toctree-l5" > < a class = "reference internal" href = "../online/mullvad_leta.html" > Mullvad-Leta< / a > < / li >
< li class = "toctree-l5" > < a class = "reference internal" href = "../online/mwmbl.html" > Mwmbl Engine< / a > < / li >
< li class = "toctree-l5" > < a class = "reference internal" href = "../online/odysee.html" > Odysee< / a > < / li >
< li class = "toctree-l5" > < a class = "reference internal" href = "../online/peertube.html" > Peertube Engines< / a > < / li >
< li class = "toctree-l5" > < a class = "reference internal" href = "../online/piped.html" > Piped< / a > < / li >
< li class = "toctree-l5" > < a class = "reference internal" href = "../online/presearch.html" > Presearch Engine< / a > < / li >
< li class = "toctree-l5" > < a class = "reference internal" href = "../online/qwant.html" > Qwant< / a > < / li >
< li class = "toctree-l5" > < a class = "reference internal" href = "../online/radio_browser.html" > RadioBrowser< / a > < / li >
< li class = "toctree-l5" > < a class = "reference internal" href = "../online/recoll.html" > Recoll Engine< / a > < / li >
< li class = "toctree-l5" > < a class = "reference internal" href = "../online/seekr.html" > Seekr Engines< / a > < / li >
< li class = "toctree-l5" > < a class = "reference internal" href = "../online/startpage.html" > Startpage Engines< / a > < / li >
< li class = "toctree-l5" > < a class = "reference internal" href = "../online/tagesschau.html" > Tagesschau API< / a > < / li >
< li class = "toctree-l5" > < a class = "reference internal" href = "../online/torznab.html" > Torznab WebAPI< / a > < / li >
< li class = "toctree-l5" > < a class = "reference internal" href = "../online/void.html" > Void Linux binary packages< / a > < / li >
< li class = "toctree-l5" > < a class = "reference internal" href = "../online/wallhaven.html" > Wallhaven< / a > < / li >
< li class = "toctree-l5" > < a class = "reference internal" href = "../online/wikipedia.html" > Wikimedia< / a > < / li >
< li class = "toctree-l5" > < a class = "reference internal" href = "../online/yacy.html" > Yacy< / a > < / li >
< li class = "toctree-l5" > < a class = "reference internal" href = "../online/yahoo.html" > Yahoo Engine< / a > < / li >
< li class = "toctree-l5" > < a class = "reference internal" href = "../online/zlibrary.html" > Z-Library< / a > < / li >
< / ul >
< / li >
< li class = "toctree-l4" > < a class = "reference internal" href = "../index.html#offline-engines" > Offline Engines< / a > < / li >
< li class = "toctree-l4" > < a class = "reference internal" href = "../index.html#online-url-search" > Online URL Search< / a > < / li >
< li class = "toctree-l4" > < a class = "reference internal" href = "../index.html#online-currency" > Online Currency< / a > < / li >
< li class = "toctree-l4" > < a class = "reference internal" href = "../index.html#online-dictionary" > Online Dictionary< / a > < / li >
< / ul >
< / li >
< / ul >
< / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "../../result_types/index.html" > Result Types< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "../../templates.html" > Simple Theme Templates< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "../../search_api.html" > Search API< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "../../plugins/index.html" > Plugins< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "../../answerers/index.html" > Answerers< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "../../translation.html" > Translation< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "../../lxcdev.html" > Developing in Linux Containers< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "../../makefile.html" > Makefile & < code class = "docutils literal notranslate" > < span class = "pre" > ./manage< / span > < / code > < / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "../../reST.html" > reST primer< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "../../searxng_extra/index.html" > Tooling box < code class = "docutils literal notranslate" > < span class = "pre" > searxng_extra< / span > < / code > < / a > < / li >
< / ul >
< / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "../../../utils/index.html" > DevOps tooling box< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "../../../src/index.html" > Source-Code< / a > < / li >
< / ul >
< h3 > Project Links< / h3 >
< ul >
< li > < a href = "https://github.com/searxng/searxng/tree/master" > Source< / a >
< li > < a href = "https://github.com/searxng/searxng/wiki" > Wiki< / a >
< li > < a href = "https://searx.space" > Public instances< / a >
< li > < a href = "https://github.com/searxng/searxng/issues" > Issue Tracker< / a >
< / ul > < h3 > Navigation< / h3 >
< ul >
< li > < a href = "../../../index.html" > Overview< / a >
< ul >
< li > < a href = "../../index.html" > Developer documentation< / a >
< ul >
< li > < a href = "../index.html" > Engine Implementations< / a >
< ul >
< li > Previous: < a href = "../engine_overview.html" title = "previous chapter" > Engine Overview< / a >
< li > Next: < a href = "../xpath.html" title = "next chapter" > XPath Engine< / a > < / ul >
< / li > < / ul >
< / li >
< / ul >
< / li >
< / ul >
< search id = "searchbox" style = "display: none" role = "search" >
< h3 id = "searchlabel" > Quick search< / h3 >
< div class = "searchformwrapper" >
< form class = "search" action = "../../../search.html" method = "get" >
< input type = "text" name = "q" aria-labelledby = "searchlabel" autocomplete = "off" autocorrect = "off" autocapitalize = "off" spellcheck = "false" / >
< input type = "submit" value = "Go" / >
< / form >
< / div >
< / search >
< script > document . getElementById ( 'searchbox' ) . style . display = "block" < / script >
< div role = "note" aria-label = "source link" >
< h3 > This Page< / h3 >
< ul class = "this-page-menu" >
< li > < a href = "../../../_sources/dev/engines/demo/demo_online.rst.txt"
rel = "nofollow" > Show Source< / a > < / li >
< / ul >
< / div >
< / div >
< / div >
< div class = "clearer" > < / div >
< / div >
< div class = "footer" role = "contentinfo" >
© Copyright SearXNG team.
< / div >
< / body >
< / html >