{
  "openapi": "3.0.1",
  "info": {
    "title": "Hacker News Scraper: Who Is Hiring Jobs, Stories, Comments",
    "description": "Scrape Hacker News stories, full comment trees, user profiles and the monthly Who Is Hiring threads as HN jobs with company, role, location, remote, salary and visa fields. Search by keyword, domain or author with date and points filters, past the 1,000-result limit. Official HN API.",
    "version": "0.1",
    "x-build-id": "ar7C3if0BR9CKD2ir"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ctriolab~hackernews-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ctriolab-hackernews-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/ctriolab~hackernews-scraper/runs": {
      "post": {
        "operationId": "runs-sync-ctriolab-hackernews-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/ctriolab~hackernews-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-ctriolab-hackernews-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": [
              "lists",
              "search",
              "items",
              "hiring",
              "users"
            ],
            "type": "string",
            "description": "Pick one mode. Only the fields of the chosen mode are used.",
            "default": "lists"
          },
          "maxItems": {
            "title": "Max results per list, search query or hiring thread",
            "minimum": 0,
            "type": "integer",
            "description": "0 means no limit. Lists hold up to 500 stories (top, new), 200 (best) or fewer (ask, show, job). Search in date order can go far beyond 1,000 results. Comments are limited separately below.",
            "default": 30
          },
          "lists": {
            "title": "Lists",
            "type": "array",
            "description": "Mode: lists. One row per story with its rank in the list.",
            "items": {
              "type": "string",
              "enum": [
                "top",
                "new",
                "best",
                "ask",
                "show",
                "job"
              ],
              "enumTitles": [
                "Top (front page)",
                "New",
                "Best",
                "Ask HN",
                "Show HN",
                "Jobs"
              ]
            },
            "default": [
              "top"
            ]
          },
          "includeComments": {
            "title": "Include comments",
            "type": "boolean",
            "description": "Mode: lists. Also return the comments of each story (one row per comment with depth, parent and path). Mode items always returns comments.",
            "default": false
          },
          "maxCommentDepth": {
            "title": "Max comment depth",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "1 = only top-level comments, 2 = top-level and their replies. 0 = the whole tree. Used in modes lists and items.",
            "default": 0
          },
          "maxCommentsPerStory": {
            "title": "Max comments per story",
            "minimum": 0,
            "type": "integer",
            "description": "0 = all comments. Comments are fetched level by level, so a limit keeps the top of the discussion.",
            "default": 0
          },
          "searchQueries": {
            "title": "Search keywords",
            "type": "array",
            "description": "Mode: search. Each keyword (or phrase) is a separate search. Leave empty to search only by domain, author or dates.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "searchDomains": {
            "title": "Linked domains or URLs",
            "type": "array",
            "description": "Mode: search. Find stories that link to a domain (github.com) or URL prefix (github.com/anthropics). Results are checked so only real matches are returned.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "searchAuthor": {
            "title": "Author",
            "type": "string",
            "description": "Mode: search. Only items posted by this HN username (case-sensitive)."
          },
          "searchType": {
            "title": "Item type",
            "enum": [
              "story",
              "comment",
              "all",
              "ask_hn",
              "show_hn",
              "job",
              "poll",
              "front_page"
            ],
            "type": "string",
            "description": "Mode: search.",
            "default": "story"
          },
          "searchSort": {
            "title": "Sort",
            "enum": [
              "date",
              "relevance"
            ],
            "type": "string",
            "description": "Mode: search. Date order walks back in time and can return tens of thousands of results. Relevance order is limited to 1,000 results by the search API.",
            "default": "date"
          },
          "dateFrom": {
            "title": "From date",
            "type": "string",
            "description": "Mode: search. 2026-01-01, 2026-01-01T12:00:00Z or relative (24 hours, 7 days, 3 months)."
          },
          "dateTo": {
            "title": "To date",
            "type": "string",
            "description": "Mode: search. Inclusive when you give a day (2026-09-30 includes that whole day, UTC)."
          },
          "minPoints": {
            "title": "Min points",
            "minimum": 0,
            "type": "integer",
            "description": "Mode: search. Stories only (the search API has no points for comments).",
            "default": 0
          },
          "minComments": {
            "title": "Min comments",
            "minimum": 0,
            "type": "integer",
            "description": "Mode: search. Stories only.",
            "default": 0
          },
          "storyIds": {
            "title": "Story IDs or URLs",
            "type": "array",
            "description": "Mode: items. Numeric IDs (8863) or HN URLs. Returns the story plus every comment as a flat row with depth, parentId and path (story/parent/.../comment), in the same order as on HN. A comment ID returns that comment and its replies.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "hiringThreads": {
            "title": "Threads",
            "type": "array",
            "description": "Mode: hiring. Monthly threads by the whoishiring account. Each top-level comment becomes one row with parsed fields and the full text.",
            "items": {
              "type": "string",
              "enum": [
                "who_is_hiring",
                "who_wants_to_be_hired",
                "freelancer"
              ],
              "enumTitles": [
                "Who is hiring?",
                "Who wants to be hired?",
                "Freelancer? Seeking freelancer?"
              ]
            },
            "default": [
              "who_is_hiring"
            ]
          },
          "hiringMonths": {
            "title": "Months",
            "type": "array",
            "description": "Mode: hiring. \"latest\", \"last 3\" (the 3 newest threads) or months like 2026-09.",
            "default": [
              "latest"
            ],
            "items": {
              "type": "string"
            }
          },
          "hiringKeywords": {
            "title": "Keywords (any)",
            "type": "array",
            "description": "Mode: hiring. Keep posts that mention at least one keyword (case-insensitive), for example rust, python, data engineer.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "hiringRemote": {
            "title": "Remote",
            "enum": [
              "any",
              "remote",
              "remote_or_hybrid",
              "onsite"
            ],
            "type": "string",
            "description": "Mode: hiring. Uses the parsed remote field (best effort).",
            "default": "any"
          },
          "hiringLocations": {
            "title": "Locations (any)",
            "type": "array",
            "description": "Mode: hiring. Keep posts whose location or first line contains one of these (London, Berlin, US, Europe ...).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "hiringSkipNonPosts": {
            "title": "Skip comments that are not posts",
            "type": "boolean",
            "description": "Mode: hiring. Skips meta comments (for example a reply about the thread itself) that do not look like a job or candidate post.",
            "default": true
          },
          "users": {
            "title": "Usernames",
            "type": "array",
            "description": "Mode: users. Case-sensitive HN usernames or profile URLs.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "onlyNewItems": {
            "title": "Only items not seen in previous runs",
            "type": "boolean",
            "description": "For schedules. Remembers returned IDs in a named key-value store per list, search, story or thread. Later runs return only new stories, comments, search results or hiring posts. Runs with nothing new succeed and cost almost nothing. User profiles are always returned.",
            "default": false
          },
          "monitorName": {
            "title": "Monitor name for new-only mode",
            "type": "string",
            "description": "Use a different name for each schedule so their memories do not mix.",
            "default": "default"
          },
          "maxRetries": {
            "title": "Max retries per request",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Retries on rate limits (HTTP 429), server errors and network errors with exponential backoff.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}