{
  "openapi": "3.0.1",
  "info": {
    "title": "Hacker News Scraper — Stories, Comments & Hiring Jobs",
    "description": "Scrape Hacker News: front page in real rank order, full-text search past Algolia's 1,000-result limit, comment trees, user profiles, and monthly \"Who is hiring\" threads parsed into structured jobs with company, role, location, salary and contact email.",
    "version": "1.0",
    "x-build-id": "6z0LPDz2antYFqVNa"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/pixflor~hacker-news-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-pixflor-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/pixflor~hacker-news-scraper/runs": {
      "post": {
        "operationId": "runs-sync-pixflor-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/pixflor~hacker-news-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-pixflor-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": [
              "search",
              "frontPage",
              "comments",
              "item",
              "user",
              "whoIsHiring",
              "whoWantsToBeHired"
            ],
            "type": "string",
            "description": "Pick one. 'search' = stories by keyword/date/points. 'frontPage' = HN's ranked lists in real rank order. 'comments' = search comments. 'item' = one story plus its whole comment tree. 'user' = a profile and their recent stories. 'whoIsHiring' / 'whoWantsToBeHired' = the monthly threads parsed into structured job rows.",
            "default": "search"
          },
          "searchQuery": {
            "title": "Search text",
            "type": "string",
            "description": "Full-text query for 'search' and 'comments' modes. Leave empty to get everything in date order. In other modes this filters the returned rows."
          },
          "allowTypos": {
            "title": "Allow typo matches",
            "type": "boolean",
            "description": "Off by default, and you almost certainly want it off. Hacker News search fuzzy-matches by default: measured, a search for \"rust\" returned 66,588 hits of which only 1 in 8 actually contained the word — the rest matched \"just\", \"must\" and \"trust\". Since you pay per row, that is seven wasted rows in eight. Turn this on only if you want deliberately fuzzy matching.",
            "default": false
          },
          "titleContains": {
            "title": "Title must contain",
            "type": "string",
            "description": "Keep only rows whose title contains this text. Use \"Ask HN\" or \"Show HN\" here: Hacker News files EVERY text-only post under 'ask', so neither the ask feed nor the ask_hn tag returns only real Ask HN posts. Applied before billing, so you are not charged for rows you would discard."
          },
          "rankedList": {
            "title": "Which ranked list",
            "enum": [
              "top",
              "new",
              "best",
              "ask",
              "show",
              "job"
            ],
            "type": "string",
            "description": "Only used by 'frontPage' mode. Which of HN's six official lists to return, in true rank order. Note 'ask' is HN's Ask page (all self posts, including Tell HN), not only posts titled \"Ask HN:\".",
            "default": "top"
          },
          "storyType": {
            "title": "Story type",
            "enum": [
              "story",
              "ask_hn",
              "show_hn",
              "job",
              "poll"
            ],
            "type": "string",
            "description": "Only used by 'search' mode. Which kind of submission to search. 'story' covers everything.",
            "default": "story"
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "default",
              "newest",
              "oldest",
              "points",
              "comments",
              "relevance",
              "rank",
              "salary"
            ],
            "type": "string",
            "description": "'default' keeps the natural order for the mode — real HN rank for frontPage, newest-first for search. Choose 'relevance' only with a search text; it is the one option that cannot page past 1,000 results.",
            "default": "default"
          },
          "author": {
            "title": "Author",
            "type": "string",
            "description": "Only items submitted by this Hacker News username. Case-sensitive, exactly as it appears on HN."
          },
          "domain": {
            "title": "Link domain",
            "type": "string",
            "description": "Keep only stories linking to this domain, e.g. github.com or nytimes.com. Partial match."
          },
          "minPoints": {
            "title": "Minimum points",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only stories with at least this many points. Applied by the API itself, so it does not waste your row budget.",
            "default": 0
          },
          "minComments": {
            "title": "Minimum comments",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only stories with at least this many comments. Applied by the API itself.",
            "default": 0
          },
          "postedWithinDays": {
            "title": "Posted within (days)",
            "minimum": 0,
            "type": "integer",
            "description": "Only items from the last N days. 0 means no limit. Combine with a high maxItems to sweep a whole week or month.",
            "default": 0
          },
          "itemId": {
            "title": "Story ID or URL",
            "type": "string",
            "description": "Only used by 'item' mode. A numeric HN id, or a full https://news.ycombinator.com/item?id=... URL."
          },
          "username": {
            "title": "Username",
            "type": "string",
            "description": "Only used by 'user' mode. The HN account to look up."
          },
          "hiringMonth": {
            "title": "Hiring thread month",
            "type": "string",
            "description": "Only used by the hiring modes. Leave empty for the current month's thread. Otherwise write it exactly as it appears in the thread title, e.g. \"July 2026\"."
          },
          "hiringThreads": {
            "title": "How many hiring threads",
            "minimum": 1,
            "maximum": 24,
            "type": "integer",
            "description": "Only used by the hiring modes. How many recent monthly threads to pull, newest first. Raise this to build a hiring-trend history.",
            "default": 1
          },
          "workplace": {
            "title": "Remote / onsite",
            "enum": [
              "",
              "REMOTE",
              "HYBRID",
              "ONSITE"
            ],
            "type": "string",
            "description": "Only used by the hiring modes. Keep only jobs classified as remote, hybrid or onsite.",
            "default": ""
          },
          "tech": {
            "title": "Technology",
            "type": "string",
            "description": "Only used by the hiring modes. Keep only jobs whose detected tech tags include this, e.g. rust, python, kubernetes."
          },
          "withSalaryOnly": {
            "title": "Only jobs with a salary",
            "type": "boolean",
            "description": "Only used by the hiring modes. Drop posts where no salary range could be read from the text.",
            "default": false
          },
          "withEmailOnly": {
            "title": "Only jobs with a contact email",
            "type": "boolean",
            "description": "Only used by the hiring modes. Drop posts with no contact address. Obfuscated forms like \"jane (at) acme (dot) io\" are decoded and count as present.",
            "default": false
          },
          "maxItems": {
            "title": "Maximum rows",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "How many rows to return, and what you pay for. Search mode walks a date cursor, so values above 1,000 work here even though the underlying API refuses to page that deep.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}