They have a public API. Also I've been using this:
https://github.com/BScoresby/sn-payment-statsHere is some slop my AI produced concerning the API:
- The backend is a GraphQL API, served at
https://stacker.news/api/graphql. The README confirms the backend API is provided via GraphQL, with a PostgreSQL database modeled with Prisma.
github
- The actual API implementation (queries, mutations, resolvers) lives in the /api folder of the repo, with GraphQL query/mutation fragments in /fragments.
- API keys: Stacker News added user-generated API keys as an auth method (referenced in a security advisory about how they're stored/hashed), so authenticated requests can be made without a session cookie.
- There's also a third-party Go client package (ekzyis/sn-goapi, on pkg.go.dev) that documents the practical shape of the API β it hits SnApiUrl = "
https://stacker.news/api/graphql" and wraps functions like CreateComment, PostLink, Dupes, CheckNotifications, using GraphQLPayload/GraphQLError types. That's a decent unofficial reference for how requests/responses are structured even though it's not from the Stacker News team itself.