engine_overview.html 24KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head>
  5. <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
  6. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  7. <title>Engine overview &#8212; searx 0.12.0 documentation</title>
  8. <link rel="stylesheet" href="../_static/style.css" type="text/css" />
  9. <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
  10. <script type="text/javascript" src="../_static/documentation_options.js"></script>
  11. <script type="text/javascript" src="../_static/jquery.js"></script>
  12. <script type="text/javascript" src="../_static/underscore.js"></script>
  13. <script type="text/javascript" src="../_static/doctools.js"></script>
  14. <link rel="index" title="Index" href="../genindex.html" />
  15. <link rel="search" title="Search" href="../search.html" />
  16. <link rel="next" title="Search API" href="search_api.html" />
  17. <link rel="prev" title="How to contribute" href="contribution_guide.html" />
  18. <link media="only screen and (max-device-width: 480px)" href="../_static/small_flask.css" type= "text/css" rel="stylesheet" />
  19. <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
  20. </head><body>
  21. <div class="document">
  22. <div class="documentwrapper">
  23. <div class="bodywrapper">
  24. <div class="body" role="main">
  25. <div class="section" id="engine-overview">
  26. <h1><a class="toc-backref" href="#id2">Engine overview</a><a class="headerlink" href="#engine-overview" title="Permalink to this headline">¶</a></h1>
  27. <p>searx is a <a class="reference external" href="https://en.wikipedia.org/wiki/Metasearch_engine">metasearch-engine</a>,
  28. so it uses different search engines to provide better results.</p>
  29. <p>Because there is no general search API which could be used for every
  30. search engine, an adapter has to be built between searx and the
  31. external search engines. Adapters are stored under the folder
  32. <a class="reference external" href="https://github.com/asciimoo/searx/tree/master/searx/engines">searx/engines</a>.</p>
  33. <div class="contents topic" id="contents">
  34. <p class="topic-title first">Contents</p>
  35. <ul class="simple">
  36. <li><a class="reference internal" href="#engine-overview" id="id2">Engine overview</a><ul>
  37. <li><a class="reference internal" href="#general-engine-configuration" id="id3">general engine configuration</a><ul>
  38. <li><a class="reference internal" href="#engine-file" id="id4">engine file</a></li>
  39. <li><a class="reference internal" href="#settings-yml" id="id5">settings.yml</a></li>
  40. <li><a class="reference internal" href="#overrides" id="id6">overrides</a></li>
  41. <li><a class="reference internal" href="#example-code" id="id7">example code</a></li>
  42. </ul>
  43. </li>
  44. <li><a class="reference internal" href="#making-a-request" id="id8">making a request</a><ul>
  45. <li><a class="reference internal" href="#passed-arguments" id="id9">passed arguments</a></li>
  46. <li><a class="reference internal" href="#parsed-arguments" id="id10">parsed arguments</a></li>
  47. <li><a class="reference internal" href="#id1" id="id11">example code</a></li>
  48. </ul>
  49. </li>
  50. <li><a class="reference internal" href="#returned-results" id="id12">returned results</a><ul>
  51. <li><a class="reference internal" href="#default" id="id13">default</a></li>
  52. <li><a class="reference internal" href="#images" id="id14">images</a></li>
  53. <li><a class="reference internal" href="#videos" id="id15">videos</a></li>
  54. <li><a class="reference internal" href="#torrent" id="id16">torrent</a></li>
  55. <li><a class="reference internal" href="#map" id="id17">map</a></li>
  56. </ul>
  57. </li>
  58. </ul>
  59. </li>
  60. </ul>
  61. </div>
  62. <div class="section" id="general-engine-configuration">
  63. <h2><a class="toc-backref" href="#id3">general engine configuration</a><a class="headerlink" href="#general-engine-configuration" title="Permalink to this headline">¶</a></h2>
  64. <p>It is required to tell searx the type of results the engine provides. The
  65. arguments can be set in the engine file or in the settings file
  66. (normally <code class="docutils literal notranslate"><span class="pre">settings.yml</span></code>). The arguments in the settings file override
  67. the ones in the engine file.</p>
  68. <p>It does not matter if an option is stored in the engine file or in the
  69. settings. However, the standard way is the following:</p>
  70. <div class="section" id="engine-file">
  71. <h3><a class="toc-backref" href="#id4">engine file</a><a class="headerlink" href="#engine-file" title="Permalink to this headline">¶</a></h3>
  72. <table border="1" class="docutils">
  73. <colgroup>
  74. <col width="30%" />
  75. <col width="15%" />
  76. <col width="55%" />
  77. </colgroup>
  78. <thead valign="bottom">
  79. <tr class="row-odd"><th class="head">argument</th>
  80. <th class="head">type</th>
  81. <th class="head">information</th>
  82. </tr>
  83. </thead>
  84. <tbody valign="top">
  85. <tr class="row-even"><td>categories</td>
  86. <td>list</td>
  87. <td>pages, in which the engine is working</td>
  88. </tr>
  89. <tr class="row-odd"><td>paging</td>
  90. <td>boolean</td>
  91. <td>support multible pages</td>
  92. </tr>
  93. <tr class="row-even"><td>language_support</td>
  94. <td>boolean</td>
  95. <td>support language choosing</td>
  96. </tr>
  97. <tr class="row-odd"><td>time_range_support</td>
  98. <td>boolean</td>
  99. <td>support search time range</td>
  100. </tr>
  101. </tbody>
  102. </table>
  103. </div>
  104. <div class="section" id="settings-yml">
  105. <h3><a class="toc-backref" href="#id5">settings.yml</a><a class="headerlink" href="#settings-yml" title="Permalink to this headline">¶</a></h3>
  106. <table border="1" class="docutils">
  107. <colgroup>
  108. <col width="17%" />
  109. <col width="14%" />
  110. <col width="68%" />
  111. </colgroup>
  112. <thead valign="bottom">
  113. <tr class="row-odd"><th class="head">argument</th>
  114. <th class="head">type</th>
  115. <th class="head">information</th>
  116. </tr>
  117. </thead>
  118. <tbody valign="top">
  119. <tr class="row-even"><td>name</td>
  120. <td>string</td>
  121. <td>name of search-engine</td>
  122. </tr>
  123. <tr class="row-odd"><td>engine</td>
  124. <td>string</td>
  125. <td>name of searx-engine (filename without .py)</td>
  126. </tr>
  127. <tr class="row-even"><td>shortcut</td>
  128. <td>string</td>
  129. <td>shortcut of search-engine</td>
  130. </tr>
  131. <tr class="row-odd"><td>timeout</td>
  132. <td>string</td>
  133. <td>specific timeout for search-engine</td>
  134. </tr>
  135. </tbody>
  136. </table>
  137. </div>
  138. <div class="section" id="overrides">
  139. <h3><a class="toc-backref" href="#id6">overrides</a><a class="headerlink" href="#overrides" title="Permalink to this headline">¶</a></h3>
  140. <p>A few of the options have default values in the engine, but are
  141. often overwritten by the settings. If <code class="docutils literal notranslate"><span class="pre">None</span></code> is assigned to an option
  142. in the engine file, it has to be redefined in the settings,
  143. otherwise searx will not start with that engine.</p>
  144. <p>The naming of overrides is arbitrary. But the recommended
  145. overrides are the following:</p>
  146. <table border="1" class="docutils">
  147. <colgroup>
  148. <col width="24%" />
  149. <col width="10%" />
  150. <col width="66%" />
  151. </colgroup>
  152. <thead valign="bottom">
  153. <tr class="row-odd"><th class="head">argument</th>
  154. <th class="head">type</th>
  155. <th class="head">information</th>
  156. </tr>
  157. </thead>
  158. <tbody valign="top">
  159. <tr class="row-even"><td>base_url</td>
  160. <td>string</td>
  161. <td>base-url, can be overwritten to use same engine on other URL</td>
  162. </tr>
  163. <tr class="row-odd"><td>number_of_results</td>
  164. <td>int</td>
  165. <td>maximum number of results per request</td>
  166. </tr>
  167. <tr class="row-even"><td>language</td>
  168. <td>string</td>
  169. <td>ISO code of language and country like en_US</td>
  170. </tr>
  171. <tr class="row-odd"><td>api_key</td>
  172. <td>string</td>
  173. <td>api-key if required by engine</td>
  174. </tr>
  175. </tbody>
  176. </table>
  177. </div>
  178. <div class="section" id="example-code">
  179. <h3><a class="toc-backref" href="#id7">example code</a><a class="headerlink" href="#example-code" title="Permalink to this headline">¶</a></h3>
  180. <div class="code python highlight-default notranslate"><div class="highlight"><pre><span></span><span class="c1"># engine dependent config</span>
  181. <span class="n">categories</span> <span class="o">=</span> <span class="p">[</span><span class="s1">&#39;general&#39;</span><span class="p">]</span>
  182. <span class="n">paging</span> <span class="o">=</span> <span class="kc">True</span>
  183. <span class="n">language_support</span> <span class="o">=</span> <span class="kc">True</span>
  184. </pre></div>
  185. </div>
  186. </div>
  187. </div>
  188. <div class="section" id="making-a-request">
  189. <h2><a class="toc-backref" href="#id8">making a request</a><a class="headerlink" href="#making-a-request" title="Permalink to this headline">¶</a></h2>
  190. <p>To perform a search an URL have to be specified. In addition to
  191. specifying an URL, arguments can be passed to the query.</p>
  192. <div class="section" id="passed-arguments">
  193. <h3><a class="toc-backref" href="#id9">passed arguments</a><a class="headerlink" href="#passed-arguments" title="Permalink to this headline">¶</a></h3>
  194. <p>These arguments can be used to construct the search query. Furthermore,
  195. parameters with default value can be redefined for special purposes.</p>
  196. <table border="1" class="docutils">
  197. <colgroup>
  198. <col width="21%" />
  199. <col width="11%" />
  200. <col width="68%" />
  201. </colgroup>
  202. <thead valign="bottom">
  203. <tr class="row-odd"><th class="head">argument</th>
  204. <th class="head">type</th>
  205. <th class="head">default-value, information</th>
  206. </tr>
  207. </thead>
  208. <tbody valign="top">
  209. <tr class="row-even"><td>url</td>
  210. <td>string</td>
  211. <td><code class="docutils literal notranslate"><span class="pre">''</span></code></td>
  212. </tr>
  213. <tr class="row-odd"><td>method</td>
  214. <td>string</td>
  215. <td><code class="docutils literal notranslate"><span class="pre">'GET'</span></code></td>
  216. </tr>
  217. <tr class="row-even"><td>headers</td>
  218. <td>set</td>
  219. <td><code class="docutils literal notranslate"><span class="pre">{}</span></code></td>
  220. </tr>
  221. <tr class="row-odd"><td>data</td>
  222. <td>set</td>
  223. <td><code class="docutils literal notranslate"><span class="pre">{}</span></code></td>
  224. </tr>
  225. <tr class="row-even"><td>cookies</td>
  226. <td>set</td>
  227. <td><code class="docutils literal notranslate"><span class="pre">{}</span></code></td>
  228. </tr>
  229. <tr class="row-odd"><td>verify</td>
  230. <td>boolean</td>
  231. <td><code class="docutils literal notranslate"><span class="pre">True</span></code></td>
  232. </tr>
  233. <tr class="row-even"><td>headers.User-Agent</td>
  234. <td>string</td>
  235. <td>a random User-Agent</td>
  236. </tr>
  237. <tr class="row-odd"><td>category</td>
  238. <td>string</td>
  239. <td>current category, like <code class="docutils literal notranslate"><span class="pre">'general'</span></code></td>
  240. </tr>
  241. <tr class="row-even"><td>started</td>
  242. <td>datetime</td>
  243. <td>current date-time</td>
  244. </tr>
  245. <tr class="row-odd"><td>pageno</td>
  246. <td>int</td>
  247. <td>current pagenumber</td>
  248. </tr>
  249. <tr class="row-even"><td>language</td>
  250. <td>string</td>
  251. <td>specific language code like <code class="docutils literal notranslate"><span class="pre">'en_US'</span></code>, or <code class="docutils literal notranslate"><span class="pre">'all'</span></code> if unspecified</td>
  252. </tr>
  253. </tbody>
  254. </table>
  255. </div>
  256. <div class="section" id="parsed-arguments">
  257. <h3><a class="toc-backref" href="#id10">parsed arguments</a><a class="headerlink" href="#parsed-arguments" title="Permalink to this headline">¶</a></h3>
  258. <p>The function <code class="docutils literal notranslate"><span class="pre">def</span> <span class="pre">request(query,</span> <span class="pre">params):</span></code> always returns the
  259. <code class="docutils literal notranslate"><span class="pre">params</span></code> variable. Inside searx, the following paramters can be
  260. used to specify a search request:</p>
  261. <table border="1" class="docutils">
  262. <colgroup>
  263. <col width="15%" />
  264. <col width="14%" />
  265. <col width="71%" />
  266. </colgroup>
  267. <thead valign="bottom">
  268. <tr class="row-odd"><th class="head">argument</th>
  269. <th class="head">type</th>
  270. <th class="head">information</th>
  271. </tr>
  272. </thead>
  273. <tbody valign="top">
  274. <tr class="row-even"><td>url</td>
  275. <td>string</td>
  276. <td>requested url</td>
  277. </tr>
  278. <tr class="row-odd"><td>method</td>
  279. <td>string</td>
  280. <td>HTTP request method</td>
  281. </tr>
  282. <tr class="row-even"><td>headers</td>
  283. <td>set</td>
  284. <td>HTTP header information</td>
  285. </tr>
  286. <tr class="row-odd"><td>data</td>
  287. <td>set</td>
  288. <td>HTTP data information (parsed if <code class="docutils literal notranslate"><span class="pre">method</span> <span class="pre">!=</span> <span class="pre">'GET'</span></code>)</td>
  289. </tr>
  290. <tr class="row-even"><td>cookies</td>
  291. <td>set</td>
  292. <td>HTTP cookies</td>
  293. </tr>
  294. <tr class="row-odd"><td>verify</td>
  295. <td>boolean</td>
  296. <td>Performing SSL-Validity check</td>
  297. </tr>
  298. </tbody>
  299. </table>
  300. </div>
  301. <div class="section" id="id1">
  302. <h3><a class="toc-backref" href="#id11">example code</a><a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h3>
  303. <div class="code python highlight-default notranslate"><div class="highlight"><pre><span></span><span class="c1"># search-url</span>
  304. <span class="n">base_url</span> <span class="o">=</span> <span class="s1">&#39;https://example.com/&#39;</span>
  305. <span class="n">search_string</span> <span class="o">=</span> <span class="s1">&#39;search?</span><span class="si">{query}</span><span class="s1">&amp;page=</span><span class="si">{page}</span><span class="s1">&#39;</span>
  306. <span class="c1"># do search-request</span>
  307. <span class="k">def</span> <span class="nf">request</span><span class="p">(</span><span class="n">query</span><span class="p">,</span> <span class="n">params</span><span class="p">):</span>
  308. <span class="n">search_path</span> <span class="o">=</span> <span class="n">search_string</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
  309. <span class="n">query</span><span class="o">=</span><span class="n">urlencode</span><span class="p">({</span><span class="s1">&#39;q&#39;</span><span class="p">:</span> <span class="n">query</span><span class="p">}),</span>
  310. <span class="n">page</span><span class="o">=</span><span class="n">params</span><span class="p">[</span><span class="s1">&#39;pageno&#39;</span><span class="p">])</span>
  311. <span class="n">params</span><span class="p">[</span><span class="s1">&#39;url&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="n">base_url</span> <span class="o">+</span> <span class="n">search_path</span>
  312. <span class="k">return</span> <span class="n">params</span>
  313. </pre></div>
  314. </div>
  315. </div>
  316. </div>
  317. <div class="section" id="returned-results">
  318. <h2><a class="toc-backref" href="#id12">returned results</a><a class="headerlink" href="#returned-results" title="Permalink to this headline">¶</a></h2>
  319. <p>Searx is able to return results of different media-types.
  320. Currently the following media-types are supported:</p>
  321. <ul class="simple">
  322. <li>default</li>
  323. <li>images</li>
  324. <li>videos</li>
  325. <li>torrent</li>
  326. <li>map</li>
  327. </ul>
  328. <p>To set another media-type as default, the parameter
  329. <code class="docutils literal notranslate"><span class="pre">template</span></code> must be set to the desired type.</p>
  330. <div class="section" id="default">
  331. <h3><a class="toc-backref" href="#id13">default</a><a class="headerlink" href="#default" title="Permalink to this headline">¶</a></h3>
  332. <table border="1" class="docutils">
  333. <colgroup>
  334. <col width="15%" />
  335. <col width="85%" />
  336. </colgroup>
  337. <thead valign="bottom">
  338. <tr class="row-odd"><th class="head">result-parameter</th>
  339. <th class="head">information</th>
  340. </tr>
  341. </thead>
  342. <tbody valign="top">
  343. <tr class="row-even"><td>url</td>
  344. <td>string, url of the result</td>
  345. </tr>
  346. <tr class="row-odd"><td>title</td>
  347. <td>string, title of the result</td>
  348. </tr>
  349. <tr class="row-even"><td>content</td>
  350. <td>string, general result-text</td>
  351. </tr>
  352. <tr class="row-odd"><td>publishedDate</td>
  353. <td><a class="reference external" href="https://docs.python.org/2/library/datetime.html#datetime-objects">datetime.datetime</a>, time of publish</td>
  354. </tr>
  355. </tbody>
  356. </table>
  357. </div>
  358. <div class="section" id="images">
  359. <h3><a class="toc-backref" href="#id14">images</a><a class="headerlink" href="#images" title="Permalink to this headline">¶</a></h3>
  360. <p>to use this template, the parameter</p>
  361. <table border="1" class="docutils">
  362. <colgroup>
  363. <col width="13%" />
  364. <col width="87%" />
  365. </colgroup>
  366. <thead valign="bottom">
  367. <tr class="row-odd"><th class="head">result-parameter</th>
  368. <th class="head">information</th>
  369. </tr>
  370. </thead>
  371. <tbody valign="top">
  372. <tr class="row-even"><td>template</td>
  373. <td>is set to <code class="docutils literal notranslate"><span class="pre">images.html</span></code></td>
  374. </tr>
  375. <tr class="row-odd"><td>url</td>
  376. <td>string, url to the result site</td>
  377. </tr>
  378. <tr class="row-even"><td>title</td>
  379. <td>string, title of the result <em>(partly implemented)</em></td>
  380. </tr>
  381. <tr class="row-odd"><td>content</td>
  382. <td><em>(partly implemented)</em></td>
  383. </tr>
  384. <tr class="row-even"><td>publishedDate</td>
  385. <td><a class="reference external" href="https://docs.python.org/2/library/datetime.html#datetime-objects">datetime.datetime</a>, time of publish <em>(partly implemented)</em></td>
  386. </tr>
  387. <tr class="row-odd"><td>img_src</td>
  388. <td>string, url to the result image</td>
  389. </tr>
  390. <tr class="row-even"><td>thumbnail_src</td>
  391. <td>string, url to a small-preview image</td>
  392. </tr>
  393. </tbody>
  394. </table>
  395. </div>
  396. <div class="section" id="videos">
  397. <h3><a class="toc-backref" href="#id15">videos</a><a class="headerlink" href="#videos" title="Permalink to this headline">¶</a></h3>
  398. <table border="1" class="docutils">
  399. <colgroup>
  400. <col width="15%" />
  401. <col width="85%" />
  402. </colgroup>
  403. <thead valign="bottom">
  404. <tr class="row-odd"><th class="head">result-parameter</th>
  405. <th class="head">information</th>
  406. </tr>
  407. </thead>
  408. <tbody valign="top">
  409. <tr class="row-even"><td>template</td>
  410. <td>is set to <code class="docutils literal notranslate"><span class="pre">videos.html</span></code></td>
  411. </tr>
  412. <tr class="row-odd"><td>url</td>
  413. <td>string, url of the result</td>
  414. </tr>
  415. <tr class="row-even"><td>title</td>
  416. <td>string, title of the result</td>
  417. </tr>
  418. <tr class="row-odd"><td>content</td>
  419. <td><em>(not implemented yet)</em></td>
  420. </tr>
  421. <tr class="row-even"><td>publishedDate</td>
  422. <td><a class="reference external" href="https://docs.python.org/2/library/datetime.html#datetime-objects">datetime.datetime</a>, time of publish</td>
  423. </tr>
  424. <tr class="row-odd"><td>thumbnail</td>
  425. <td>string, url to a small-preview image</td>
  426. </tr>
  427. </tbody>
  428. </table>
  429. </div>
  430. <div class="section" id="torrent">
  431. <h3><a class="toc-backref" href="#id16">torrent</a><a class="headerlink" href="#torrent" title="Permalink to this headline">¶</a></h3>
  432. <table border="1" class="docutils">
  433. <colgroup>
  434. <col width="12%" />
  435. <col width="88%" />
  436. </colgroup>
  437. <thead valign="bottom">
  438. <tr class="row-odd"><th class="head">result-parameter</th>
  439. <th class="head">information</th>
  440. </tr>
  441. </thead>
  442. <tbody valign="top">
  443. <tr class="row-even"><td>template</td>
  444. <td>is set to <code class="docutils literal notranslate"><span class="pre">torrent.html</span></code></td>
  445. </tr>
  446. <tr class="row-odd"><td>url</td>
  447. <td>string, url of the result</td>
  448. </tr>
  449. <tr class="row-even"><td>title</td>
  450. <td>string, title of the result</td>
  451. </tr>
  452. <tr class="row-odd"><td>content</td>
  453. <td>string, general result-text</td>
  454. </tr>
  455. <tr class="row-even"><td>publishedDate</td>
  456. <td><a class="reference external" href="https://docs.python.org/2/library/datetime.html#datetime-objects">datetime.datetime</a>, time of publish <em>(not implemented yet)</em></td>
  457. </tr>
  458. <tr class="row-odd"><td>seed</td>
  459. <td>int, number of seeder</td>
  460. </tr>
  461. <tr class="row-even"><td>leech</td>
  462. <td>int, number of leecher</td>
  463. </tr>
  464. <tr class="row-odd"><td>filesize</td>
  465. <td>int, size of file in bytes</td>
  466. </tr>
  467. <tr class="row-even"><td>files</td>
  468. <td>int, number of files</td>
  469. </tr>
  470. <tr class="row-odd"><td>magnetlink</td>
  471. <td>string, <a class="reference external" href="https://en.wikipedia.org/wiki/Magnet_URI_scheme">magnetlink</a> of the result</td>
  472. </tr>
  473. <tr class="row-even"><td>torrentfile</td>
  474. <td>string, torrentfile of the result</td>
  475. </tr>
  476. </tbody>
  477. </table>
  478. </div>
  479. <div class="section" id="map">
  480. <h3><a class="toc-backref" href="#id17">map</a><a class="headerlink" href="#map" title="Permalink to this headline">¶</a></h3>
  481. <table border="1" class="docutils">
  482. <colgroup>
  483. <col width="19%" />
  484. <col width="81%" />
  485. </colgroup>
  486. <thead valign="bottom">
  487. <tr class="row-odd"><th class="head">result-parameter</th>
  488. <th class="head">information</th>
  489. </tr>
  490. </thead>
  491. <tbody valign="top">
  492. <tr class="row-even"><td>url</td>
  493. <td>string, url of the result</td>
  494. </tr>
  495. <tr class="row-odd"><td>title</td>
  496. <td>string, title of the result</td>
  497. </tr>
  498. <tr class="row-even"><td>content</td>
  499. <td>string, general result-text</td>
  500. </tr>
  501. <tr class="row-odd"><td>publishedDate</td>
  502. <td><a class="reference external" href="https://docs.python.org/2/library/datetime.html#datetime-objects">datetime.datetime</a>, time of publish</td>
  503. </tr>
  504. <tr class="row-even"><td>latitude</td>
  505. <td>latitude of result (in decimal format)</td>
  506. </tr>
  507. <tr class="row-odd"><td>longitude</td>
  508. <td>longitude of result (in decimal format)</td>
  509. </tr>
  510. <tr class="row-even"><td>boundingbox</td>
  511. <td>boundingbox of result (array of 4. values <code class="docutils literal notranslate"><span class="pre">[lat-min,</span> <span class="pre">lat-max,</span> <span class="pre">lon-min,</span> <span class="pre">lon-max]</span></code>)</td>
  512. </tr>
  513. <tr class="row-odd"><td>geojson</td>
  514. <td>geojson of result (<a class="reference external" href="http://geojson.org">http://geojson.org</a>)</td>
  515. </tr>
  516. <tr class="row-even"><td>osm.type</td>
  517. <td>type of osm-object (if OSM-Result)</td>
  518. </tr>
  519. <tr class="row-odd"><td>osm.id</td>
  520. <td>id of osm-object (if OSM-Result)</td>
  521. </tr>
  522. <tr class="row-even"><td>address.name</td>
  523. <td>name of object</td>
  524. </tr>
  525. <tr class="row-odd"><td>address.road</td>
  526. <td>street name of object</td>
  527. </tr>
  528. <tr class="row-even"><td>address.house_number</td>
  529. <td>house number of object</td>
  530. </tr>
  531. <tr class="row-odd"><td>address.locality</td>
  532. <td>city, place of object</td>
  533. </tr>
  534. <tr class="row-even"><td>address.postcode</td>
  535. <td>postcode of object</td>
  536. </tr>
  537. <tr class="row-odd"><td>address.country</td>
  538. <td>country of object</td>
  539. </tr>
  540. </tbody>
  541. </table>
  542. </div>
  543. </div>
  544. </div>
  545. </div>
  546. </div>
  547. </div>
  548. <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
  549. <div class="sphinxsidebarwrapper">
  550. <h3><a href="../index.html">Table Of Contents</a></h3>
  551. <ul>
  552. <li><a class="reference internal" href="#">Engine overview</a><ul>
  553. <li><a class="reference internal" href="#general-engine-configuration">general engine configuration</a><ul>
  554. <li><a class="reference internal" href="#engine-file">engine file</a></li>
  555. <li><a class="reference internal" href="#settings-yml">settings.yml</a></li>
  556. <li><a class="reference internal" href="#overrides">overrides</a></li>
  557. <li><a class="reference internal" href="#example-code">example code</a></li>
  558. </ul>
  559. </li>
  560. <li><a class="reference internal" href="#making-a-request">making a request</a><ul>
  561. <li><a class="reference internal" href="#passed-arguments">passed arguments</a></li>
  562. <li><a class="reference internal" href="#parsed-arguments">parsed arguments</a></li>
  563. <li><a class="reference internal" href="#id1">example code</a></li>
  564. </ul>
  565. </li>
  566. <li><a class="reference internal" href="#returned-results">returned results</a><ul>
  567. <li><a class="reference internal" href="#default">default</a></li>
  568. <li><a class="reference internal" href="#images">images</a></li>
  569. <li><a class="reference internal" href="#videos">videos</a></li>
  570. <li><a class="reference internal" href="#torrent">torrent</a></li>
  571. <li><a class="reference internal" href="#map">map</a></li>
  572. </ul>
  573. </li>
  574. </ul>
  575. </li>
  576. </ul>
  577. <div class="sidebar_container body">
  578. <h1>Searx</h1>
  579. <ul>
  580. <li><a href="../index.html">Home</a></li>
  581. <li><a href="https://github.com/asciimoo/searx">Source</a></li>
  582. <li><a href="../blog/blog.html">Blog</a></li>
  583. <li><a href="https://github.com/asciimoo/searx/wiki">Wiki</a></li>
  584. <li><a href="https://github.com/asciimoo/searx/wiki/Searx-instances">Public instances</a></li>
  585. </ul>
  586. <hr />
  587. <ul>
  588. <li><a href="https://twitter.com/Searx_engine">Twitter</a></li>
  589. </ul>
  590. </div>
  591. <div role="note" aria-label="source link">
  592. <h3>This Page</h3>
  593. <ul class="this-page-menu">
  594. <li><a href="../_sources/dev/engine_overview.rst.txt"
  595. rel="nofollow">Show Source</a></li>
  596. </ul>
  597. </div>
  598. <div id="searchbox" style="display: none" role="search">
  599. <h3>Quick search</h3>
  600. <div class="searchformwrapper">
  601. <form class="search" action="../search.html" method="get">
  602. <input type="text" name="q" />
  603. <input type="submit" value="Go" />
  604. <input type="hidden" name="check_keywords" value="yes" />
  605. <input type="hidden" name="area" value="default" />
  606. </form>
  607. </div>
  608. </div>
  609. <script type="text/javascript">$('#searchbox').show(0);</script>
  610. </div>
  611. </div>
  612. <div class="clearer"></div>
  613. </div>
  614. <div class="footer">
  615. &copy; Copyright 2015-2017, Adam Tauber.
  616. </div>
  617. </body>
  618. </html>