Earlier quoted context omitted.
Algolia and HackterNews (Y Combinator) are two different parties. Algolia implemented the HackerNews API (which is based on Firebase). Agolia uses their JavaScript library to enhance the user experience (for near instant search results).
General commentary based on your use of the words “enhance” and “near instant”: Especially in places of higher latency (e.g. Australia), using JavaScript for things like this does not enhance the user experience, but rather increases the delay, because additional round trips are required, especially when it’s over TLS on a different host as in this case. On a good connection at these latencies (~300ms), these near in…
Algola has something they call a DSN that runs your search backed all over the word. So you have good latency's. [https://www.algolia.com/infra]
Additionally you could bundle only what you use in there library to make the page lighter.