{
  "openapi": "3.0.1",
  "info": {
    "title": "Hacker News Scraper - Who Is Hiring Jobs & Stories API",
    "description": "Scrape Hacker News: the monthly 'Who is hiring?' thread as structured jobs (company, role, location, remote, salary, visa, apply link, ATS) and HN stories by keyword with points and comments. Official HN API, no login. Export JSON/CSV or call via API/MCP.",
    "version": "1.0",
    "x-build-id": "By0l3A49jWkcdCx7H"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/teddythebuilder~hacker-news-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-teddythebuilder-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/teddythebuilder~hacker-news-scraper/runs": {
      "post": {
        "operationId": "runs-sync-teddythebuilder-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/teddythebuilder~hacker-news-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-teddythebuilder-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": [
              "whoIsHiring",
              "stories",
              "both"
            ],
            "type": "string",
            "description": "'Who is hiring?' returns one structured row per job post from the monthly HN hiring thread. 'Stories' searches HN stories by keyword (or returns the current front page).",
            "default": "whoIsHiring"
          },
          "keywords": {
            "title": "Job keywords (any)",
            "type": "array",
            "description": "Keep only job posts that mention at least one of these words, e.g. \"python\", \"rust\", \"machine learning\". Leave empty for all posts.",
            "items": {
              "type": "string"
            }
          },
          "remoteOnly": {
            "title": "Remote jobs only",
            "type": "boolean",
            "description": "Keep only posts whose header says REMOTE.",
            "default": false
          },
          "locations": {
            "title": "Locations (any)",
            "type": "array",
            "description": "Keep only posts whose header mentions one of these places, e.g. \"London\", \"Berlin\", \"EU\", \"NYC\".",
            "items": {
              "type": "string"
            }
          },
          "visaSponsorshipOnly": {
            "title": "Visa sponsorship only",
            "type": "boolean",
            "description": "Keep only posts that offer visa sponsorship.",
            "default": false
          },
          "withSalaryOnly": {
            "title": "With salary only",
            "type": "boolean",
            "description": "Keep only posts that state a salary range (parsed into salaryMin / salaryMax).",
            "default": false
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "type": "array",
            "description": "Drop posts (and stories) that mention any of these words, e.g. \"crypto\", \"onsite only\".",
            "items": {
              "type": "string"
            }
          },
          "months": {
            "title": "Months",
            "type": "array",
            "description": "Which monthly threads to read, e.g. \"2026-10\" or \"September 2026\". Empty = the latest thread. Add several months for a hiring history (threads go back to 2011).",
            "items": {
              "type": "string"
            }
          },
          "includeFullText": {
            "title": "Include full post text",
            "type": "boolean",
            "description": "Add the whole post as plain text (personal e-mail addresses are redacted). Turn off for smaller rows.",
            "default": true
          },
          "searchQueries": {
            "title": "Story search queries",
            "type": "array",
            "description": "Keywords to search HN stories for, e.g. \"web scraping\", \"your-brand.com\". Used by the Stories mode.",
            "items": {
              "type": "string"
            }
          },
          "storyType": {
            "title": "Story type",
            "enum": [
              "story",
              "ask_hn",
              "show_hn",
              "front_page",
              "job"
            ],
            "type": "string",
            "description": "Which kind of HN items to return.",
            "default": "story"
          },
          "minPoints": {
            "title": "Minimum points",
            "minimum": 0,
            "type": "integer",
            "description": "Only stories with at least this many points, e.g. 50.",
            "default": 0
          },
          "publishedWithinDays": {
            "title": "Published within (days)",
            "minimum": 0,
            "type": "integer",
            "description": "Only stories from the last N days. 0 = any time.",
            "default": 0
          },
          "sortBy": {
            "title": "Sort stories by",
            "enum": [
              "date",
              "relevance"
            ],
            "type": "string",
            "description": "Newest first suits monitoring; relevance suits research.",
            "default": "date"
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum number of charged rows (job posts + stories) per run. A full monthly hiring thread has about 250-700 posts.",
            "default": 20
          },
          "onlyNew": {
            "title": "Only new items since the last run",
            "type": "boolean",
            "description": "Monitor mode: skip job posts and stories already returned by an earlier run with the same watch name. Schedule the actor daily to get only new posts.",
            "default": false
          },
          "watchName": {
            "title": "Watch name",
            "type": "string",
            "description": "Separate seen-lists for different monitors, e.g. \"rust-jobs\" and \"brand-mentions\".",
            "default": "default"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}