Currently reading: Stories of Your Life and Others by Ted Chiang

Declutter and de-AI Google search results

Back in May of 2024, Google silently added a way to get back to a list of search results like things used to be.

Forget AI. Google just created a version of its search engine free of all the extra junk it has added over the past decade-plus. All you have to do is add "udm=14" to the search URL.

This is a bit tedious, of course, so there are various ways around doing it manually outlined in that linked article. The simplest is to go to udm14.com and have its search box forward you to google.com with udm=14 in tow.

I didn't feel like doing that, nor did I want to attempt any of the browser-side stuff like custom search engines or extensions. I've been writing my own userscripts for years, however, so I went with that option.

Similar to udm14.com it forwards you along with the magic parameter in place. However, because it's a userscript running on google.com, it needs some guardrails lest it always forward you there ⸺ even when you don't want it to.

// There may be more disqualifiers for which you wouldn't want to redirect. I'll
// add to them the list as they come up.
if (
  window.location.href.indexOf('udm=') === -1 &&
  window.location.href.indexOf('tbs=') === -1 &&
  window.location.href.indexOf('source=lnms' === -1)
) {
  window.location.href = window.location.href + '&udm=14';
}

// Makes it so you can click the "All" link in case you want to see what the AI
// and/or info boxes are doing for your current search.
document.addEventListener('DOMContentLoaded', (e) => {
  // This "should" be the "All" link, but I suppose it's not guaranteed.
  const first = document.querySelector('a[href^="/search"][role="link"]');

  first.setAttribute('href', first.getAttribute('href') + '&udm=0');
});

Yes, my way is perhaps the most ham-fisted, but that's how it goes sometimes. The full code with the necessary headers is here.

Note: None of this improves the actual search results ⸺ it simply makes those same results look more like they used to. Between selling ads like they're going out business and hordes of sites gaming SEO for many years, google.com has simply gotten worse over the years.

Leave a comment

Your email address will not be published. Required fields are marked *