{
  "openapi": "3.0.1",
  "info": {
    "title": "Hacker News Scraper – Stories, Search & Who Is Hiring",
    "description": "Hacker News stories, comments and Who Is Hiring job posts as JSON. Read the front page feeds, search by keyword and date, or turn the monthly hiring thread into rows with company, role, location, remote, salary and stack. Only-new mode for alerts.",
    "version": "0.1",
    "x-build-id": "ZGcSR8VuXg9XHlWkI"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/anxuanng~hacker-news-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-anxuanng-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/anxuanng~hacker-news-scraper/runs": {
      "post": {
        "operationId": "runs-sync-anxuanng-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/anxuanng~hacker-news-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-anxuanng-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": [
              "feed",
              "search",
              "hiring"
            ],
            "type": "string",
            "description": "'Feeds' reads the front page lists (top, new, best, Ask, Show, jobs). 'Search' finds stories or comments by keyword and date. 'Who Is Hiring' returns the job posts from the monthly Ask HN thread, parsed into company, role, location, remote, salary and tech stack.",
            "default": "feed"
          },
          "feeds": {
            "title": "Feeds",
            "type": "array",
            "description": "Feeds mode: which lists to read. Rows alternate between feeds, and a story on two feeds is returned once.",
            "items": {
              "type": "string",
              "enum": [
                "top",
                "new",
                "best",
                "ask",
                "show",
                "job"
              ],
              "enumTitles": [
                "Top (front page)",
                "New",
                "Best",
                "Ask HN",
                "Show HN",
                "Jobs (YC companies)"
              ]
            },
            "default": [
              "top"
            ]
          },
          "search": {
            "title": "Search phrase",
            "type": "string",
            "description": "Search mode: words to look for, e.g. 'postgres', 'claude code', 'your-company.com'. Leave empty with 'Newest first' to read everything posted recently."
          },
          "searchIn": {
            "title": "Search in",
            "enum": [
              "stories",
              "comments"
            ],
            "type": "string",
            "description": "Search mode: stories (titles, links and Ask/Show text) or comments. Comments are the place to catch mentions of a product or company.",
            "default": "stories"
          },
          "sort": {
            "title": "Sort",
            "enum": [
              "relevance",
              "date"
            ],
            "type": "string",
            "description": "Search mode: best match (up to 1,000 results) or newest first (no limit).",
            "default": "relevance"
          },
          "hiringMonths": {
            "title": "Months of Who Is Hiring",
            "minimum": 1,
            "maximum": 24,
            "type": "integer",
            "description": "Who Is Hiring mode: how many monthly threads to read, newest first. 1 is the current month.",
            "default": 1
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Keep rows whose title, text or link contains any of these words (whole words, any case), e.g. 'rust', 'python', 'berlin'. Works in every mode. Empty keeps all.",
            "items": {
              "type": "string"
            }
          },
          "remoteOnly": {
            "title": "Remote jobs only",
            "type": "boolean",
            "description": "Who Is Hiring mode: keep only posts that say remote in their first line.",
            "default": false
          },
          "sinceDays": {
            "title": "Posted in the last (days)",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Skip anything older than this many days. Empty keeps all."
          },
          "minPoints": {
            "title": "Minimum points",
            "minimum": 0,
            "type": "integer",
            "description": "Stories only: skip stories with fewer points."
          },
          "minComments": {
            "title": "Minimum comments",
            "minimum": 0,
            "type": "integer",
            "description": "Stories only: skip stories with fewer comments."
          },
          "fetchComments": {
            "title": "Include comments",
            "type": "boolean",
            "description": "Add each story's comment thread (author, text, time, reply depth) to its row. Charged as a separate event, only for stories that have comments.",
            "default": false
          },
          "maxCommentsPerStory": {
            "title": "Max comments per story",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "With 'Include comments': stop after this many comments per story, read top threads first.",
            "default": 100
          },
          "onlyNew": {
            "title": "Only new items",
            "type": "boolean",
            "description": "Skip anything you already received in an earlier run of this Actor. Turn on for scheduled monitoring (keyword alerts, new job posts) so you pay only for new rows.",
            "default": false
          },
          "maxItems": {
            "title": "Max rows",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop after this many rows. You are charged only per row delivered.",
            "default": 100
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}