> This article is also available in HTML at: http://www.vincentbruijn.nl/articles/programmable-search-engine/
> For a full index of articles, see: http://www.vincentbruijn.nl/llms.txt

# Scoped web search results

- **Date**: 2022-11-17
- **Author**: Vincent Bruijn
- **Description**: The benefits of having a programmable search engine for filtered search results written by Vincent Bruijn
- **Keywords**: Vincent Bruijn, Google CSE, Programmable Search Engine

---

During programming I still need to look up a lot of implementation details of features I am using; it appears that I do not know many things by heart, obviously – unfortunately. How to settle a discussion about HTTP response codes when it comes to 422 versus 400, 401 or 403? I need to look that up... I am an avid user of the `MutationObserver` and the `IntersectionObserver`, but I find it hard to remember all methods and options. I need to look that up too!


So to RTFM I usually start with Google, as everybody knows: "Google is your friend". But the downside of Google is that I get too many search results... besides, I also get search results from websites I am not interested in. I haven't visited them often lately, but I have strong negative feelings about w3schools.com (I actually do not want to name them here). They are a Norwegian family (this is not a problem of course) – according to data from 2009, they still use the Verdana font on their website, and I was fed up with the way they presented their content. Besides, though their name suggests they have something to do with the w3c, they definitely do not.

![Search results](programmable-search-engine-results.png)

## Programmable Search Engine

This lead me to overthink my Google usage and so I decided to create a custom search engine, for myself, showing search results from what I think are valuable resources. Google has this feature and it is currently named [Programmable Search Engine](https://programmablesearchengine.google.com/about/), formerly known as Custom Search Engine! It is a tool to create a search engine that only returns matches from given websites. That sounds great! Now I can search resources I generally use, like MDN, Docker documentation, Caniuse and Stackoverflow!

![Search configuration](programmable-search-engine-config.png)

This Programmable Search Engine I created recently contains about a dozen websites. Some are related to 3rd parties from who we use a feature on www.g-star.com, others are generic programmer's websites. Of course, one might say: you miss valuable blog posts on certain topics, like this one, containing more specialistic information, but for the main direct knowledge I need, my brand new search engine will satisfy my wishes!

## NerdSearch

The good thing is that you can have a public URL for your Programmable Search Engine which you can bookmark and keep open in a pinned tab.

Even better, when you configure it in Google Chrome as separate Site Search entry named NerdSearch, with a shortcut, in my case "nerd", I only need to type "nerd" in the address bar, press the `tab` key and start typing my query. After hitting enter I land on my own privately scoped Google search result page, with results limited to the site I think are most valuable for this purpose! Saves me lots of time!

![NerdSearch](nerd-search.png)
