HackerNews GPT
HackerNews GPT · GPT アクション
Hacker News API
GET /item/{id}.jsongetItemByIdRetrieve details for a specific item by its unique id.
GET /user/{id}.jsongetUserByIdRetrieve details for a specific user by their unique username.
GET /maxitem.jsongetMaxItemIdGet the current largest item id.
GET /topstories.jsongetTopStoriesRetrieve up to 500 top and new stories, including jobs.
GET /newstories.jsongetNewStoriesRetrieve up to 500 new stories. Returns a list of ids; use getItemById to get details.
GET /beststories.jsongetBestStoriesRetrieve up to 500 best stories. Returns a list of ids; use getItemById to get details.
GET /askstories.jsongetAskStoriesRetrieve up to 200 latest Ask HN stories. Returns a list of ids; use getItemById to get details.
GET /showstories.jsongetShowStoriesRetrieve up to 200 latest Show HN stories. Returns a list of ids; use getItemById to get details.
GET /jobstories.jsongetJobStoriesRetrieve up to 200 latest job stories. Returns a list of ids; use getItemById to get details.
GET /updates.jsongetUpdatesRetrieve the latest changes in items and profiles.
元の API スキーマ
{
"openapi": "3.1.0",
"info": {
"title": "Hacker News API",
"version": "v0"
},
"servers": [
{
"url": "https://hacker-news.firebaseio.com/v0/"
}
],
"paths": {
"/item/{id}.json": {
"get": {
"description": "Retrieve details for a specific item by its unique id.",
"operationId": "getItemById",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"description": "Unique identifier of the item",
"schema": {
"type": "integer"
}
}
]
}
},
"/user/{id}.json": {
"get": {
"description": "Retrieve details for a specific user by their unique username.",
"operationId": "getUserById",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"description": "Unique username of the user",
"schema": {
"type": "string"
}
}
]
}
},
"/maxitem.json": {
"get": {
"description": "Get the current largest item id.",
"operationId": "getMaxItemId"
}
},
"/topstories.json": {
"get": {
"description": "Retrieve up to 500 top and new stories, including jobs.",
"operationId": "getTopStories",
"parameters": [
{
"name": "limitToFirst",
"in": "query",
"description": "Limits the number of top stories returned.",
"schema": {
"type": "integer"
}
},
{
"name": "orderBy",
"in": "query",
"description": "Order the results by a specified JSON path.",
"schema": {
"type": "string",
"enum": [
"\"$priority\""
]
}
}
]
}
},
"/newstories.json": {
"get": {
"description": "Retrieve up to 500 new stories. Returns a list of ids; use getItemById to get details.",
"operationId": "getNewStories",
"parameters": [
{
"name": "limitToFirst",
"in": "query",
"description": "Limits the number of new stories returned.",
"schema": {
"type": "integer"
}
},
{
"name": "orderBy",
"in": "query",
"description": "Order the results by a specified JSON path.",
"schema": {
"type": "string",
"enum": [
"\"$priority\""
]
}
}
]
}
},
"/beststories.json": {
"get": {
"description": "Retrieve up to 500 best stories. Returns a list of ids; use getItemById to get details.",
"operationId": "getBestStories",
"parameters": [
{
"name": "limitToFirst",
"in": "query",
"description": "Limits the number of best stories returned.",
"schema": {
"type": "integer"
}
},
{
"name": "orderBy",
"in": "query",
"description": "Order the results by a specified JSON path.",
"schema": {
"type": "string",
"enum": [
"\"$priority\""
]
}
}
]
}
},
"/askstories.json": {
"get": {
"description": "Retrieve up to 200 latest Ask HN stories. Returns a list of ids; use getItemById to get details.",
"operationId": "getAskStories",
"parameters": [
{
"name": "limitToFirst",
"in": "query",
"description": "Limits the number of Ask HN stories returned.",
"schema": {
"type": "integer"
}
},
{
"name": "orderBy",
"in": "query",
"description": "Order the results by a specified JSON path.",
"schema": {
"type": "string",
"enum": [
"\"$priority\""
]
}
}
]
}
},
"/showstories.json": {
"get": {
"description": "Retrieve up to 200 latest Show HN stories. Returns a list of ids; use getItemById to get details.",
"operationId": "getShowStories",
"parameters": [
{
"name": "limitToFirst",
"in": "query",
"description": "Limits the number of Show HN stories returned.",
"schema": {
"type": "integer"
}
},
{
"name": "orderBy",
"in": "query",
"description": "Order the results by a specified JSON path.",
"schema": {
"type": "string",
"enum": [
"\"$priority\""
]
}
}
]
}
},
"/jobstories.json": {
"get": {
"description": "Retrieve up to 200 latest job stories. Returns a list of ids; use getItemById to get details.",
"operationId": "getJobStories",
"parameters": [
{
"name": "limitToFirst",
"in": "query",
"description": "Limits the number of job stories returned.",
"schema": {
"type": "integer"
}
},
{
"name": "orderBy",
"in": "query",
"description": "Order the results by a specified JSON path.",
"schema": {
"type": "string",
"enum": [
"\"$priority\""
]
}
}
]
}
},
"/updates.json": {
"get": {
"description": "Retrieve the latest changes in items and profiles.",
"operationId": "getUpdates"
}
}
},
"components": {
"schemas": {
"Item": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "The item's unique id."
},
"deleted": {
"type": "boolean",
"description": "True if the item is deleted."
},
"type": {
"type": "string",
"description": "The type of item. One of 'job', 'story', 'comment', 'poll', or 'pollopt'."
},
"by": {
"type": "string",
"description": "The username of the item's author."
},
"time": {
"type": "integer",
"description": "Creation date of the item, in Unix Time."
},
"text": {
"type": "string",
"description": "The comment, story or poll text. HTML."
},
"dead": {
"type": "boolean",
"description": "True if the item is dead."
},
"parent": {
"type": "integer",
"description": "The comment's parent: either another comment or the relevant story."
},
"poll": {
"type": "integer",
"description": "The pollopt's associated poll."
},
"kids": {
"type": "array",
"items": {
"type": "integer"
},
"description": "The ids of the item's comments, in ranked display order."
},
"url": {
"type": "string",
"description": "The URL of the story."
},
"score": {
"type": "integer",
"description": "The story's score, or the votes for a pollopt."
},
"title": {
"type": "string",
"description": "The title of the story, poll or job. HTML."
},
"parts": {
"type": "array",
"items": {
"type": "integer"
},
"description": "A list of related pollopts, in display order."
},
"descendants": {
"type": "integer",
"description": "In the case of stories or polls, the total comment count."
}
},
"required": [
"id",
"type",
"by",
"time"
]
},
"User": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "The user's unique username. Case-sensitive."
},
"created": {
"type": "integer",
"description": "Creation date of the user, in Unix Time."
},
"karma": {
"type": "integer",
"description": "The user's karma."
},
"about": {
"type": "string",
"description": "The user's optional self-description. HTML."
},
"submitted": {
"type": "array",
"items": {
"type": "integer"
},
"description": "List of the user's stories, polls and comments."
}
},
"required": [
"id"
]
}
}
}
}