Engineering

OneSignal Builds Hacker News Notifications With a Little Help From Algolia
facebooklinkedintwittermail

The Algolia community is one of our strongest assets, and we love when customers tackle projects with our technology in unexpected ways. OneSignal recently reached out to us to share how they used Algolia’s Hacker News Search API to create a demo of their notification platform, and it’s pretty awesome. OneSignal CEO George Deglin joins us for a guest post to explain how they used Algolia to spread the word on the capabilities of Web Push and OneSignal.


At OneSignal, we help mobile and web developer send smarter and more effective push notifications to their users. Our tools make it easy for developers to schedule, localize, A/B test, and monitor the notifications they send.

In late 2014, the World Wide Web Consortium published a Recommendation of HTML5. Among many impressive features, the one that stood out the most to us was Web Push notifications. Finally, web developers were being given a much better alternative to e-mail for re-engaging their visitors.

Earlier this year, Google Chrome was the first browser to publicly launch Web Push support. We were right there with them, announcing our support for this new technology just days later.

We knew we couldn’t simply launch and wait for clients to sign up. Nearly every developer we talked to had no idea that websites could even send push notifications now. We had to find an effective way to demonstrate our technology to thousands of web developers at once, and there’s no better place to do that than Hacker News.

To get upvotes on Hacker News, we’d have to create a demonstration that appealed to readers and wasn’t self-promotional fluff. With the help of Algolia, we found a perfect solution.

Instead of simply talking about our launch of Web Push support, we built a demo that provides real value to Hacker News readers.

We stumbled upon Algolia’s easy-to-use Hacker News Search API after seeking out an easy way to identify trending Hacker News Stories. Next, we created an Algolia query to identify Hacker News stories that received over 250 upvotes. Finally, we would use Web Push to deliver notifications of these stories to users who visited the site and opted-in. Simply by combining the two with a script that would run every 5 minutes, we had built a push notification system for Hacker News that required nothing but the Chrome web browser!

For the developers out there, here’s the code we used.

Our efforts were a success! After posting the story on Hacker News, it quickly received enough upvotes to briefly trend on the front page. Thousands of developers learned about the potential of Web Push and how OneSignal can help them get started with it.

Find the right tutorial for your needs

About the authorGuillaume Dumortier

Guillaume Dumortier

Recommended Articles

Powered by Algolia AI Recommendations

New experimental version of Hacker News Search built with Algolia
Product

New experimental version of Hacker News Search built with Algolia

kevin

kevin

API Documentation 2.0: From Browsing to Search
Product

API Documentation 2.0: From Browsing to Search

Peter Villani

Peter Villani

Sr. Tech & Business Writer
Introducing our new navigation
Product

Introducing our new navigation

Craig Williams

Craig Williams

Director of Product Design & Research