{
  "openapi": "3.0.1",
  "info": {
    "title": "Hacker News Scraper: Stories, Comments & Who is Hiring",
    "description": "Hacker News search, front page, Ask/Show HN and comment threads via the official HN Algolia API, plus parsed \"Who is hiring?\" job posts (company, role, remote, salary range, tech). Only-new mode for keyword alerts. No login, no browser.",
    "version": "0.1",
    "x-build-id": "c4aODTyDc4yieZNyc"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/rjmacarthy~hacker-news-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-rjmacarthy-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/rjmacarthy~hacker-news-scraper/runs": {
      "post": {
        "operationId": "runs-sync-rjmacarthy-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/rjmacarthy~hacker-news-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-rjmacarthy-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": [
              "search",
              "front",
              "whoIsHiring"
            ],
            "type": "string",
            "description": "Search: stories and/or comments matching your keywords. Front lists: the current front page, Ask HN, Show HN or job lists. Who is hiring: parsed job posts from the monthly \"Ask HN: Who is hiring?\" threads.",
            "default": "search"
          },
          "queries": {
            "title": "Search queries",
            "type": "array",
            "description": "Search mode: one search per keyword or phrase (titles, URLs, story text and authors are searched). Each query returns up to \"Max items per source\".",
            "items": {
              "type": "string"
            }
          },
          "searchIn": {
            "title": "Search in",
            "enum": [
              "stories",
              "comments",
              "both"
            ],
            "type": "string",
            "description": "Search mode: stories, comments, or both (two searches per query).",
            "default": "stories"
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "date",
              "relevance"
            ],
            "type": "string",
            "description": "Search mode: newest first (date) or best match (relevance, which favours popular items).",
            "default": "date"
          },
          "minPoints": {
            "title": "Minimum points",
            "minimum": 0,
            "type": "integer",
            "description": "Search mode, stories only: skip stories with fewer points. 0 = no minimum.",
            "default": 0
          },
          "minComments": {
            "title": "Minimum comments",
            "minimum": 0,
            "type": "integer",
            "description": "Search mode, stories only: skip stories with fewer comments. 0 = no minimum.",
            "default": 0
          },
          "since": {
            "title": "Posted since",
            "type": "string",
            "description": "Search mode: only items posted on or after this time. An ISO date (2026-11-01) or a relative time (\"24 hours\", \"7 days\", \"3 months\"). Empty = no limit."
          },
          "until": {
            "title": "Posted until",
            "type": "string",
            "description": "Search mode: only items posted on or before this time (same formats as \"Posted since\"). Combine both to split a big search into date ranges."
          },
          "domain": {
            "title": "Link domain",
            "type": "string",
            "description": "Search mode, stories only: keep stories that link to this site (subdomains included), e.g. github.com. With no query, finds every story linking to the domain."
          },
          "lists": {
            "title": "Lists",
            "type": "array",
            "description": "Front mode: which lists to read. front_page = the current front page, ask_hn / show_hn / job = newest Ask HN, Show HN and YC job posts.",
            "items": {
              "type": "string",
              "enum": [
                "front_page",
                "ask_hn",
                "show_hn",
                "job"
              ],
              "enumTitles": [
                "Front page",
                "Ask HN",
                "Show HN",
                "Jobs"
              ]
            },
            "default": [
              "front_page"
            ]
          },
          "months": {
            "title": "Number of monthly threads",
            "minimum": 1,
            "maximum": 36,
            "type": "integer",
            "description": "Who is hiring mode: how many recent monthly \"Ask HN: Who is hiring?\" threads to read (1 = the latest month).",
            "default": 1
          },
          "threadIds": {
            "title": "Thread IDs or URLs",
            "type": "array",
            "description": "Who is hiring mode: read these threads instead (HN item IDs or news.ycombinator.com/item?id= URLs). Only \"Ask HN: Who is hiring?\" threads posted by whoishiring are accepted.",
            "items": {
              "type": "string"
            }
          },
          "jobKeywords": {
            "title": "Job keywords",
            "type": "array",
            "description": "Who is hiring mode: keep posts that mention ANY of these words (case-insensitive), e.g. rust, python, \"machine learning\". Empty = all posts.",
            "items": {
              "type": "string"
            }
          },
          "remoteOnly": {
            "title": "Remote jobs only",
            "type": "boolean",
            "description": "Who is hiring mode: keep only posts whose header says REMOTE.",
            "default": false
          },
          "includeComments": {
            "title": "Include comments of each story",
            "type": "boolean",
            "description": "Search (stories) and front modes: also output the comment thread of every story, one row per comment with its depth and parent. Costs one extra request per story.",
            "default": false
          },
          "maxCommentsPerStory": {
            "title": "Max comments per story",
            "minimum": 0,
            "type": "integer",
            "description": "With \"Include comments\": stop after this many comments per story (thread order). 0 = all.",
            "default": 50
          },
          "maxItems": {
            "title": "Max items per source",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum stories, comments (search) or job posts per query, list or thread. Story comments are capped separately. 0 = no limit (the HN search API stops at 1,000 per query).",
            "default": 50
          },
          "onlyNewItems": {
            "title": "Only new items",
            "type": "boolean",
            "description": "Output (and charge) only items this same input has not output before. State is kept in the named key-value store \"hacker-news-scraper-state\" for 120 days. Use it with a schedule for keyword alerts.",
            "default": false
          },
          "maxConcurrency": {
            "title": "Max parallel requests",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many API requests run at the same time.",
            "default": 3
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Usually not needed: the HN Algolia API answers Apify datacenter IPs. Residential proxies are not supported: if you select the RESIDENTIAL group, the Actor uses Apify datacenter proxy instead.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}