{
  "openapi": "3.0.1",
  "info": {
    "title": "Hacker News Scraper: Search, Threads & Monitoring",
    "description": "Scrape Hacker News stories, comments and hiring posts. Search and compare discussions, enrich GitHub links, and monitor new mentions or engagement changes.",
    "version": "0.0",
    "x-build-id": "O8te0Bdh0NpyHoGaB"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/amygraphics~hacker-news-intelligence/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-amygraphics-hacker-news-intelligence",
        "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/amygraphics~hacker-news-intelligence/runs": {
      "post": {
        "operationId": "runs-sync-amygraphics-hacker-news-intelligence",
        "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/amygraphics~hacker-news-intelligence/run-sync": {
      "post": {
        "operationId": "run-sync-amygraphics-hacker-news-intelligence",
        "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": "Workflow",
            "enum": [
              "search",
              "top",
              "new",
              "best",
              "ask",
              "show",
              "job",
              "user",
              "threads",
              "history",
              "discover",
              "brand_monitor",
              "competitor_tracking",
              "hiring",
              "show_analysis",
              "compare"
            ],
            "type": "string",
            "description": "Search, ranked feeds, item threads, a user, a historical front page, or monitoring.",
            "default": "search"
          },
          "queries": {
            "title": "Multiple search queries",
            "type": "array",
            "description": "Optional list of up to 10 queries; deduplicated, not globally ranked. Overrides query.",
            "items": {
              "type": "string"
            }
          },
          "domains": {
            "title": "Domain filter",
            "type": "array",
            "description": "Optional exact domains or subdomains, filtered locally. Feed limits apply before filtering.",
            "items": {
              "type": "string"
            }
          },
          "query": {
            "title": "Search query",
            "type": "string",
            "description": "Search words or quoted exact phrase. An empty query searches all.",
            "default": ""
          },
          "tags": {
            "title": "Content type",
            "enum": [
              "story",
              "comment",
              "poll",
              "show_hn",
              "ask_hn",
              "front_page",
              "all"
            ],
            "type": "string",
            "description": "Algolia item type; hiring and Show workflows override this.",
            "default": "story"
          },
          "sort": {
            "title": "Search order",
            "enum": [
              "date",
              "relevance"
            ],
            "type": "string",
            "description": "Newest first or relevance; auto-split is bucket-ordered, not globally ranked.",
            "default": "date"
          },
          "author": {
            "title": "Author",
            "type": "string",
            "description": "Optional HN username."
          },
          "username": {
            "title": "User submissions",
            "type": "string",
            "description": "Username required by user mode."
          },
          "hiringThreadType": {
            "title": "Hiring thread type",
            "enum": [
              "hiring",
              "seeking",
              "freelance"
            ],
            "type": "string",
            "description": "Hiring, seeking work, or freelance; date range selects historical thread.",
            "default": "hiring"
          },
          "keywords": {
            "title": "Hiring keyword filters",
            "type": "array",
            "description": "Optional OR terms for hiring listings; case-insensitive.",
            "items": {
              "type": "string"
            }
          },
          "itemIds": {
            "title": "HN item IDs or URLs",
            "type": "array",
            "description": "For thread mode. Numeric IDs or https://news.ycombinator.com/item?id=... only.",
            "items": {
              "type": "string"
            }
          },
          "dateFrom": {
            "title": "Start date",
            "type": "string",
            "description": "Optional UTC date YYYY-MM-DD; end dates inclusive. historyDate required for historical mode."
          },
          "dateTo": {
            "title": "End date",
            "type": "string",
            "description": "Optional UTC date YYYY-MM-DD; end dates inclusive. historyDate required for historical mode."
          },
          "historyDate": {
            "title": "Historical front-page date",
            "type": "string",
            "description": "Optional UTC date YYYY-MM-DD; end dates inclusive. historyDate required for historical mode."
          },
          "compareFrom": {
            "title": "Comparison start",
            "type": "string",
            "description": "Optional UTC date YYYY-MM-DD; end dates inclusive. historyDate required for historical mode."
          },
          "compareTo": {
            "title": "Comparison end",
            "type": "string",
            "description": "Optional UTC date YYYY-MM-DD; end dates inclusive. historyDate required for historical mode."
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum primary dataset rows; reaching cap can mean incomplete search.",
            "default": 50
          },
          "maxRequests": {
            "title": "Maximum source requests",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Hard request budget across source searches, comment trees, and enrichments.",
            "default": 300
          },
          "maxComments": {
            "title": "Comments per story",
            "minimum": 0,
            "maximum": 500,
            "type": "integer",
            "description": "Total comments including nested replies per story; output includes explicit truncation.",
            "default": 30
          },
          "commentDepth": {
            "title": "Comment depth",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "0 is top-level only; maximum reply depth.",
            "default": 3
          },
          "maxEnrich": {
            "title": "Maximum enriched results",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Upper bound for author and GitHub enrichment.",
            "default": 20
          },
          "maxSplitBuckets": {
            "title": "Search partition cap",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum date partitions processed. Overflow is reported.",
            "default": 20
          },
          "minPoints": {
            "title": "Minimum points",
            "minimum": 0,
            "maximum": 100000000,
            "type": "integer",
            "description": "Minimum HN score; Algolia may omit scores on comments.",
            "default": 0
          },
          "minComments": {
            "title": "Minimum comments",
            "minimum": 0,
            "maximum": 100000000,
            "type": "integer",
            "description": "Minimum comment count on stories.",
            "default": 0
          },
          "expandQuery": {
            "title": "Expand common query abbreviations",
            "type": "boolean",
            "description": "Optional curated expansions for AI, LLM, k8s and JS; extra source requests.",
            "default": false
          },
          "remoteOnly": {
            "title": "Remote only",
            "type": "boolean",
            "description": "Filter hiring listings containing remote, WFH or distributed.",
            "default": false
          },
          "includeDead": {
            "title": "Include dead hiring posts",
            "type": "boolean",
            "description": "Include posts flagged dead by HN.",
            "default": false
          },
          "autoSplit": {
            "title": "Partition large searches",
            "type": "boolean",
            "description": "Split date ranges over 1,000 hits. Coverage and request limits reported.",
            "default": false
          },
          "includeComments": {
            "title": "Include comment trees",
            "type": "boolean",
            "description": "Fetch nested reply trees as comments with parentId and depth inside each story row.",
            "default": false
          },
          "includeAuthorProfile": {
            "title": "Include author profiles",
            "type": "boolean",
            "description": "Optional public HN karma and submission count.",
            "default": false
          },
          "includeGithub": {
            "title": "Enrich GitHub links",
            "type": "boolean",
            "description": "For GitHub repository URLs add stars, forks, language and push date.",
            "default": false
          },
          "parseHiring": {
            "title": "Parse hiring comments",
            "type": "boolean",
            "description": "Heuristically extract company, remote mention and URLs from comments; verify manually.",
            "default": false
          },
          "includeEmails": {
            "title": "Include parsed emails",
            "type": "boolean",
            "description": "Opt in to extracting emails found in public hiring text. Raw source text may contain emails.",
            "default": false
          },
          "watch": {
            "title": "Only new or changed items",
            "type": "boolean",
            "description": "Uses persistent named storage. Do not run same watch concurrently.",
            "default": false
          },
          "watchChanges": {
            "title": "Include changed metrics",
            "type": "boolean",
            "description": "For existing items, include changes in points and comment count with before/after evidence.",
            "default": false
          },
          "baselineOnly": {
            "title": "Baseline on first run",
            "type": "boolean",
            "description": "First watch run records baseline without emitting or alerting; fails closed on partial search.",
            "default": true
          },
          "smartAlerts": {
            "title": "Send only higher-scored alerts",
            "type": "boolean",
            "description": "Send only scores >=50. Scores are heuristic and not validated.",
            "default": false
          },
          "watchName": {
            "title": "Watch name",
            "type": "string",
            "description": "Required for monitoring; letters, numbers, hyphen or underscore. Do not run same watch simultaneously."
          },
          "githubToken": {
            "title": "Optional GitHub token",
            "type": "string",
            "description": "Optional token for GitHub public API only. Stored as secret."
          },
          "webhookUrl": {
            "title": "Slack or Discord webhook",
            "type": "string",
            "description": "Optional secret incoming webhook. Only hooks.slack.com or discord.com official webhook routes are accepted."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}