engine_overview.html 22KB

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