FlareStart
HomeNewsHow ToSources
FlareStart

Where developers start their day. All the tech news & tutorials that matter, in one place.

Quick Links

  • Home
  • News
  • Tutorials
  • Sources
  • Privacy Policy

Connect

© 2026 FlareStart. All rights reserved.

Back to articles
Why I Stopped Using the Hacker News API Directly (and What I Use Instead)
NewsSecurity

Why I Stopped Using the Hacker News API Directly (and What I Use Instead)

via Dev.to TutorialFairPrice2w ago

I've been pulling data from Hacker News for over a year. I started where everyone starts: the official Firebase API. And for about two weeks, it was fine. Then reality set in. The problem with the HN API The Hacker News API is technically correct. It returns items by ID. It returns top story IDs. It does what it says. But if you want to do anything practical — like get the top 50 stories with their comment counts, scores, and metadata in a single call — you're looking at 51 HTTP requests minimum . One for the top stories list, then one per story. Here's what that looks like in Python: import requests def get_top_stories ( n = 50 ): top_ids = requests . get ( ' https://hacker-news.firebaseio.com/v0/topstories.json ' ). json ()[: n ] stories = [] for story_id in top_ids : item = requests . get ( f ' https://hacker-news.firebaseio.com/v0/item/ { story_id } .json ' ). json () stories . append ( item ) return stories This works. It's also painfully slow. On a good day, you're waiting 8-12 s

Continue reading on Dev.to Tutorial

Opens in a new tab

Read Full Article
18 views

Related Articles

This HP gaming laptop just dropped under $1,000 - a rarity during the RAM-pocalypse
News

This HP gaming laptop just dropped under $1,000 - a rarity during the RAM-pocalypse

ZDNet • 1d ago

Galaxy Watch users in the US can finally track their blood pressure - here's what you need
News

Galaxy Watch users in the US can finally track their blood pressure - here's what you need

ZDNet • 1d ago

Your Mac Came With the Wrong Apps. These 7 Fix That
News

Your Mac Came With the Wrong Apps. These 7 Fix That

Medium Programming • 1d ago

Why You Start Projects but Never Finish Them
News

Why You Start Projects but Never Finish Them

Medium Programming • 1d ago

FedEx chooses partnerships over proprietary tech for its automation strategy
News

FedEx chooses partnerships over proprietary tech for its automation strategy

TechCrunch • 1d ago

Discover More Articles