Settings

Theme

Show HN: HN Sentiment API – I ranked tech CEOs by how much you hate them

docs.hnpulse.com

27 points by kingofsunnyvale 6 months ago · 11 comments · 1 min read

Reader

I built an API that extracts entities from Hacker News comments and classifies sentiment towards them as positive, negative, or neutral. It also classifies overall comment sentiment and assigns each entity a label (person, location, date, technology, organization, other).

505k+ comments, Oct 31 - Present.

Here's the leaderboard:

LOVED:

- Steve Jobs: 44% positive, 7% negative

- Linus Torvalds: 43% positive, 5% negative

- Gabe Newell: 34% positive, 8% negative

MID:

- Bill Gates: 22% positive, 8% negative

- Tim Cook: 15% positive, 30% negative

- Bezos: 12% positive, 18% negative

HATED:

- Zuckerberg: 4% positive, 35% negative

- Sam Altman: 8% positive, 38% negative

- Musk: 5% positive, 45% negative

Try it yourself:

# Who does HN talk about the most?

curl "https://api.hnpulse.com/entities?label=person&sort=mentions"

# What are people saying about remote work?

curl "https://api.hnpulse.com/comments?entity=remote work&limit=3"

# Is OpenAI's reputation getting worse?

curl "https://api.hnpulse.com/trends?entity=openai&bucket=day"

# What technology gets mentioned alongside SF?

curl "https://api.hnpulse.com/entities?co-occur=SF&label=technolog..."

Stack: Go, PostgreSQL, GPT-4o mini for entity extraction

Docs: https://docs.hnpulse.com API: https://api.hnpulse.com

verdverm 6 months ago

Very neat, I want to do something similar with my own comments, to see how I interact online and get the Ai to nudge me to better communications

Do you have a ballpark figure for how many tokens or dollars the analysis took?

  • kingofsunnyvaleOP 6 months ago

    It took 663,164,426 tokens and $238.21.

    • verdverm 6 months ago

      that's... not terrible, thanks for sharing

      I'd certainly be willing to spend a few hundred dollars organizing and annotating my collection of HN upvotes, chrome bookmarks, and social posts

smt88 6 months ago

You're losing a lot from the binary here. Tim Cook isn't loved, sure, but it's rare to see someone rant about him the way they might about Bezos or Gates('s era of Microsoft)

rsynnott 6 months ago

Kind of surprised about Bezos, though I suppose he lacks the extreme publicity seeking tendencies of the most-disliked.

  • kingofsunnyvaleOP 6 months ago

    Lately, I've been playing around with giving the API to claude-code to perform a sort of automated analysis of HN; this is what it says:

    Analysis: Why Bezos Has Less Negative Sentiment

      The Numbers
    
      | Person     | Negative Sentiment | Total Mentions |
      |------------|--------------------|----------------|
      | Bezos      | 18-26%             | ~169           |
      | Zuckerberg | 35%                | ~201           |
      | Sam Altman | 38-43%             | ~501           |
      | Musk       | 39-45%             | ~1,119         |
    
      Bezos has roughly half the negative sentiment of the others AND is discussed 6-7x less than Musk.
    
      Your Hypothesis is Correct—But There's More
    
      1. Bezos is largely "retired" from controversy
    
      He stepped down as Amazon CEO in 2021. When he's mentioned on HN, it's mostly:
      - As a reference point for billionaire wealth alongside others ("Bezos/Musk/Ellison-type...")
      - Historical Amazon criticism ("Legacy of Bezos", "Day Two")
      - Generic billionaire tax discussions
    
      2. The others are making active, controversial decisions RIGHT NOW
    
      The co-occurrence data reveals what each person is discussed alongside:
    
      | Person     | Top Co-occurring Topics                           |
      |------------|---------------------------------------------------|
      | Musk       | Trump (61), Tesla, Twitter, DOGE (22), SpaceX     |
      | Altman     | OpenAI, ChatGPT, AGI, AI hype                     |
      | Zuckerberg | Facebook, Meta, Trump, censorship                 |
      | Bezos      | Amazon, Gates, other billionaires (as comparison) |
    
      3. Current actions generate current anger
    
      Looking at the negative comments:
      - Musk: "conman and liar", DOGE failures, political interference
      - Altman: "Scam Altman", AI resource hoarding, nonprofit betrayal
      - Zuckerberg: Censorship decisions, "kissing Trump admin's ring", Meta's social harm
      - Bezos: Mostly legacy Amazon issues or generic wealth criticism
    
      Conclusion
    
      It's not just that Bezos "seeks publicity less"—it's that he's not actively making decisions that affect the HN community. The others are:
    
      - Musk: Running Twitter/X (where many HN users are), advising Trump on government cuts
      - Altman: At the center of AI development that directly impacts tech workers
      - Zuckerberg: Making platform moderation decisions affecting global speech
    
      Bezos owns a newspaper and a space company but isn't making daily choices that intersect with tech workers' lives. He's transitioned from "active villain" to "historical reference."
dzrmb 6 months ago

Cool project! I'll definitely give it a go. Btw, did you use Elysia by any chance?

gigatexal 6 months ago

What? DHH needs to be up there with Elon. SMH.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection