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-07-20 06:58:47
最后一次提交2025-02-20 23:13:42
發布數0
用户参与
星數343
關注者數5
派生數42
提交數384
已啟用問題?
問題數18
打開的問題數3
拉請求數11
打開的拉請求數14
關閉的拉請求數6
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?