{
  "openapi": "3.0.1",
  "info": {
    "title": "Hacker News Intelligence Scraper",
    "description": "Scrape Hacker News stories, comments, jobs, Ask HN, Show HN, and keyword search results. Export clean JSON or CSV with scores, authors, URLs, dates, filters, and nested discussions. No login or API key required.",
    "version": "1.0",
    "x-build-id": "tie1gpjznkNrHj4xK"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/fascinating_lentil~hacker-news-intelligence-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-fascinating_lentil-hacker-news-intelligence-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/fascinating_lentil~hacker-news-intelligence-scraper/runs": {
      "post": {
        "operationId": "runs-sync-fascinating_lentil-hacker-news-intelligence-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/fascinating_lentil~hacker-news-intelligence-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-fascinating_lentil-hacker-news-intelligence-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",
        "required": [
          "mode",
          "feed",
          "query",
          "searchType",
          "maxResults"
        ],
        "properties": {
          "mode": {
            "title": "Collection mode",
            "enum": [
              "feed",
              "search",
              "items"
            ],
            "type": "string",
            "description": "Choose a Hacker News feed, keyword search, or explicit item IDs.",
            "default": "feed"
          },
          "feed": {
            "title": "Feed",
            "enum": [
              "top",
              "new",
              "best",
              "ask",
              "show",
              "jobs"
            ],
            "type": "string",
            "description": "The official Hacker News feed to collect when mode is Feed.",
            "default": "top"
          },
          "query": {
            "title": "Search query",
            "type": "string",
            "description": "Full-text query used in Keyword search mode.",
            "default": "artificial intelligence"
          },
          "searchType": {
            "title": "Search result type",
            "enum": [
              "story",
              "comment"
            ],
            "type": "string",
            "description": "Search stories or comments through the public HN Algolia API.",
            "default": "story"
          },
          "itemIds": {
            "title": "Item IDs",
            "type": "array",
            "description": "Numeric Hacker News item IDs used in Specific item IDs mode.",
            "items": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum number of records written to the dataset.",
            "default": 100
          },
          "minScore": {
            "title": "Minimum score",
            "minimum": 0,
            "type": "integer",
            "description": "Keep items with at least this many points.",
            "default": 0
          },
          "minComments": {
            "title": "Minimum comment count",
            "minimum": 0,
            "type": "integer",
            "description": "Keep stories with at least this many comments.",
            "default": 0
          },
          "includeKeywords": {
            "title": "Include keywords",
            "type": "array",
            "description": "Keep records containing at least one keyword in the title or text. Leave empty to disable.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "type": "array",
            "description": "Remove records containing any of these keywords in the title or text.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "authors": {
            "title": "Authors",
            "type": "array",
            "description": "Only keep records by these exact Hacker News usernames.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "domain": {
            "title": "Domain contains",
            "type": "string",
            "description": "Only keep external links whose hostname contains this value.",
            "default": ""
          },
          "fromDate": {
            "title": "Published after",
            "type": "string",
            "description": "Optional ISO date or date-time, for example 2026-01-01.",
            "default": ""
          },
          "toDate": {
            "title": "Published before",
            "type": "string",
            "description": "Optional ISO date or date-time, for example 2026-12-31.",
            "default": ""
          },
          "includeComments": {
            "title": "Include nested comments",
            "type": "boolean",
            "description": "Fetch comments and nest them inside each result record.",
            "default": false
          },
          "maxCommentsPerItem": {
            "title": "Maximum comments per item",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum nested comments fetched for each result.",
            "default": 50
          },
          "commentDepth": {
            "title": "Comment depth",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Maximum nested reply depth to traverse.",
            "default": 3
          },
          "includeDeadOrDeleted": {
            "title": "Include dead or deleted items",
            "type": "boolean",
            "description": "Include records marked dead or deleted by Hacker News.",
            "default": 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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}