{
  "openapi": "3.0.1",
  "info": {
    "title": "Hacker News API: Stories, Comments, Search & Who's Hiring Jobs",
    "description": "Hacker News front page, search, full comment threads and structured jobs from the monthly \"Who is hiring?\" threads (company, role, location, remote, visa, salary). Official Firebase and Algolia APIs, no scraping or proxies. Monitor mode returns only new items.",
    "version": "0.1",
    "x-build-id": "7WbO2Qk7GC0a6ug6d"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/localwire~hacker-news/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-localwire-hacker-news",
        "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/localwire~hacker-news/runs": {
      "post": {
        "operationId": "runs-sync-localwire-hacker-news",
        "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/localwire~hacker-news/run-sync": {
      "post": {
        "operationId": "run-sync-localwire-hacker-news",
        "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": [
              "lists",
              "search",
              "comments",
              "whoIsHiring"
            ],
            "type": "string",
            "description": "What to fetch. \"lists\": front-page lists (top, new, best, Ask HN, Show HN, YC jobs). \"search\": full-text search of stories and comments. \"comments\": the whole comment thread of each story in \"storyIds\" (required in this mode). \"whoIsHiring\": structured jobs from the monthly \"Ask HN: Who is hiring?\" threads.",
            "default": "lists"
          },
          "lists": {
            "title": "Lists",
            "type": "array",
            "description": "Lists mode only. Which front-page lists to read: top, new, best, ask, show, job. A story that appears in several lists is returned once.",
            "items": {
              "type": "string",
              "enum": [
                "top",
                "new",
                "best",
                "ask",
                "show",
                "job"
              ],
              "enumTitles": [
                "Top stories (front page)",
                "Newest",
                "Best",
                "Ask HN",
                "Show HN",
                "YC job posts"
              ]
            },
            "default": [
              "top"
            ]
          },
          "maxItemsPerList": {
            "title": "Stories per list",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "How far down each list to read (the front page is the first 30).",
            "default": 30
          },
          "query": {
            "title": "Search query",
            "type": "string",
            "description": "Search mode only. Words to search for in titles, URLs, story text and comments, e.g. sqlite or \"vector database\". Leave empty to list everything in the date window."
          },
          "searchTypes": {
            "title": "Search in",
            "type": "array",
            "description": "What to return. Pick several to get any of them.",
            "items": {
              "type": "string",
              "enum": [
                "story",
                "comment",
                "ask_hn",
                "show_hn",
                "poll",
                "front_page"
              ],
              "enumTitles": [
                "Stories",
                "Comments",
                "Ask HN posts",
                "Show HN posts",
                "Polls",
                "Stories on the front page now"
              ]
            },
            "default": [
              "story"
            ]
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "relevance",
              "date"
            ],
            "type": "string",
            "description": "Search mode only. \"relevance\" (points and match quality) or \"date\" (newest first). Newest first can go past the 1,000-result limit of relevance search. Leave empty for the usual choice: relevance, or newest first when monitor mode is on."
          },
          "lastDays": {
            "title": "Last N days",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "Only items from the last N days. Ignored when 'From date' is set."
          },
          "dateFrom": {
            "title": "From date",
            "type": "string",
            "description": "Start of a date window, e.g. 2026-01-01."
          },
          "dateTo": {
            "title": "To date",
            "type": "string",
            "description": "End of the date window (inclusive), e.g. 2026-01-31."
          },
          "minPoints": {
            "title": "Minimum points",
            "minimum": 0,
            "type": "integer",
            "description": "Only stories with at least this many points (lists and search; comments have no public points)."
          },
          "minComments": {
            "title": "Minimum comments",
            "minimum": 0,
            "type": "integer",
            "description": "Only stories with at least this many comments (lists and search)."
          },
          "storyIds": {
            "title": "Stories",
            "type": "array",
            "description": "Comments mode only, and required there. Story ids or links like https://news.ycombinator.com/item?id=8863, one per line.",
            "items": {
              "type": "string"
            }
          },
          "includeStory": {
            "title": "Include the story itself",
            "type": "boolean",
            "description": "Also return the story record before its comments.",
            "default": false
          },
          "maxCommentsPerStory": {
            "title": "Comments per story",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Stop after this many comments for each story.",
            "default": 1000
          },
          "hiringMonths": {
            "title": "Months",
            "type": "array",
            "description": "Who is hiring? mode only. Which monthly threads to read, like 2026-11. Leave empty for the latest thread(s).",
            "items": {
              "type": "string"
            }
          },
          "hiringThreads": {
            "title": "Latest threads",
            "minimum": 1,
            "maximum": 24,
            "type": "integer",
            "description": "When no months are given, how many of the latest monthly threads to read.",
            "default": 1
          },
          "hiringKeywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Only posts that mention ANY of these words (company, roles, or text), e.g. rust, golang, data engineer.",
            "items": {
              "type": "string"
            }
          },
          "hiringLocations": {
            "title": "Locations",
            "type": "array",
            "description": "Only posts that name ANY of these places (office locations, remote region, or headline), e.g. London, Berlin, Europe.",
            "items": {
              "type": "string"
            }
          },
          "hiringRemoteOnly": {
            "title": "Remote only",
            "type": "boolean",
            "description": "Only posts that offer remote work.",
            "default": false
          },
          "hiringVisaOnly": {
            "title": "Visa sponsorship only",
            "type": "boolean",
            "description": "Only posts that say they sponsor visas.",
            "default": false
          },
          "onlyNew": {
            "title": "Only new items (monitor mode)",
            "type": "boolean",
            "description": "Return, and charge for, only items no earlier run with the same settings has returned. Ideal for scheduled alerts. The memory lives in your 'hacker-news-monitor' key-value store.",
            "default": false
          },
          "monitorKey": {
            "title": "Monitor name",
            "type": "string",
            "description": "Optional name for this monitor's memory. Runs with the same name share it; leave empty to keep one memory per set of settings."
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop after this many records in total (stories, comments and jobs together). Each record returned is charged once, so this is also the cost cap. 1000 when left out; the form starts at 100 so that a first run is small.",
            "default": 1000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}