{
  "openapi": "3.0.1",
  "info": {
    "title": "Hacker News Scraper: Stories, Comments & Who's Hiring Jobs",
    "description": "Scrape Hacker News with the official APIs: search stories and comments, export the front page and threads, parse Who is hiring job posts. Only-new monitoring, no API key.",
    "version": "0.1",
    "x-build-id": "jMAlKb5gVYjwqusZG"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/rod_analytics~hackernews-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-rod_analytics-hackernews-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/rod_analytics~hackernews-scraper/runs": {
      "post": {
        "operationId": "runs-sync-rod_analytics-hackernews-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/rod_analytics~hackernews-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-rod_analytics-hackernews-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",
              "frontPage",
              "thread",
              "whoIsHiring"
            ],
            "type": "string",
            "description": "search: stories and comments by keyword, date, points, author. frontPage: the live top, new, best, ask, show or job feed. thread: one or more stories with their comments. whoIsHiring: job posts of the monthly Who is hiring thread as structured rows. If you leave the mode empty, it is guessed from the other fields."
          },
          "queries": {
            "title": "Search queries",
            "type": "array",
            "description": "Search mode. Words to look for in titles, story text and comments. Each query runs on its own and the item budget is split between them. Leave empty to filter only by date, author, points or type. Algolia matches whole words, so \"scrap\" will not find \"scraping\".",
            "items": {
              "type": "string"
            }
          },
          "contentTypes": {
            "title": "Content types",
            "type": "array",
            "description": "What to search. Several types are combined with OR. Add \"Comments\" to find brand or product mentions inside discussions. Default: stories.",
            "items": {
              "type": "string",
              "enum": [
                "story",
                "comment",
                "show_hn",
                "ask_hn",
                "launch_hn",
                "poll",
                "job",
                "front_page"
              ],
              "enumTitles": [
                "Stories",
                "Comments",
                "Show HN",
                "Ask HN",
                "Launch HN",
                "Polls",
                "YC job ads",
                "Stories now on the front page"
              ]
            }
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "popularity",
              "date"
            ],
            "type": "string",
            "description": "popularity: best matches first, at most 1,000 hits per query. date: newest first, no limit on the number of hits. Only-new runs always use date."
          },
          "author": {
            "title": "Author",
            "type": "string",
            "description": "Only items by this Hacker News user, for example \"pg\" or \"dang\". Exact username."
          },
          "createdWithinDays": {
            "title": "Created within the last N days",
            "minimum": 0,
            "maximum": 36500,
            "type": "integer",
            "description": "Only items from the last N days. Ignored when \"Created after\" is set."
          },
          "createdAfter": {
            "title": "Created after",
            "type": "string",
            "description": "Only items created on or after this date (UTC)."
          },
          "createdBefore": {
            "title": "Created before",
            "type": "string",
            "description": "Only items created up to and including this date (UTC)."
          },
          "minPoints": {
            "title": "Minimum points",
            "minimum": 0,
            "type": "integer",
            "description": "Search and front page. Skip stories with fewer points. Comments have no points, so do not combine this with comment-only searches."
          },
          "minComments": {
            "title": "Minimum comments",
            "minimum": 0,
            "type": "integer",
            "description": "Search and front page. Skip stories with fewer comments."
          },
          "feed": {
            "title": "Feed",
            "enum": [
              "top",
              "new",
              "best",
              "ask",
              "show",
              "job"
            ],
            "type": "string",
            "description": "Front page mode. Which Hacker News list to read. Rank is the position in the feed."
          },
          "hiringMonth": {
            "title": "Hiring thread",
            "type": "string",
            "description": "Who is hiring mode. \"latest\", a month such as \"2026-09\" or \"September 2026\", or the URL or ID of a Who is hiring thread. Default: latest."
          },
          "jobKeywords": {
            "title": "Job keywords",
            "type": "array",
            "description": "Keep job posts that mention any of these words, for example \"python\" or \"rust\". Whole-word match, case-insensitive, searched in the whole post.",
            "items": {
              "type": "string"
            }
          },
          "jobLocations": {
            "title": "Job locations",
            "type": "array",
            "description": "Keep job posts whose location or header mentions any of these, for example \"Berlin\" or \"EU\".",
            "items": {
              "type": "string"
            }
          },
          "remoteOnly": {
            "title": "Remote only",
            "type": "boolean",
            "description": "Keep only job posts marked remote.",
            "default": false
          },
          "visaSponsorshipOnly": {
            "title": "Visa sponsorship only",
            "type": "boolean",
            "description": "Keep only job posts that offer visa sponsorship.",
            "default": false
          },
          "salaryOnly": {
            "title": "Salary stated only",
            "type": "boolean",
            "description": "Keep only job posts that state a salary.",
            "default": false
          },
          "storyUrls": {
            "title": "Story URLs or IDs",
            "type": "array",
            "description": "Thread mode. Hacker News links like https://news.ycombinator.com/item?id=8863 or plain item IDs. Each item is saved with its comments.",
            "items": {
              "type": "string"
            }
          },
          "includeComments": {
            "title": "Include comments",
            "type": "boolean",
            "description": "Search and front page. Also save the first comments of each story. Thread mode always saves comments. Each comment counts as one item.",
            "default": false
          },
          "commentDepth": {
            "title": "Comment depth",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "How many reply levels to save. 1 = top-level comments only. Default: 2."
          },
          "maxCommentsPerStory": {
            "title": "Max comments per story",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Stops the comments of one story after this many. Shallow comments are kept first. 0 saves only the story row in thread mode. Default: 500 in thread mode, 20 otherwise."
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stops after this many rows in total (stories, comments and jobs). Default: 30 for the front page, 1,000 in thread mode, 100 otherwise. With \"Only new\" on the front page, this is the size of the feed window you watch."
          },
          "onlyNew": {
            "title": "Only new items since the last run",
            "type": "boolean",
            "description": "Skip rows saved in earlier runs with the same search. Schedule the run to monitor brand mentions, Show HN launches or new job posts. A run with nothing new ends SUCCEEDED with an empty dataset.",
            "default": false
          },
          "stateKey": {
            "title": "State name",
            "type": "string",
            "description": "Optional name for the only-new memory, for example \"brand-alerts\". Without it, the memory is tied to your search settings, so a changed query starts fresh. State lives in the named key-value store hackernews-scraper-only-new."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}