{
  "openapi": "3.0.1",
  "info": {
    "title": "Hacker News Scraper - Stories, Comments, Users & Who Is Hiring",
    "description": "Scrape Hacker News: top / new / best / Ask / Show / job lists, a day's top stories, search with date, points and comment filters, full comment trees, user profiles, Who is hiring and Who wants to be hired posts parsed into rows, keyword trends. Monitor mode. $0.14 per 1,000 items.",
    "version": "0.1",
    "x-build-id": "C7cSghlPaP0cjRd12"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/topapi~hacker-news-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-topapi-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/topapi~hacker-news-scraper/runs": {
      "post": {
        "operationId": "runs-sync-topapi-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/topapi~hacker-news-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-topapi-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": {
          "lists": {
            "title": "Lists",
            "uniqueItems": true,
            "type": "array",
            "description": "HN's own ranked lists, read live from the official API: top (the front page, 500), new (500), best (200), ask, show, job. Empty with nothing else asked = top.",
            "items": {
              "type": "string",
              "enum": [
                "top",
                "new",
                "best",
                "ask",
                "show",
                "job"
              ],
              "enumTitles": [
                "Top (front page)",
                "New",
                "Best",
                "Ask HN",
                "Show HN",
                "Jobs"
              ]
            }
          },
          "searchQueries": {
            "title": "Search queries",
            "type": "array",
            "description": "Full-text searches (HN Search), one per line, e.g. \"rust\", \"\\\"vector database\\\"\" (quotes = exact phrase), \"apify\". Use the filters below for type, dates, points and comments.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Hacker News links",
            "type": "array",
            "description": "news.ycombinator.com links: item?id= (a story or comment), user?id=, submitted?id=, threads?id=, from?site=, news / newest / best / ask / show / jobs, or an hn.algolia.com search link.",
            "items": {
              "type": "string"
            }
          },
          "itemIds": {
            "title": "Item ids",
            "type": "array",
            "description": "HN item ids (the number in item?id=), e.g. 8863. Stories, comments, polls or jobs. Turn on comments below to get each story's discussion.",
            "items": {
              "type": "string"
            }
          },
          "usernames": {
            "title": "Usernames",
            "type": "array",
            "description": "HN usernames, e.g. pg, dang. One profile row each: karma, about, created, submissions, story and comment counts, last activity.",
            "items": {
              "type": "string"
            }
          },
          "topStoriesDays": {
            "title": "Top stories of a day",
            "type": "array",
            "description": "Days (UTC) like 2026-11-01, today or yesterday: the stories created that day, ranked by points.",
            "items": {
              "type": "string"
            }
          },
          "hiringThreads": {
            "title": "Monthly hiring threads",
            "uniqueItems": true,
            "type": "array",
            "description": "Parse the monthly threads into rows: Who is hiring = one job post per row; Who wants to be hired = one candidate per row; Freelancer = SEEKING WORK (candidate) and SEEKING FREELANCER (job post).",
            "items": {
              "type": "string",
              "enum": [
                "whoIsHiring",
                "whoWantsToBeHired",
                "freelancer"
              ],
              "enumTitles": [
                "Ask HN: Who is hiring?",
                "Ask HN: Who wants to be hired?",
                "Ask HN: Freelancer? Seeking freelancer?"
              ]
            }
          },
          "hiringMonths": {
            "title": "Hiring months",
            "type": "array",
            "description": "Which months to read: latest (default), 2026-10, October 2026, or last 3. A month is read whole unless Max rows per source is set.",
            "items": {
              "type": "string"
            }
          },
          "trendKeywords": {
            "title": "Trend keywords",
            "type": "array",
            "description": "One trend row per keyword: stories and comments in the window vs the window before, points, comments, top stories, top domains, growth and a trend score. Exact matches only.",
            "items": {
              "type": "string"
            }
          },
          "discoverRisingTerms": {
            "title": "Find rising terms",
            "type": "boolean",
            "description": "Words and two-word phrases in story titles that grew most against the previous window, one trend row each.",
            "default": false
          },
          "itemType": {
            "title": "Item type",
            "enum": [
              "story",
              "comment",
              "ask_hn",
              "show_hn",
              "job",
              "poll",
              "front_page",
              "all"
            ],
            "type": "string",
            "description": "What a search returns. Default stories (Ask HN and Show HN included)."
          },
          "sortBy": {
            "title": "Sort",
            "enum": [
              "relevance",
              "date"
            ],
            "type": "string",
            "description": "Relevance (HN Search's ranking, points first) or newest first.",
            "default": "relevance"
          },
          "searchIn": {
            "title": "Search in",
            "enum": [
              "all",
              "title",
              "url",
              "text",
              "author"
            ],
            "type": "string",
            "description": "Where the query must match: everywhere (title, url, text, author), only the title, only the link, only the text, or only the author name.",
            "default": "all"
          },
          "exactMatch": {
            "title": "Exact words only",
            "type": "boolean",
            "description": "Turn off HN Search's typo tolerance, so \"rust\" does not also match \"trust\".",
            "default": false
          },
          "dateFrom": {
            "title": "From",
            "type": "string",
            "description": "Created on or after: 2026-11-01, an ISO time, a unix time, or \"7 days\" (ago)."
          },
          "dateTo": {
            "title": "To",
            "type": "string",
            "description": "Created on or before, e.g. 2026-11-06."
          },
          "postedWithinHours": {
            "title": "Posted within (hours)",
            "minimum": 1,
            "maximum": 87600,
            "type": "integer",
            "description": "Only items from the last N hours, e.g. 24."
          },
          "minPoints": {
            "title": "Minimum points",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Stories with at least this many points, e.g. 100. Comments have no public points and are not filtered by it."
          },
          "minComments": {
            "title": "Minimum comments",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Stories with at least this many comments, e.g. 50."
          },
          "authors": {
            "title": "Authors",
            "type": "array",
            "description": "Only items by these usernames, e.g. pg. On its own (no query) it lists their items.",
            "items": {
              "type": "string"
            }
          },
          "domains": {
            "title": "Domains",
            "type": "array",
            "description": "Only stories linking to these sites, e.g. github.com. On its own (no query) it searches the domain like HN's from?site= page.",
            "items": {
              "type": "string"
            }
          },
          "filterKeywords": {
            "title": "Title or text contains",
            "type": "array",
            "description": "Keep only rows whose title or text contains one of these words (any), e.g. llm. Useful on lists.",
            "items": {
              "type": "string"
            }
          },
          "hiringKeywords": {
            "title": "Hiring: keywords",
            "type": "array",
            "description": "Keep hiring rows containing these words, e.g. backend, rust, \"staff engineer\".",
            "items": {
              "type": "string"
            }
          },
          "hiringKeywordsMatch": {
            "title": "Hiring: keywords must match",
            "enum": [
              "any",
              "all"
            ],
            "type": "string",
            "description": "Any or all of the hiring keywords.",
            "default": "any"
          },
          "technologies": {
            "title": "Hiring: technologies",
            "type": "array",
            "description": "Keep posts naming one of these technologies, e.g. Go, PostgreSQL, React.",
            "items": {
              "type": "string"
            }
          },
          "locations": {
            "title": "Hiring: locations",
            "type": "array",
            "description": "Keep posts naming one of these places or regions, e.g. Berlin, United Kingdom, Europe.",
            "items": {
              "type": "string"
            }
          },
          "remoteOnly": {
            "title": "Hiring: remote only",
            "type": "boolean",
            "description": "Job posts that offer remote work; candidates who want remote.",
            "default": false
          },
          "onsiteOnly": {
            "title": "Hiring: onsite or hybrid only",
            "type": "boolean",
            "description": "Job posts with an office (onsite or hybrid).",
            "default": false
          },
          "visaOnly": {
            "title": "Hiring: visa sponsorship",
            "type": "boolean",
            "description": "Job posts that say they sponsor visas.",
            "default": false
          },
          "withSalaryOnly": {
            "title": "Hiring: with salary",
            "type": "boolean",
            "description": "Job posts that state pay.",
            "default": false
          },
          "withEmailOnly": {
            "title": "Hiring: with email",
            "type": "boolean",
            "description": "Posts that publish an email address.",
            "default": false
          },
          "willingToRelocateOnly": {
            "title": "Hiring: willing to relocate",
            "type": "boolean",
            "description": "Candidates who say they will relocate.",
            "default": false
          },
          "latamOnly": {
            "title": "Hiring: open to Latin America",
            "type": "boolean",
            "description": "Job posts open to Latin America (LATAM, Americas or worldwide remote).",
            "default": false
          },
          "includeComments": {
            "title": "Comments",
            "type": "boolean",
            "description": "Each story's discussion (one read per story), in HN's ranked order. Each comment is billed as one item.",
            "default": false
          },
          "maxCommentsPerStory": {
            "title": "Max comments per story",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "0 = the whole discussion.",
            "default": 100
          },
          "maxCommentDepth": {
            "title": "Comment depth",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "1 = top-level comments only, 2 = and their replies, ... 0 = every level.",
            "default": 0
          },
          "commentSort": {
            "title": "Comment order",
            "enum": [
              "ranked",
              "newest",
              "oldest"
            ],
            "type": "string",
            "description": "Order of top-level comments; replies follow their parent.",
            "default": "ranked"
          },
          "commentsFormat": {
            "title": "Comments as",
            "enum": [
              "rows",
              "nested"
            ],
            "type": "string",
            "description": "Either way each comment is one item.",
            "default": "rows"
          },
          "includeAuthorProfile": {
            "title": "Author profile on each row",
            "type": "boolean",
            "description": "Adds the author's karma, account creation date, account age and submission count to every story and comment. Free.",
            "default": false
          },
          "includeUserSubmissions": {
            "title": "Users: their submissions",
            "type": "boolean",
            "description": "With Usernames: also their stories (and comments, below), newest first, billed as items.",
            "default": false
          },
          "submissionTypes": {
            "title": "Users: submission types",
            "uniqueItems": true,
            "type": "array",
            "description": "Which submissions to read.",
            "items": {
              "type": "string",
              "enum": [
                "story",
                "comment"
              ],
              "enumTitles": [
                "Stories",
                "Comments"
              ]
            },
            "default": [
              "story"
            ]
          },
          "maxSubmissionsPerUser": {
            "title": "Users: max submissions",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Per user and type. Empty = Max rows per source."
          },
          "trendWindowHours": {
            "title": "Trend window (hours)",
            "minimum": 1,
            "maximum": 2160,
            "type": "integer",
            "description": "Length of the current window; it is compared with the window just before it. 168 = a week.",
            "default": 24
          },
          "risingTermsMax": {
            "title": "Rising terms: max",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "How many rising terms to return.",
            "default": 25
          },
          "risingMinMentions": {
            "title": "Rising terms: min stories",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "A term must appear in at least this many titles in the window.",
            "default": 3
          },
          "risingMinGrowthPercent": {
            "title": "Rising terms: min growth %",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Growth against the previous window (100 = doubled). New terms always qualify.",
            "default": 100
          },
          "monitorMode": {
            "title": "Only new since the last run",
            "type": "boolean",
            "description": "Pairs with a schedule: rows delivered by earlier runs are skipped (and not charged). Searches read newest first.",
            "default": false
          },
          "monitorName": {
            "title": "Monitor name",
            "type": "string",
            "description": "One memory per name: use a different name for each watch, e.g. brand-mentions.",
            "default": "default"
          },
          "resetMonitor": {
            "title": "Reset the monitor",
            "type": "boolean",
            "description": "Forget what this monitor delivered and start over.",
            "default": false
          },
          "webhookUrl": {
            "title": "Webhook URL",
            "type": "string",
            "description": "Receives the run's new stories and posts as one JSON POST."
          },
          "slackWebhookUrl": {
            "title": "Slack webhook URL",
            "type": "string",
            "description": "Slack incoming-webhook URL for the same alert."
          },
          "discordWebhookUrl": {
            "title": "Discord webhook URL",
            "type": "string",
            "description": "Discord webhook URL for the same alert."
          },
          "alertMinPoints": {
            "title": "Alert: minimum points",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Only stories with at least this many points go into the alert (all rows still go to the dataset)."
          },
          "maxResultsPerSource": {
            "title": "Max rows per source",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Per list, search, day, user or hiring month. Empty = 100 (a hiring month: every post). Lists hold 500 at most; a search goes past HN Search's 1,000-hit cap by walking back in time."
          },
          "maxResults": {
            "title": "Max rows in total",
            "minimum": 0,
            "maximum": 10000000,
            "type": "integer",
            "description": "A cap for the whole run, comments included. 0 = no cap besides the per-source one.",
            "default": 0
          },
          "compactOutput": {
            "title": "Compact rows",
            "type": "boolean",
            "description": "Drop the raw HTML, link lists and id lists: core fields only (for AI agents and spreadsheets).",
            "default": false
          },
          "includeDead": {
            "title": "Include dead and deleted",
            "type": "boolean",
            "description": "Keep items HN marks dead or deleted (they carry little or no text).",
            "default": false
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 64,
            "type": "integer",
            "description": "Item reads in flight at once.",
            "default": 32
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Not needed: both HN APIs answer directly. If a request is refused the run moves to the Apify datacenter, then residential proxy by itself.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}