Open the "Page actions" menu
Click "Add Search Engine"
This option will not appear if a search engine with that name already exists. Go to about:preferences#search to see your installed search engines.
%s is substituted with the entered search query
POST
Icon should be at least 16×16 pixels - Data URLs are also accepted here
Tip: A keyword can be added by going to about:preferences#search after adding the search engine and editing the Keyword column
{searchTerms} is substituted with the entered search query (application/x-suggestions+json)
application/x-suggestions+json
Due to a technical limitation with Firefox WebExtensions, all data entered when creating you custom search engine is uploaded to file.io. file.io stores this data temporarily. You can read their privacy policy and terms of service here: https://www.file.io/