{
  "openapi": "3.0.1",
  "info": {
    "title": "Hacker News Scraper – Stories, Comments & Who Is Hiring Jobs",
    "description": "Hacker News scraper: search stories and comments by keyword, points and date, get top/new/best/Ask HN/Show HN/job lists, full comment threads (flattened with depth and parentId), user profiles and parsed 'Ask HN: Who is hiring?' job posts. Official HN APIs, no login.",
    "version": "1.0",
    "x-build-id": "0AJ2LdbernARKRmJw"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/openharvest~hacker-news-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-openharvest-hacker-news-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/openharvest~hacker-news-scraper/runs": {
      "post": {
        "operationId": "runs-sync-openharvest-hacker-news-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/openharvest~hacker-news-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-openharvest-hacker-news-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "list",
              "item",
              "whoIsHiring",
              "user"
            ],
            "type": "string",
            "description": "<b>search</b> = keyword search over stories/comments (Algolia). <b>list</b> = current top/new/best/Ask/Show/job lists. <b>item</b> = specific stories with their full comment thread. <b>whoIsHiring</b> = parsed job posts from the monthly 'Ask HN: Who is hiring?' thread. <b>user</b> = user profiles.",
            "default": "search"
          },
          "searchQuery": {
            "title": "Search query",
            "type": "string",
            "description": "Mode <b>search</b>: keywords to search for, e.g. <code>AI agents</code>, <code>rust</code>, <code>postgres</code>. Leave empty to browse by the filters below."
          },
          "searchType": {
            "title": "Search in",
            "enum": [
              "story",
              "comment",
              "ask_hn",
              "show_hn",
              "job",
              "poll",
              "front_page",
              "all"
            ],
            "type": "string",
            "description": "Mode <b>search</b>: what to search.",
            "default": "story"
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "relevance",
              "date"
            ],
            "type": "string",
            "description": "Mode <b>search</b>: <code>relevance</code> (popular first, max 1,000 results) or <code>date</code> (newest first, no result cap).",
            "default": "relevance"
          },
          "minPoints": {
            "title": "Minimum points",
            "minimum": 0,
            "type": "integer",
            "description": "Modes <b>search</b> and <b>list</b>: only stories with at least this many points.",
            "default": 0
          },
          "minComments": {
            "title": "Minimum comments",
            "minimum": 0,
            "type": "integer",
            "description": "Mode <b>search</b>: only stories with at least this many comments.",
            "default": 0
          },
          "onlyNewerThan": {
            "title": "Only newer than",
            "type": "string",
            "description": "Modes <b>search</b> and <b>list</b>: skip items older than this. Absolute date (YYYY-MM-DD) or relative period like <code>7 days</code>, <code>1 month</code>."
          },
          "author": {
            "title": "Author",
            "type": "string",
            "description": "Mode <b>search</b>: only items posted by this HN username."
          },
          "listType": {
            "title": "List",
            "enum": [
              "top",
              "new",
              "best",
              "ask",
              "show",
              "job"
            ],
            "type": "string",
            "description": "Mode <b>list</b>: which Hacker News list to read (same order as on the site).",
            "default": "top"
          },
          "itemIds": {
            "title": "Story IDs or URLs",
            "type": "array",
            "description": "Mode <b>item</b>: Hacker News item IDs or URLs like <code>https://news.ycombinator.com/item?id=8863</code>. Returns the item plus its whole comment thread, flattened with <code>depth</code> and <code>parentId</code>.",
            "items": {
              "type": "string"
            }
          },
          "includeComments": {
            "title": "Include comments of each story",
            "type": "boolean",
            "description": "Modes <b>search</b> and <b>list</b>: after each story, also return its comments (each comment is one charged item). Mode <b>item</b> always includes comments.",
            "default": false
          },
          "maxCommentsPerStory": {
            "title": "Max comments per story",
            "minimum": 0,
            "type": "integer",
            "description": "Limit the number of comments per story (threads are walked depth-first in Hacker News order). 0 = all comments.",
            "default": 100
          },
          "maxCommentDepth": {
            "title": "Max comment depth",
            "minimum": 0,
            "type": "integer",
            "description": "1 = only top-level comments, 2 = plus direct replies, ... 0 = unlimited.",
            "default": 0
          },
          "hiringMonth": {
            "title": "Who is hiring: month",
            "type": "string",
            "description": "Mode <b>whoIsHiring</b>: thread month as <code>YYYY-MM</code> (e.g. <code>2026-10</code>). Leave empty for the latest thread."
          },
          "hiringKeyword": {
            "title": "Who is hiring: keywords",
            "type": "string",
            "description": "Mode <b>whoIsHiring</b>: only job posts containing all these words (case-insensitive), e.g. <code>rust</code>, <code>python berlin</code>."
          },
          "remoteOnly": {
            "title": "Who is hiring: remote only",
            "type": "boolean",
            "description": "Mode <b>whoIsHiring</b>: only job posts detected as remote-friendly.",
            "default": false
          },
          "includeNonJobComments": {
            "title": "Who is hiring: keep non-job comments",
            "type": "boolean",
            "description": "Mode <b>whoIsHiring</b>: also return top-level comments that don't look like job posts (meta discussion). Off by default.",
            "default": false
          },
          "usernames": {
            "title": "Usernames",
            "type": "array",
            "description": "Mode <b>user</b>: Hacker News usernames or profile URLs. Returns karma, account creation date, bio and submission count.",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum number of items (stories, comments, job posts or users) in total. You pay per item, so this also caps your cost.",
            "default": 100
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}