{
  "openapi": "3.0.1",
  "info": {
    "title": "Hacker News Scraper: Stories, Comments, Hiring Jobs",
    "description": "Hacker News front page and all lists, keyword search with date, points and comment filters, full comment trees, user profiles, and Who is hiring threads as structured job rows (salary, remote, apply link). Official APIs, no login.",
    "version": "1.0",
    "x-build-id": "VQCmcebivs96DR35B"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/zhtech~hacker-news-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-zhtech-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/zhtech~hacker-news-scraper/runs": {
      "post": {
        "operationId": "runs-sync-zhtech-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/zhtech~hacker-news-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-zhtech-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",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "What to scrape",
            "enum": [
              "lists",
              "search",
              "comments",
              "users",
              "whoIsHiring"
            ],
            "type": "string",
            "description": "Lists: front page (top), new, best, Ask HN, Show HN and jobs. Search: keyword search with date, points and comments filters. Comments: full comment trees of stories you give. Users: profiles. Who is hiring: the monthly \"Ask HN: Who is hiring?\" thread parsed into structured job rows. Only the section for the chosen mode is used.",
            "default": "lists"
          },
          "lists": {
            "title": "Lists",
            "type": "array",
            "description": "Which Hacker News lists to read. Top is the front page in ranked order. A story on several lists is returned once, with every list and rank it holds.",
            "items": {
              "type": "string",
              "enum": [
                "top",
                "new",
                "best",
                "ask",
                "show",
                "job"
              ],
              "enumTitles": [
                "Top (front page)",
                "New",
                "Best",
                "Ask HN",
                "Show HN",
                "Jobs"
              ]
            },
            "default": [
              "top"
            ]
          },
          "maxItemsPerList": {
            "title": "Stories per list",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "How many stories to read from each list, in rank order. 30 is one front page. Top and new hold up to 500, the others up to 200.",
            "default": 30
          },
          "searchQueries": {
            "title": "Search queries",
            "type": "array",
            "description": "One search per line, run through the official Algolia Hacker News search. Use quotes for an exact phrase, for example \"rust compiler\". Leave empty and set an author, domain or date range to list everything that matches those filters.",
            "items": {
              "type": "string"
            }
          },
          "searchType": {
            "title": "Search in",
            "enum": [
              "story",
              "comment",
              "ask_hn",
              "show_hn",
              "launch_hn",
              "job",
              "poll",
              "front_page",
              "all"
            ],
            "type": "string",
            "description": "Stories (default), comments, a story type, or everything (stories, comments, polls and jobs).",
            "default": "story"
          },
          "searchSort": {
            "title": "Sort",
            "enum": [
              "relevance",
              "date"
            ],
            "type": "string",
            "description": "Relevance (Algolia ranking, at most 1,000 results per query) or newest first (no limit, pages through every match).",
            "default": "relevance"
          },
          "dateFrom": {
            "title": "Date from",
            "type": "string",
            "description": "Only items created on or after this date. Absolute (2026-01-31 or an ISO date time) or relative (7 days, 24 hours, 3 months, 1 year)."
          },
          "dateTo": {
            "title": "Date to",
            "type": "string",
            "description": "Only items created on or before this date (a plain date includes the whole day). Same formats as Date from."
          },
          "minPoints": {
            "title": "Minimum points",
            "minimum": 0,
            "type": "integer",
            "description": "Only stories with at least this many points. Works in Lists and Search mode. Filtered stories are not charged.",
            "default": 0
          },
          "minComments": {
            "title": "Minimum comments",
            "minimum": 0,
            "type": "integer",
            "description": "Only stories with at least this many comments. Works in Lists and Search mode.",
            "default": 0
          },
          "author": {
            "title": "Author",
            "type": "string",
            "description": "Only items posted by this Hacker News username (case sensitive), for example pg."
          },
          "domain": {
            "title": "Domain",
            "type": "string",
            "description": "Only stories linking to this site, for example github.com or nytimes.com. With an empty query this lists every story from the site."
          },
          "maxResultsPerQuery": {
            "title": "Max results per query",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Upper limit of stories or comments per search query. Above 1,000 the run switches to newest first automatically.",
            "default": 100
          },
          "storyIds": {
            "title": "Story IDs or URLs",
            "type": "array",
            "description": "Stories whose full comment tree you want: item IDs (8863) or links (https://news.ycombinator.com/item?id=8863). A comment ID returns that comment and its replies.",
            "items": {
              "type": "string"
            }
          },
          "includeComments": {
            "title": "Also get comments in Lists and Search mode",
            "type": "boolean",
            "description": "Adds the comment tree of every story found in Lists or Search mode. Each comment is a separate dataset row and charged as a comment.",
            "default": false
          },
          "maxCommentsPerStory": {
            "title": "Max comments per story",
            "minimum": 0,
            "type": "integer",
            "description": "Upper limit of comments saved per story, in the order they appear on Hacker News (top level ranked like the site, replies under their parent). 0 means all.",
            "default": 200
          },
          "maxCommentDepth": {
            "title": "Max reply depth",
            "minimum": 0,
            "type": "integer",
            "description": "1 keeps only top level comments, 2 adds their direct replies, and so on. 0 means unlimited.",
            "default": 0
          },
          "includeStoryRow": {
            "title": "Include the story itself (Comments mode)",
            "type": "boolean",
            "description": "Save one story row (title, points, comment count) before its comments.",
            "default": true
          },
          "usernames": {
            "title": "Usernames or profile URLs",
            "type": "array",
            "description": "Hacker News usernames (case sensitive) or profile links such as https://news.ycombinator.com/user?id=pg.",
            "items": {
              "type": "string"
            }
          },
          "userSubmissionsLimit": {
            "title": "Latest posts per user",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "Also save this many of each user's newest stories and comments (charged as stories and comments). 0 saves only the profile.",
            "default": 0
          },
          "hiringMonths": {
            "title": "Months",
            "minimum": 1,
            "maximum": 120,
            "type": "integer",
            "description": "How many of the latest monthly \"Ask HN: Who is hiring?\" threads to parse. 1 is the current month. Each thread has roughly 250 to 1,000 job posts.",
            "default": 1
          },
          "hiringThreadIds": {
            "title": "Specific thread IDs or URLs",
            "type": "array",
            "description": "Parse these threads instead of the latest months, for example an older Who is hiring thread.",
            "items": {
              "type": "string"
            }
          },
          "hiringKeywords": {
            "title": "Keywords (any)",
            "type": "array",
            "description": "Keep job posts that mention at least one of these anywhere (whole word, case insensitive), for example rust, react, kubernetes.",
            "items": {
              "type": "string"
            }
          },
          "hiringExcludeKeywords": {
            "title": "Exclude keywords",
            "type": "array",
            "description": "Drop job posts that mention any of these, for example crypto, onsite only.",
            "items": {
              "type": "string"
            }
          },
          "hiringRemoteOnly": {
            "title": "Remote only",
            "type": "boolean",
            "description": "Keep only posts that offer remote work (fully remote or remote as an option).",
            "default": false
          },
          "hiringLocations": {
            "title": "Locations (any)",
            "type": "array",
            "description": "Keep posts whose location, remote region or headline mentions one of these, for example NYC, London, Europe, US.",
            "items": {
              "type": "string"
            }
          },
          "hiringMinSalaryUsd": {
            "title": "Minimum salary (USD per year)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only posts that state a salary whose top of range, converted to yearly USD, is at least this. Posts without a stated salary are dropped when this is set.",
            "default": 0
          },
          "hiringSkipClosed": {
            "title": "Skip posts marked as filled or closed",
            "type": "boolean",
            "description": "Many companies edit their post to say the role is filled. Those are skipped (and not charged) by default.",
            "default": true
          },
          "hiringOnePerRole": {
            "title": "One row per role",
            "type": "boolean",
            "description": "When a post lists several roles, save one row per role instead of one row per post. Each row is charged as a hiring job.",
            "default": false
          },
          "onlyNew": {
            "title": "Only new items since the last run (monitor mode)",
            "type": "boolean",
            "description": "Remembers delivered stories, comments and job posts under the state key and skips them on later runs, so a scheduled run returns and charges only new items.",
            "default": false
          },
          "stateKey": {
            "title": "State key",
            "type": "string",
            "description": "Name of the memory used by monitor mode. Use a different key for each scheduled task.",
            "default": "default"
          },
          "includeHtml": {
            "title": "Include original HTML",
            "type": "boolean",
            "description": "Adds the original HTML of texts next to the plain text version.",
            "default": false
          },
          "maxItems": {
            "title": "Max results (whole run)",
            "minimum": 0,
            "type": "integer",
            "description": "Hard cap on dataset rows for the whole run, a safety limit on cost. 0 means no cap besides your max charge.",
            "default": 0
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Not needed: both sources are official public APIs. Leave off.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}