Repository: searxng/searxng

Issue:
seekr
<!-- PLEASE FILL THESE FIELDS, IT REALLY HELPS THE MAINTAINERS OF SearXNG -->

**Working URL to the engine**
https://www.seekr.com

**Why do you want to add this engine?**
Seekr is a transparent and independent search engine

**Features of this engine**
includes a Seekr Score of High, Medium, or Low with each result

**Applicable category of this engine**
General, news, images, videos, maps



Discussion:
https://api.seekr.com/engine/advise?apiKey=srh1-22fb-sekr&v=web&query={query}&limit=10&offset=0

I'll be working on this so seekr is added to the engine.
@return42 Hi, I looked at seekr they have a `More Results` button. But, in the URL address there isnt a page number parameter to use.

Do you have any suggestions on this or if another engine has a similar button
If there is no API, then you have to reverse engineer the requests from the HTTP client.  I tried to have a look the last days, but whenever I go to https://www.seekr.com/ I got a dialogue that says "Seekr is down" ..

![grafik](https://user-images.githubusercontent.com/554536/211598015-edb3618e-f15a-4da2-ba8f-5fd0b2f4b4d8.png)

> I looked at seekr they have a `More Results` button. 

Is it only me getting the "Seekr is down"?  .. From where do you know that there is a `More Results` button?

Seekr is working for me correctly: https://www.seekr.com/search?query=time ... Try clearing your cookies for that site (They are setting quite a few, maybe they have a cookie set on your PC setting s specific server on BE that is down?)
Seems seekr does not like FFox .. 

@Milad-Laly to answer your question: seems there is an async API with JSON response .. by example try:

https://api.seekr.com/engine/experts/web-search/x3rIazr/v1/webc?Req=d321796b-009b-49b4-a49e-6dab964e649b&ApiKey=srh1-22fb-sekr&Lang=en&Limit=10&Offset=20&AdsQuery=foo&query=foo&originalQuery=foo&mq=False&ulat=53.144700&ulong=8.900300&cbr=1673424746741&dt=true&req=d321796b-009b-49b4-a49e-6dab964e649b&tz=-60&v=true&apiKey=srh1-22fb-sekr

The request is the request of the 3. page of search term `foo`:

![image](https://user-images.githubusercontent.com/554536/211753756-c153b8b2-f6b2-414b-99bb-e3e3b000a18f.png)



Resolving patch:
diff --git a/searx/engines/seekr.py b/searx/engines/seekr.py
new file mode 100644
--- /dev/null
+++ b/searx/engines/seekr.py
@@ -0,0 +1,218 @@
+# SPDX-License-Identifier: AGPL-3.0-or-later
+# lint: pylint
+"""seekr.com Seeker Score
+
+Seekr is a privately held search and content evaluation engine that prioritizes
+credibility over popularity.
+
+Configuration
+=============
+
+The engine has the following additional settings:
+
+- :py:obj:`seekr_category`
+- :py:obj:`api_key`
+
+This implementation is used by seekr engines in the :ref:`settings.yml
+<settings engine>`:
+
+.. code:: yaml
+
+  - name: seekr news
+    seekr_category: news
+    ...
+  - name: seekr images
+    seekr_category: images
+    ...
+  - name: seekr videos
+    seekr_category: videos
+    ...
+
+Known Quirks
+============
+
+The implementation to support :py:obj:`paging <searx.enginelib.Engine.paging>`
+is based on the *nextpage* method of Seekr's REST API.  This feature is *next
+page driven* and plays well with the :ref:`infinite_scroll <settings ui>`
+setting in SearXNG but it does not really fit into SearXNG's UI to select a page
+by number.
+
+Implementations
+===============
+
+"""
+
+from datetime import datetime
+from json import loads
+from urllib.parse import urlencode
+from flask_babel import gettext
+
+about = {
+    "website": 'https://seekr.com/',
+    "official_api_documentation": None,
+    "use_official_api": False,
+    "require_api_key": True,
+    "results": 'JSON',
+    "language": 'en',
+}
+
+base_url = "https://api.seekr.com"
+paging = True
+
+api_key = "srh1-22fb-sekr"
+"""API key / reversed engineered / is still the same one since 2022."""
+
+seekr_category: str = 'unset'
+"""Search category, any of ``news``, ``videos`` or ``images``."""
+
+
+def init(engine_settings):
+
+    # global paging
+    if engine_settings['seekr_category'] not in ['news', 'videos', 'images']:
+        raise ValueError(f"Unsupported seekr category: {engine_settings['seekr_category']}")
+
+
+def request(query, params):
+
+    if not query:
+        return None
+
+    args = {
+        'query': query,
+        'apiKey': api_key,
+    }
+
+    api_url = base_url + '/engine'
+    if seekr_category == 'news':
+        api_url += '/v2/newssearch'
+
+    elif seekr_category == 'images':
+        api_url += '/imagetab'
+
+    elif seekr_category == 'videos':
+        api_url += '/videotab'
+
+    params['url'] = f"{api_url}?{urlencode(args)}"
+    if params['pageno'] > 1:
+        nextpage = params['engine_data'].get('nextpage')
+        if nextpage:
+            params['url'] = nextpage
+
+    return params
+
+
+def _images_response(json):
+
+    search_results = json.get('expertResponses')
+    if search_results:
+        search_results = search_results[0].get('advice')
+    else:  # response from a 'nextResultSet'
+        search_results = json.get('advice')
+
+    results = []
+    if not search_results:
+        return results
+
+    for result in search_results['results']:
+        summary = loads(result['summary'])
+        results.append(
+            {
+                'template': 'images.html',
+                'url': summary['refererurl'],
+                'title': result['title'],
+                'img_src': result['url'],
+                'img_format': f"{summary['width']}x{summary['height']}",
+                'thumbnail_src': 'https://media.seekr.com/engine/rp/' + summary['tg'] + '/?src= ' + result['thumbnail'],
+            }
+        )
+
+    if search_results.get('nextResultSet'):
+        results.append(
+            {
+                "engine_data": search_results.get('nextResultSet'),
+                "key": "nextpage",
+            }
+        )
+    return results
+
+
+def _videos_response(json):
+
+    search_results = json.get('expertResponses')
+    if search_results:
+        search_results = search_results[0].get('advice')
+    else:  # response from a 'nextResultSet'
+        search_results = json.get('advice')
+
+    results = []
+    if not search_results:
+        return results
+
+    for result in search_results['results']:
+        summary = loads(result['summary'])
+        results.append(
+            {
+                'template': 'videos.html',
+                'url': result['url'],
+                'title': result['title'],
+                'thumbnail': 'https://media.seekr.com/engine/rp/' + summary['tg'] + '/?src= ' + result['thumbnail'],
+            }
+        )
+
+    if search_results.get('nextResultSet'):
+        results.append(
+            {
+                "engine_data": search_results.get('nextResultSet'),
+                "key": "nextpage",
+            }
+        )
+    return results
+
+
+def _news_response(json):
+
+    search_results = json.get('expertResponses')
+    if search_results:
+        search_results = search_results[0]['advice']['categorySearchResult']['searchResult']
+    else:  # response from a 'nextResultSet'
+        search_results = json.get('advice')
+
+    results = []
+    if not search_results:
+        return results
+
+    for result in search_results['results']:
+
+        results.append(
+            {
+                'url': result['url'],
+                'title': result['title'],
+                'content': result['summary'] or result["topCategory"] or result["displayUrl"] or '',
+                'thumbnail': result.get('thumbnail', ''),
+                'publishedDate': datetime.strptime(result['pubDate'][:19], '%Y-%m-%d %H:%M:%S'),
+                'metadata': gettext("Language") + ': ' + result.get('language', ''),
+            }
+        )
+
+    if search_results.get('nextResultSet'):
+        results.append(
+            {
+                "engine_data": search_results.get('nextResultSet'),
+                "key": "nextpage",
+            }
+        )
+    return results
+
+
+def response(resp):
+    json = resp.json()
+
+    if seekr_category == "videos":
+        return _videos_response(json)
+    if seekr_category == "images":
+        return _images_response(json)
+    if seekr_category == "news":
+        return _news_response(json)
+
+    raise ValueError(f"Unsupported seekr category: {seekr_category}")


Test patch: