cmagnuson icon

Export site searches from Chrome

cmagnuson | PRO | 06/07/25 07:58:33 PM UTC (Edited) | 0 ⭐ | 189 👁️ | Never ⏰ | [chrome]
text |

1.14 KB

|

Software

|

0 👍

/

0 👎

//Navigate to chrome://settings/searchEngines, then run the following script in the Console tab of Developer Tools.
 (async function() {
  const { sendWithPromise } = await import('chrome://resources/js/cr.js');
  const data = await sendWithPromise('getSearchEnginesList');
  // Combine all categories: defaults, actives (site search), others, extensions
  const allEngines = [
    ...(data.defaults || []),
    ...(data.actives || []),   // Site Search entries
    ...(data.others || []),
    ...(data.extensions || [])
  ];
  // Extract only name and shortcut (keyword)
  const exportData = allEngines.map(e => ({
    name: e.name,
    shortcut: e.keyword,
    url: e.url
  }));
  // Download as JSON
  const blob = new Blob([JSON.stringify(exportData, null, 2)], { type: 'application/json' });
  const url = URL.createObjectURL(blob);
  const a = document.createElement('a');
  a.href = url;
  a.download = 'chrome_search_engines.json';
  document.body.appendChild(a);
  a.click();
  document.body.removeChild(a);
  URL.revokeObjectURL(url);
  console.log('Exported', exportData.length, 'search engines (including Site Search)');
})();

Comments