HackerNews

FREE
By dimashirokov
Updated 5 months ago
News, Media
-/10
Popularity Score
-
Latency
-
Success Rate

HackerNews API Documentation

Get Hackernews stories across users and categories.

View API Details
POSTgetAskStories
POSTgetBestStories
POSTgetItem
POSTgetJobStories
POSTgetNewStories
POSTgetShowStories
POSTgetTopStories
POSTgetUpdates
POSTgetUser
POSTgetAskStories

Up to 200 of the latest Ask HN stories.

Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
Code Snippet
unirest.post("https://HackerNewsdimashirokovV1.p.rapidapi.com/getAskStories")
.header("X-RapidAPI-Host", "HackerNewsdimashirokovV1.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.header("Content-Type", "application/x-www-form-urlencoded")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
Sample Response
General
Request URL: https://HackerNewsdimashirokovV1.p.rapidapi.com/getAskStories
Request Method: POST
Response Headers
Response Body

Install SDK for NodeJS

Installing

To utilize unirest for node.js install the the npm module:

$ npm install unirest

After installing the npm package you can now start simplifying requests like so:

var unirest = require('unirest');

Creating Request

unirest.post("https://HackerNewsdimashirokovV1.p.rapidapi.com/getAskStories")
.header("X-RapidAPI-Host", "HackerNewsdimashirokovV1.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.header("Content-Type", "application/x-www-form-urlencoded")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
OAuth2 Authentication
Client ID
Client Secret
OAuth2 Authentication