{"id":1856,"date":"2007-06-24T18:07:53","date_gmt":"2007-06-24T18:07:53","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/open-search-document\/"},"modified":"2026-09-20T11:56:05","modified_gmt":"2026-09-20T11:56:05","slug":"open-search-document","status":"publish","type":"plugin","link":"https:\/\/he.wordpress.org\/plugins\/open-search-document\/","author":130940,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"4.2.0","stable_tag":"4.2.0","tested":"7.1.1","requires":"6.4","requires_php":"7.4","requires_plugins":null,"header_name":"Open Search Document","header_author":"Matthias Pfefferle","header_description":"","assets_banners_color":"e9e9e9","last_updated":"2026-09-20 11:56:05","external_support_url":"","external_repository_url":"https:\/\/github.com\/pfefferle\/wordpress-open-search-document","donate_link":"https:\/\/notiz.blog\/donate\/","header_plugin_uri":"https:\/\/github.com\/pfefferle\/wordpress-open-search-document\/","header_author_uri":"https:\/\/notiz.blog\/","rating":5,"author_block_rating":0,"active_installs":200,"downloads":11756,"num_ratings":4,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0":{"tag":"1.0","author":"pfefferle","date":"2009-07-06 22:24:05","revision":132548},"1.1":{"tag":"1.1","author":"pfefferle","date":"2009-07-16 21:15:45","revision":135866},"1.1.1":{"tag":"1.1.1","author":"pfefferle","date":"2009-07-17 14:40:47","revision":136032},"1.2":{"tag":"1.2","author":"pfefferle","date":"2009-07-22 11:55:07","revision":137849},"1.2.1":{"tag":"1.2.1","author":"pfefferle","date":"2010-04-22 19:02:25","revision":232167},"1.2.2":{"tag":"1.2.2","author":"pfefferle","date":"2010-04-27 20:18:12","revision":234530},"1.3":{"tag":"1.3","author":"pfefferle","date":"2012-07-04 18:03:15","revision":567482},"2.0.0":{"tag":"2.0.0","author":"pfefferle","date":"2015-07-13 19:03:01","revision":1198231},"2.1.0":{"tag":"2.1.0","author":"pfefferle","date":"2015-08-19 20:31:00","revision":1225568},"2.1.1":{"tag":"2.1.1","author":"pfefferle","date":"2015-08-19 21:39:57","revision":1225624},"2.1.2":{"tag":"2.1.2","author":"pfefferle","date":"2015-12-01 21:46:29","revision":1298640},"3.0.0":{"tag":"3.0.0","author":"pfefferle","date":"2016-10-09 20:40:03","revision":1511269},"3.0.1":{"tag":"3.0.1","author":"pfefferle","date":"2018-01-22 20:58:24","revision":1807397},"3.0.2":{"tag":"3.0.2","author":"pfefferle","date":"2020-08-13 08:11:52","revision":2359812},"3.0.3":{"tag":"3.0.3","author":"pfefferle","date":"2022-05-17 06:56:41","revision":2724999},"4.0.0":{"tag":"4.0.0","author":"pfefferle","date":"2023-11-13 16:13:57","revision":2995293},"4.0.1":{"tag":"4.0.1","author":"pfefferle","date":"2024-01-22 11:48:50","revision":3025085},"4.1.0":{"tag":"4.1.0","author":"pfefferle","date":"2024-01-22 13:50:55","revision":3025182},"4.1.1":{"tag":"4.1.1","author":"pfefferle","date":"2024-08-07 17:02:41","revision":3132283},"4.1.2":{"tag":"4.1.2","author":"pfefferle","date":"2024-11-22 10:37:36","revision":3194847},"4.1.3":{"tag":"4.1.3","author":"pfefferle","date":"2026-08-21 14:23:36","revision":3659182},"4.2.0":{"tag":"4.2.0","author":"pfefferle","date":"2026-09-20 11:56:05","revision":3704202}},"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":"4"},"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":2841764,"resolution":"128x128","location":"assets","locale":"","width":128,"height":128},"icon-16x16.png":{"filename":"icon-16x16.png","revision":2841764,"resolution":"16x16","location":"assets","locale":"","width":16,"height":16},"icon-32x32.png":{"filename":"icon-32x32.png","revision":2841764,"resolution":"32x32","location":"assets","locale":"","width":32,"height":32},"icon-48x48.png":{"filename":"icon-48x48.png","revision":2841764,"resolution":"48x48","location":"assets","locale":"","width":48,"height":48},"icon-64x64.png":{"filename":"icon-64x64.png","revision":2841764,"resolution":"64x64","location":"assets","locale":"","width":64,"height":64}},"assets_banners":{"banner-772x250.png":{"filename":"banner-772x250.png","revision":2841764,"resolution":"772x250","location":"assets","locale":"","width":772,"height":250}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0","1.1","1.1.1","1.2","1.2.1","1.2.2","1.3","2.0.0","2.1.0","2.1.1","2.1.2","3.0.0","3.0.1","3.0.2","3.0.3","4.0.0","4.0.1","4.1.0","4.1.1","4.1.2","4.1.3","4.2.0"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":3194847,"resolution":"1","location":"assets","locale":"","width":2056,"height":1202},"screenshot-2.png":{"filename":"screenshot-2.png","revision":3194847,"resolution":"2","location":"assets","locale":"","width":2272,"height":1532},"screenshot-3.png":{"filename":"screenshot-3.png","revision":3194847,"resolution":"3","location":"assets","locale":"","width":2128,"height":1628}},"screenshots":{"1":"Firefox OpenSearch plugins","2":"Safari Quick Website Search","3":"Chrome Tab to Search"}},"plugin_section":[],"plugin_tags":[281695,1127,2794,944,36439],"plugin_category":[],"plugin_contributors":[234951,77968],"plugin_business_model":[216239],"class_list":["post-1856","plugin","type-plugin","status-publish","hentry","plugin_tags-autodiscovery","plugin_tags-browser","plugin_tags-opensearch","plugin_tags-search","plugin_tags-suggestions","plugin_contributors-johnnoone","plugin_contributors-pfefferle","plugin_business_model-community","plugin_committers-pfefferle"],"banners":{"banner":"https:\/\/ps.w.org\/open-search-document\/assets\/banner-772x250.png?rev=2841764","banner_2x":false,"banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/open-search-document\/assets\/icon-128x128.png?rev=2841764","icon_2x":false,"generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/open-search-document\/assets\/screenshot-1.png?rev=3194847","caption":"Firefox OpenSearch plugins"},{"src":"https:\/\/ps.w.org\/open-search-document\/assets\/screenshot-2.png?rev=3194847","caption":"Safari Quick Website Search"},{"src":"https:\/\/ps.w.org\/open-search-document\/assets\/screenshot-3.png?rev=3194847","caption":"Chrome Tab to Search"}],"raw_content":"<!--section=description-->\n<p>Browsers can learn how to search a website if the site tells them. This plugin adds that information to your WordPress site, in the form of an <a href=\"https:\/\/github.com\/dewitt\/opensearch\/blob\/master\/opensearch-1-1-draft-6.md\">OpenSearch<\/a> description document.<\/p>\n\n<p>Once activated, visitors can add your site as a search engine in their browser, or the browser picks it up on its own. Typing a keyword and a search term into the address bar then searches your site instead of the web.<\/p>\n\n<p>There is nothing to configure. Install it, activate it, done.<\/p>\n\n<h3>What visitors get<\/h3>\n\n<ul>\n<li><strong>Chrome and Edge<\/strong>: your site shows up under \"Site search\" in the browser settings. After activating it there, visitors type your domain, hit <code>Tab<\/code> and search your site. Chrome calls this <a href=\"https:\/\/www.chromium.org\/tab-to-search\/\">\"Tab to Search\"<\/a>.<\/li>\n<li><strong>Firefox<\/strong>: the address bar offers to add your site as a search engine. Visitors can also right click the address bar and pick \"Add\" (<a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/XML\/Guides\/OpenSearch\">OpenSearch in Firefox<\/a>).<\/li>\n<li><strong>Safari<\/strong>: with <a href=\"https:\/\/developer.apple.com\/library\/archive\/releasenotes\/General\/WhatsNewInSafari\/Articles\/Safari_8_0.html\">\"Quick Website Search\"<\/a> enabled, Safari remembers your site after the first search and offers it in the address bar.<\/li>\n<li><strong>Search suggestions<\/strong>: while typing, the browser can show suggestions. The plugin uses your tags for that.<\/li>\n<li><strong>Your site icon<\/strong> is used as the icon of the search engine, if you have one set under <em>Appearance &gt; Customize &gt; Site Identity<\/em>.<\/li>\n<\/ul>\n\n<h3>What the plugin adds<\/h3>\n\n<ul>\n<li>The OpenSearch description document at <code>\/wp-json\/opensearch\/1.1\/document<\/code><\/li>\n<li>A suggestions endpoint at <code>\/wp-json\/opensearch\/1.1\/suggestions?s=\u2026<\/code><\/li>\n<li>Autodiscovery links in the <a href=\"https:\/\/github.com\/dewitt\/opensearch\/blob\/master\/opensearch-1-1-draft-6.md#autodiscovery-in-htmlxhtml\">HTML head<\/a> and in the <a href=\"https:\/\/github.com\/dewitt\/opensearch\/blob\/master\/opensearch-1-1-draft-6.md#autodiscovery-in-rssatom\">Atom and RSS feeds<\/a><\/li>\n<li>A search provider entry in the web app manifest, for the <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Mozilla\/Add-ons\/WebExtensions\/manifest.json\/chrome_settings_overrides\">\"search_provider\" WebExtension<\/a> setting<\/li>\n<li>Links in <a href=\"https:\/\/wordpress.org\/plugins\/host-meta\/\">host-meta<\/a> and <a href=\"https:\/\/wordpress.org\/plugins\/webfinger\/\">WebFinger<\/a>, if those plugins are installed<\/li>\n<li>Search URLs for the <a href=\"https:\/\/github.com\/dewitt\/opensearch\/blob\/master\/opensearch-1-1-draft-6.md#examples-of-opensearch-responses\">Atom and RSS search responses<\/a> and the <a href=\"https:\/\/github.com\/dewitt\/opensearch\/blob\/master\/mediawiki\/Specifications\/OpenSearch\/Extensions\/Suggestions\/1.1\/Draft%201.wiki\">OpenSearch Suggestions extension<\/a><\/li>\n<\/ul>\n\n<!--section=installation-->\n<ol>\n<li>Install the plugin from the WordPress plugin directory, or upload the <code>open-search-document<\/code> folder to <code>\/wp-content\/plugins\/<\/code><\/li>\n<li>Activate it through the <em>Plugins<\/em> menu<\/li>\n<li>That's it, there are no settings<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"how%20do%20i%20check%20that%20it%20works%3F\"><h3>How do I check that it works?<\/h3><\/dt>\n<dd><p>Open <code>https:\/\/yoursite.com\/wp-json\/opensearch\/1.1\/document<\/code> in your browser. You should see a short XML file with the name of your site and the search URLs.<\/p><\/dd>\n<dt id=\"does%20it%20change%20the%20search%20on%20my%20site%3F\"><h3>Does it change the search on my site?<\/h3><\/dt>\n<dd><p>No. The plugin only describes the search you already have. The browser sends visitors to your normal search results page.<\/p><\/dd>\n<dt id=\"chrome%20does%20not%20offer%20my%20site%20for%20%22tab%20to%20search%22\"><h3>Chrome does not offer my site for \"Tab to Search\"<\/h3><\/dt>\n<dd><p>Chrome no longer adds sites on its own. Go to <code>chrome:\/\/settings\/searchEngines<\/code>, look for your site under \"Inactive shortcuts\" and activate it. Edge works the same way under <code>edge:\/\/settings\/searchEngines<\/code>.<\/p><\/dd>\n<dt id=\"where%20do%20the%20suggestions%20come%20from%3F\"><h3>Where do the suggestions come from?<\/h3><\/dt>\n<dd><p>From your tags. Other plugins can change that with the <code>open_search_document_suggestions<\/code> filter.<\/p><\/dd>\n<dt id=\"can%20i%20add%20query%20params%20to%20the%20search%20urls%3F\"><h3>Can I add query params to the search URLs?<\/h3><\/dt>\n<dd><p>Yes, with the <code>osd_search_url_template<\/code> filter. The second argument tells you which search URL is filtered: <code>html<\/code>, <code>atom<\/code> or <code>rss2<\/code>.<\/p>\n\n<pre><code>function custom_osd_extend( $url, $type ) {\n    return add_query_arg( 'mtm_campaign', 'opensearch', $url );\n}\nadd_filter( 'osd_search_url_template', 'custom_osd_extend', 10, 2 );\n<\/code><\/pre><\/dd>\n<dt id=\"what%20are%20the%20tags%20in%20the%20document%3F\"><h3>What are the tags in the document?<\/h3><\/dt>\n<dd><p>The <code>Tags<\/code> element lists the ten most used tags of your site, as keywords for the search engine. Sites without tags get <code>WordPress blog<\/code>. The <code>osd_tags<\/code> filter lets you change the list.<\/p><\/dd>\n<dt id=\"can%20i%20add%20more%20elements%20to%20the%20document%3F\"><h3>Can I add more elements to the document?<\/h3><\/dt>\n<dd><p>Yes. The <code>osd_xml<\/code> action runs inside the document, right before the closing tag. The <code>osd_ns<\/code> action lets you add namespaces to the root element.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h3>4.2.0<\/h3>\n\n<ul>\n<li>The REST controller extends the WordPress <code>WP_REST_Controller<\/code> class<\/li>\n<li>Search suggestions keep spaces and upper case letters in the query<\/li>\n<li>The document no longer has a stray <code>null<\/code> at the end<\/li>\n<li>Site name, description and URLs are escaped for XML<\/li>\n<li>The suggestions URL has <code>rel=\"suggestions\"<\/code> and the document links to itself with <code>rel=\"self\"<\/code><\/li>\n<li>Site icons carry their MIME type<\/li>\n<li>The <code>Tags<\/code> element lists the most used tags of the site, filterable with <code>osd_tags<\/code><\/li>\n<li>Removed the <code>Contact<\/code> element, the spec expects an email address there<\/li>\n<li>Removed the <code>Developer<\/code> element<\/li>\n<li>Removed the XRDS-Simple integration, the plugin is closed on WordPress.org<\/li>\n<li><code>url_template()<\/code> and <code>feed_url_template()<\/code> are deprecated, use <code>get_url_template()<\/code><\/li>\n<li>Requires WordPress 6.4 and PHP 7.4<\/li>\n<li>Added tests and a new readme<\/li>\n<\/ul>\n\n<h3>4.1.3<\/h3>\n\n<ul>\n<li>update plugin structure<\/li>\n<\/ul>\n\n<h3>4.1.1<\/h3>\n\n<ul>\n<li>fix PHP deprecated: strstr(): Passing null to parameter<\/li>\n<\/ul>\n\n<h3>4.1.0<\/h3>\n\n<ul>\n<li>added <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Mozilla\/Add-ons\/WebExtensions\/manifest.json\/chrome_settings_overrides\">\"search_provider\" WebExtension<\/a> support<\/li>\n<\/ul>\n\n<h3>4.0.1<\/h3>\n\n<ul>\n<li>fix broken XML output<\/li>\n<\/ul>\n\n<h3>4.0.0<\/h3>\n\n<ul>\n<li>modernize code<\/li>\n<li>added filters for the search URLs in the OSD document<\/li>\n<\/ul>\n\n<h3>3.0.3<\/h3>\n\n<ul>\n<li>fix missing permission callback<\/li>\n<\/ul>\n\n<h3>3.0.2<\/h3>\n\n<ul>\n<li>update requirements<\/li>\n<\/ul>\n\n<h3>3.0.1<\/h3>\n\n<ul>\n<li>added screenshots<\/li>\n<li>code improvements<\/li>\n<\/ul>\n\n<h3>3.0.0<\/h3>\n\n<ul>\n<li>moved to WordPress API<\/li>\n<\/ul>\n\n<h3>2.1.2<\/h3>\n\n<ul>\n<li>fixed site icon implementation<\/li>\n<\/ul>\n\n<h3>2.1.1<\/h3>\n\n<ul>\n<li>fixed site icon implementation<\/li>\n<\/ul>\n\n<h3>2.1.0<\/h3>\n\n<ul>\n<li>fixed XML output<\/li>\n<li>encapsulated XML data<\/li>\n<\/ul>\n\n<h3>2.0.0<\/h3>\n\n<ul>\n<li>complete refactoring<\/li>\n<li>WordPress coding style<\/li>\n<li>Site icon support<\/li>\n<\/ul>\n\n<h3>1.3.1<\/h3>\n\n<ul>\n<li>Some smaller fixes<\/li>\n<\/ul>\n\n<h3>1.3<\/h3>\n\n<ul>\n<li>fixed host-meta link<\/li>\n<li>added webfinger support<\/li>\n<\/ul>\n\n<h3>1.2.2<\/h3>\n\n<ul>\n<li>Added function to flush rewrite_rules<\/li>\n<\/ul>\n\n<h3>1.2.1<\/h3>\n\n<ul>\n<li>Autodiscovery for host-meta<\/li>\n<\/ul>\n\n<h3>1.2<\/h3>\n\n<ul>\n<li>OpenSearch Suggestions extension<\/li>\n<\/ul>\n\n<h3>1.1<\/h3>\n\n<ul>\n<li>WordPress 2.8.x compatibility<\/li>\n<li>Autodiscovery for RSS\/Atom and XRDS<\/li>\n<li>Profile-Services<\/li>\n<\/ul>\n\n<h3>1.0<\/h3>\n\n<ul>\n<li>Initial release<\/li>\n<\/ul>","raw_excerpt":"Lets browsers search your site straight from the address bar.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/he.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/1856","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/he.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/he.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/he.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=1856"}],"author":[{"embeddable":true,"href":"https:\/\/he.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/pfefferle"}],"wp:attachment":[{"href":"https:\/\/he.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=1856"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/he.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=1856"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/he.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=1856"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/he.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=1856"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/he.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=1856"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/he.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=1856"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}