Hacker News new | ask | show | jobs
by rickdeveloper 1629 days ago
Glad you're interested in the source code!

As explained in my other comment, this website is a wrapper around google programmable search. The actual searching happens on Google servers, and I can see why people have problems with that. The code you see on the website is the same as the repo, though. It's actually hosted by GitHub! You can verify this by opening the web inspector in any browser or looking at the `.github.io` portion of the URL.

You can learn more about Programmable Search here: https://developers.google.com/custom-search/docs/overview. NoTrashSearch uses the 'Programmable Search Element Control API', which is documented here: https://developers.google.com/custom-search/docs/element and can be used with very little code!

1 comments

I think your site is great, I've thought about something like this before but didn't realize how simply it could be implemented.

Stupid question though: where is the list of whitelisted sites? Is that something you set up separately with google? I scanned though the code and expected to find a list somewhere, but obviously you do it in a different way

Thanks! Yes, it's configurable in a private dashboard.

I created a pastebin with all sites at the time of writing this comment if that's helpful: https://pastebin.com/qLC0wQ0t. If you're looking to create your own search engine, go here: https://programmablesearchengine.google.com/cse/all.

Yes thank you, this is helpful! I think the list of sites that are included is the most important information you can provide about the project