Skip to content

Search engines

yrz edited this page Jul 24, 2019 · 3 revisions

A search engine adapter is a .js file to be placed in the search_engine/ directory. The URL need to be added to the manifest for CORS acceptance (declarative could work?).

Such file will implement an object (e.g. "searx") with two callbacks:

  • .request(q, TBD)
  • .response() returning an array of results TBD (currently just a list of URLs).

that file should also: register_search_engine(name_of_the_object);

Google

Currently it is implemented in background.js, to be ported in the external search_engine

Google offers no API, the current implementation is ugly but it works.

Duckduckgo

https://api.duckduckgo.com/api

http://api.duckduckgo.com/?q=minidive&format=json

Clone this wiki locally