{
  "openapi": "3.0.1",
  "info": {
    "title": "Hacker News Scraper: Search, Front Page, Comments, Who's Hiring",
    "description": "Scrape Hacker News with the official APIs: keyword search of stories and comments (date range, min points), front page/new/best/Ask/Show/jobs lists, full comment threads, and the monthly \"Who is hiring?\" jobs with company, location and remote parsed. Monitor mode outputs only new items.",
    "version": "1.0",
    "x-build-id": "YAC1TvRaAL9BVuESx"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/wellbuilt_seahare~hacker-news-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-wellbuilt_seahare-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/wellbuilt_seahare~hacker-news-scraper/runs": {
      "post": {
        "operationId": "runs-sync-wellbuilt_seahare-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/wellbuilt_seahare~hacker-news-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-wellbuilt_seahare-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": "What to scrape",
            "enum": [
              "list",
              "search",
              "comments",
              "whoIsHiring"
            ],
            "type": "string",
            "description": "Lists = front page (top), new, best, Ask HN, Show HN or jobs. Search = keyword search of stories and/or comments with date and points filters. Comments = every comment of the stories you list, flattened with depth and parent ID. Who is hiring = one row per job post in the monthly \"Ask HN: Who is hiring?\" thread, with company, location, remote and roles parsed.",
            "default": "list"
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many output rows (0 = no limit). This is your main cost control: you pay per row. Lists hold up to 500 stories (200 for best/ask/show/jobs); a \"Who is hiring?\" thread has about 200–400 job posts.",
            "default": 30
          },
          "listType": {
            "title": "List (Lists mode)",
            "enum": [
              "top",
              "new",
              "best",
              "ask",
              "show",
              "jobs"
            ],
            "type": "string",
            "description": "Which Hacker News list to read. Top = the front page ranking. Rows keep the list order in the rank field.",
            "default": "top"
          },
          "searchQuery": {
            "title": "Search keywords (Search mode)",
            "type": "string",
            "description": "Words to search for in titles, URLs, story text and comments, e.g. postgres, \"open source\" or your product name. Leave empty to get everything that matches the other filters (e.g. all Show HN posts with 100+ points this month)."
          },
          "searchTags": {
            "title": "Item types (Search mode)",
            "type": "array",
            "description": "Which kinds of items to search. Pick several to combine them (any of). Default: stories.",
            "items": {
              "type": "string",
              "enum": [
                "story",
                "comment",
                "ask_hn",
                "show_hn",
                "poll",
                "front_page"
              ],
              "enumTitles": [
                "Stories",
                "Comments",
                "Ask HN",
                "Show HN",
                "Polls",
                "Currently on the front page"
              ]
            },
            "default": [
              "story"
            ]
          },
          "sortBy": {
            "title": "Sort by (Search mode)",
            "enum": [
              "relevance",
              "date"
            ],
            "type": "string",
            "description": "Relevance (Algolia's ranking: matches, then points and comments) or newest first. Monitor mode always uses newest first. Relevance search returns at most 1,000 results per query; newest-first search can go further by paging back in time.",
            "default": "relevance"
          },
          "dateFrom": {
            "title": "Posted on or after (Search mode)",
            "type": "string",
            "description": "Only items posted on or after this date. Use YYYY-MM-DD (UTC) like 2026-11-01, or a relative value like 7 days, 24 hours, 2 weeks or 3 months."
          },
          "dateTo": {
            "title": "Posted on or before (Search mode)",
            "type": "string",
            "description": "Only items posted on or before this date (YYYY-MM-DD, whole day included, UTC). Leave empty for up to now."
          },
          "minPoints": {
            "title": "Min points (Search mode)",
            "minimum": 0,
            "type": "integer",
            "description": "Only stories with at least this many points (upvotes). Comments have no public points, so leave 0 when searching comments.",
            "default": 0
          },
          "minComments": {
            "title": "Min comments (Search mode)",
            "minimum": 0,
            "type": "integer",
            "description": "Only stories with at least this many comments.",
            "default": 0
          },
          "author": {
            "title": "Posted by HN user (Search mode)",
            "type": "string",
            "description": "Optional: only items posted by this Hacker News username (exact handle, e.g. dang)."
          },
          "storyIds": {
            "title": "Story IDs or URLs (Comments mode)",
            "type": "array",
            "description": "Hacker News story IDs or links, one per line, e.g. 8863 or https://news.ycombinator.com/item?id=8863. Every comment is output in thread order with depth (1 = top-level), parentId and storyId.",
            "items": {
              "type": "string"
            }
          },
          "includeStory": {
            "title": "Include the story row (Comments mode)",
            "type": "boolean",
            "description": "Also output the story itself as the first row (depth 0) before its comments.",
            "default": true
          },
          "maxDepth": {
            "title": "Max comment depth (Comments mode)",
            "minimum": 0,
            "type": "integer",
            "description": "1 = top-level comments only, 2 = plus direct replies, and so on. 0 = the whole thread.",
            "default": 0
          },
          "hiringMonth": {
            "title": "Month (Who is hiring mode)",
            "type": "string",
            "description": "Which monthly \"Ask HN: Who is hiring?\" thread to read: latest, or a month like 2026-11 or November 2026. Threads are posted by the whoishiring account on the first weekday of each month.",
            "default": "latest"
          },
          "remoteOnly": {
            "title": "Remote jobs only (Who is hiring mode)",
            "type": "boolean",
            "description": "Only output job posts whose header line mentions REMOTE (and not \"no remote\").",
            "default": false
          },
          "filterKeywords": {
            "title": "Keep only rows containing (any mode)",
            "type": "array",
            "description": "Optional filter on the output: keep only rows whose title, text, link, company, location or roles contain at least one of these words or phrases. Case-insensitive; single words match whole words (\"go\" won't match \"google\"). Example for job posts: rust, golang, python. Filtered rows are free.",
            "items": {
              "type": "string"
            }
          },
          "onlyNewItems": {
            "title": "Monitor mode: only new items since last run",
            "type": "boolean",
            "description": "Remember which items this same query already returned (in a named key-value store in your account) and output only new ones on the next runs. Schedule it hourly or daily for keyword alerts, new front-page stories, new comments on a thread, or new job posts. The first run outputs the current items and saves them as seen. You pay only for new items.",
            "default": false
          },
          "monitorStateName": {
            "title": "Monitor state name",
            "type": "string",
            "description": "Name of the key-value store that keeps the seen-item list. Different queries are tracked separately inside it, but use a different name per schedule to be safe (e.g. hn-brand-mentions). Lowercase letters, numbers and dashes.",
            "default": "hacker-news-monitor-state"
          },
          "textMaxLength": {
            "title": "Max text length",
            "minimum": 0,
            "type": "integer",
            "description": "Cut story and comment text to this many characters (0 = no limit). Text is plain text with HTML removed; email addresses and phone numbers are replaced with [email removed] / [phone removed].",
            "default": 5000
          },
          "maxConcurrency": {
            "title": "Max parallel requests",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many item requests to send to the official HN API at once in Lists and Comments mode. Default 5 is polite and fast enough.",
            "default": 5
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}