{"id":29607451,"url":"https://github.com/arjunsajeev/node-hn-api","last_synced_at":"2025-08-05T12:05:26.002Z","repository":{"id":24454131,"uuid":"101563215","full_name":"arjunsajeev/node-hn-api","owner":"arjunsajeev","description":"A promise based wrapper for the Firebase Hacker News API","archived":false,"fork":false,"pushed_at":"2025-05-17T16:19:57.000Z","size":381,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-20T18:08:22.940Z","etag":null,"topics":["hackernews","hackernews-api","node","wrapper"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/arjunsajeev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-08-27T15:53:47.000Z","updated_at":"2024-07-19T02:29:08.000Z","dependencies_parsed_at":"2023-01-14T07:45:52.132Z","dependency_job_id":null,"html_url":"https://github.com/arjunsajeev/node-hn-api","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/arjunsajeev/node-hn-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arjunsajeev%2Fnode-hn-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arjunsajeev%2Fnode-hn-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arjunsajeev%2Fnode-hn-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arjunsajeev%2Fnode-hn-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arjunsajeev","download_url":"https://codeload.github.com/arjunsajeev/node-hn-api/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arjunsajeev%2Fnode-hn-api/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268893472,"owners_count":24324663,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-05T02:00:12.334Z","response_time":2576,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hackernews","hackernews-api","node","wrapper"],"created_at":"2025-07-20T18:02:58.311Z","updated_at":"2025-08-05T12:05:25.991Z","avatar_url":"https://github.com/arjunsajeev.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# node-hn-api [![Build Status](https://travis-ci.org/arjunsajeev/node-hn-api.svg?branch=master)](https://travis-ci.org/arjunsajeev/node-hn-api) [![npm](https://img.shields.io/npm/v/node-hn-api.svg?maxAge=3600)](https://www.npmjs.com/package/node-hn-api) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)\n\nA promise based wrapper for the\n[Firebase Hacker News API](https://github.com/HackerNews/API)\n\n## Installation\n\n```sh\nnpm i node-hn-api\n```\n\n## Usage\n\n```js\nconst hn = require('node-hn-api');\nhn.fetchTopStories(5)\n  .then((topStories) =\u003e {\n    //..\n  })\n  .catch((err) =\u003e {\n    console.error(err);\n  });\n```\n\n## API\n\n### fetchItem(itemId) - Fetch Hacker News [Item](https://github.com/HackerNews/API) data\n\nReturns a promise\n\n### fetchUser(userId) - Fetch Hacker News [User](https://github.com/HackerNews/API#users) data\n\nReturns a promise\n\n### fetchTopStories([numberOfStories]) - Fetch Hacker News [Top Stories](https://github.com/HackerNews/API#new-top-and-best-stories) data\n\nReturns a promise\n\n#### numberOfStories - number\n\nNumber of records to fetch\n\n### fetchNewStories([numberOfStories]) - Fetch Hacker News [New Stories](https://github.com/HackerNews/API#new-top-and-best-stories) data\n\nReturns a promise\n\n#### numberOfStories - number\n\nNumber of records to fetch\n\n### fetchBestStories([numberOfStories]) - Fetch Hacker News [Best Stories](https://github.com/HackerNews/API#new-top-and-best-stories) data\n\nReturns a promise\n\n#### numberOfStories - number\n\nNumber of records to fetch\n\n### fetchAskStories([numberOfStories]) - Fetch [Ask Hacker News Stories](https://github.com/HackerNews/API#ask-show-and-job-stories) data\n\nReturns a promise\n\n#### numberOfStories - number\n\nNumber of records to fetch\n\n### fetchShowStories([numberOfStories]) - Fetch [Show Hacker News Stories](https://github.com/HackerNews/API#ask-show-and-job-stories) data\n\nReturns a promise\n\n#### numberOfStories - number\n\nNumber of records to fetch\n\n### fetchJobStories([numberOfStories]) - Fetch Hacker News [Job Stories](https://github.com/HackerNews/API#ask-show-and-job-stories) data\n\nReturns a promise\n\n#### numberOfStories - number\n\nNumber of records to fetch\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farjunsajeev%2Fnode-hn-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farjunsajeev%2Fnode-hn-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farjunsajeev%2Fnode-hn-api/lists"}