You simply need to create an OpenSearch description document, and then include a link to it in your HTML header.
The OpenSearch doco page shows this example of a description document:
<?xml version="1.0" encoding="UTF-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
<ShortName>Web Search</ShortName>
<Description>Use Example.com to search the Web.</Description>
<Tags>example web</Tags>
<Contact>admin@example.com</Contact>
<Url type="application/rss+xml"
template="http://example.com/?q={searchTerms}&pw={startPage?}&format=rss"/>
</OpenSearchDescription>
Then in your HTML header, include something like:
<link rel="search"
type="application/opensearchdescription+xml"
href="http://example.com/content-search.xml"
title="Content search" />