node-hnapi

Unofficial Hacker News API

  • 所有者: cheeaun/node-hnapi
  • 平台:
  • 许可证:
  • 分类:
  • 主题:
  • 喜欢:
    0
      比较:

Github星跟踪图

Hacker News (unofficial) API

Yet another unofficial API for Hacker News. Currently being used by my other project. Feel free to fork and contribute.


☕️ Buy me a coffee ☕ (server, domain & maintenance)

Donate Buy me a coffee


? PLEASE READ THIS ?

If you are planning to scrape a huge amount of posts or (historical) data from HN, please don't use this API. Use the official Hacker News API or HN Search API instead.


Quick Start

  1. git clone this repo.
  2. cd to repo folder.
  3. Optionally download, install and start redis.
  4. yarn
  5. yarn start
  6. Load localhost:1337 in your web browser.

Example

http://api.hackerwebapp.com/news?page=2

Configuration

HNapi uses dotenv for configuration.

  • PORT - (default: 1337) Server port
  • CACHE_EXP - (default: 600) Cache expiry in seconds
  • LOG_REFERER - (default: false) Logs referers
  • LOG_USERAGENT - (default: false) Logs user-agent strings
  • CACHE_MEMORY - (default: true) Use in-memory caching
  • CACHE_STORE - (redis, default: none) Specify the cache store
  • CACHE_SERVER - HOST:PORT for Redis server

License

Licensed under the MIT License.

Other APIs

主要指标

概览
名称与所有者cheeaun/node-hnapi
主编程语言JavaScript
编程语言JavaScript (语言数: 1)
平台
许可证
所有者活动
创建于2011-10-31 01:17:15
推送于2025-02-20 15:14:14
最后一次提交2025-02-20 23:13:42
发布数0
用户参与
星数342
关注者数5
派生数42
提交数384
已启用问题?
问题数18
打开的问题数3
拉请求数11
打开的拉请求数13
关闭的拉请求数6
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?