{
  "openapi": "3.0.1",
  "info": {
    "title": "Hacker News Scraper — Stories, Comments, Ask HN, Show HN",
    "description": "Scrape Hacker News stories and full comment threads via the official Firebase API. Top stories, Ask HN, Show HN, jobs, new. Built for founder/VC sentiment monitoring, topic clustering, trend tracking. Clean JSON, comment tree depth-controlled.",
    "version": "0.2",
    "x-build-id": "E2bmLVRg4ts6a7d9f"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/foxlabs~hackernews-intelligence/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-foxlabs-hackernews-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/foxlabs~hackernews-intelligence/runs": {
      "post": {
        "operationId": "runs-sync-foxlabs-hackernews-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/foxlabs~hackernews-intelligence/run-sync": {
      "post": {
        "operationId": "run-sync-foxlabs-hackernews-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": "Mode",
            "enum": [
              "search",
              "who_is_hiring",
              "feed"
            ],
            "type": "string",
            "description": "Search = query the full HN archive (stories & comments) with points/date filters — unlimited depth, no 1,000-result wall. Who is hiring = parse the monthly 'Ask HN: Who is hiring?' thread into structured job posts (company, role, remote, e-mails). Feed = live front page / new / best / ask / show / jobs.",
            "default": "search"
          },
          "query": {
            "title": "Search query",
            "type": "string",
            "description": "Search mode. What to search for — a brand, product, topic (e.g. \"postgres\", \"Supabase\", \"rust async\"). Leave empty to browse everything in the date window."
          },
          "searchType": {
            "title": "Search in",
            "enum": [
              "stories",
              "comments",
              "both"
            ],
            "type": "string",
            "description": "Search mode. Stories = titles/links (launches, articles). Comments = the discussion text (where brand mentions and opinions actually live). Both = the two merged.",
            "default": "stories"
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "date",
              "relevance"
            ],
            "type": "string",
            "description": "Date (default) streams newest-first with UNLIMITED depth. Relevance uses the API's ranked order but is hard-capped at 1,000 results by the API.",
            "default": "date"
          },
          "minPoints": {
            "title": "Min points",
            "minimum": 0,
            "type": "integer",
            "description": "Search mode, stories only. Keep only stories with at least this many upvotes (e.g. 100 = front-page material). Leave empty for all."
          },
          "minComments": {
            "title": "Min comments",
            "minimum": 0,
            "type": "integer",
            "description": "Search mode, stories only. Keep only stories with at least this many comments. Leave empty for all."
          },
          "author": {
            "title": "Author",
            "type": "string",
            "description": "Search mode. Only items by this HN username (e.g. \"patio11\"). Leave empty for all authors."
          },
          "threadType": {
            "title": "Thread type",
            "enum": [
              "hiring",
              "wants_to_be_hired",
              "freelancer"
            ],
            "type": "string",
            "description": "Which monthly thread to parse: companies hiring (default), people looking for work, or the freelancer thread.",
            "default": "hiring"
          },
          "month": {
            "title": "Month (YYYY-MM)",
            "pattern": "^[0-9]{4}-[0-9]{2}$",
            "type": "string",
            "description": "Which month's thread, e.g. 2026-07. Leave empty for the latest thread."
          },
          "datePreset": {
            "title": "Date range",
            "enum": [
              "last_24_hours",
              "last_7_days",
              "last_30_days",
              "last_90_days",
              "last_year",
              "all_time",
              "custom"
            ],
            "type": "string",
            "description": "Search mode: how far back to search. The archive goes back to 2007 — 'All time' really is all time.",
            "default": "all_time"
          },
          "dateFrom": {
            "title": "Custom from date",
            "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$",
            "type": "string",
            "description": "YYYY-MM-DD. Only used when Date range = Custom."
          },
          "dateTo": {
            "title": "Custom to date",
            "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$",
            "type": "string",
            "description": "YYYY-MM-DD. Only used when Date range = Custom. Leave empty for 'today'."
          },
          "feed": {
            "title": "Feed",
            "enum": [
              "top",
              "new",
              "best",
              "ask",
              "show",
              "jobs"
            ],
            "type": "string",
            "description": "Feed mode: which live list to pull.",
            "default": "top"
          },
          "includeComments": {
            "title": "Include comment threads",
            "type": "boolean",
            "description": "Feed mode: also walk each story's comment tree into the row (slower).",
            "default": false
          },
          "commentDepth": {
            "title": "Comment depth",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Feed mode, with comments on: how deep to walk each thread (1-5).",
            "default": 2
          },
          "maxCommentsPerStory": {
            "title": "Max comments per story",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Feed mode, with comments on: cap per story (1-500).",
            "default": 50
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 0,
            "type": "integer",
            "description": "Hard cap on dataset rows. Set 0 for unlimited (the sliding-window search really can walk the whole archive).",
            "default": 1000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}