cmagnuson

Export site searches from Chrome

Jun 7th, 2025 (edited)
246
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.14 KB | Software | 0 0
  1. //Navigate to chrome://settings/searchEngines, then run the following script in the Console tab of Developer Tools.
  2.  
  3. (async function() {
  4. const { sendWithPromise } = await import('chrome://resources/js/cr.js');
  5. const data = await sendWithPromise('getSearchEnginesList');
  6. // Combine all categories: defaults, actives (site search), others, extensions
  7. const allEngines = [
  8. ...(data.defaults || []),
  9. ...(data.actives || []), // Site Search entries
  10. ...(data.others || []),
  11. ...(data.extensions || [])
  12. ];
  13. // Extract only name and shortcut (keyword)
  14. const exportData = allEngines.map(e => ({
  15. name: e.name,
  16. shortcut: e.keyword,
  17. url: e.url
  18. }));
  19. // Download as JSON
  20. const blob = new Blob([JSON.stringify(exportData, null, 2)], { type: 'application/json' });
  21. const url = URL.createObjectURL(blob);
  22. const a = document.createElement('a');
  23. a.href = url;
  24. a.download = 'chrome_search_engines.json';
  25. document.body.appendChild(a);
  26. a.click();
  27. document.body.removeChild(a);
  28. URL.revokeObjectURL(url);
  29. console.log('Exported', exportData.length, 'search engines (including Site Search)');
  30. })();
Tags: chrome
Advertisement
Add Comment
Please, Sign In to add comment