{
  "openapi": "3.0.1",
  "info": {
    "title": "Hacker News Scraper: Stories, Comments & Parent IDs",
    "description": "Export Hacker News stories and comments from Top, New, Best, Ask, Show and Jobs lists, exact IDs or keyword search. Parent IDs, author karma, only-new monitoring and Slack or Notion summary. No API key.",
    "version": "0.3",
    "x-build-id": "euoMKreHT1yryGdzk"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/cliqtomedia~hacker-news-stories-comments-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-cliqtomedia-hacker-news-stories-comments-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/cliqtomedia~hacker-news-stories-comments-scraper/runs": {
      "post": {
        "operationId": "runs-sync-cliqtomedia-hacker-news-stories-comments-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/cliqtomedia~hacker-news-stories-comments-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-cliqtomedia-hacker-news-stories-comments-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": {
          "listMode": {
            "title": "HN list",
            "enum": [
              "top",
              "new",
              "best",
              "ask",
              "show",
              "job"
            ],
            "type": "string",
            "description": "Official HN list to read. Used only when there are no exact item IDs and no keyword search.",
            "default": "top"
          },
          "itemIds": {
            "title": "Exact item IDs",
            "maxItems": 100,
            "type": "array",
            "description": "Optional HN item IDs, at most 100. If filled, they replace the list and the search. Duplicates are fetched once.",
            "items": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991
            },
            "default": []
          },
          "maxStories": {
            "title": "Maximum root items",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "How many stories (or search hits) to read, in list or input order. 1 to 1000. Start with 3.",
            "default": 3
          },
          "includeComments": {
            "title": "Include comments",
            "type": "boolean",
            "description": "Return replies as separate rows. Turn off to get stories only.",
            "default": true
          },
          "maxCommentsPerStory": {
            "title": "Maximum comments per root",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "Comments collected per root item, 0 to 1000. Zero means no comments, never unlimited.",
            "default": 5
          },
          "maxDepth": {
            "title": "Maximum reply depth",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "Root is depth 0, a direct reply is 1. Zero reads roots only. 0 to 20.",
            "default": 2
          },
          "maxNodes": {
            "title": "Maximum nodes in the run",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Total roots plus comments to fetch in one run, 1 to 5000.",
            "default": 30
          },
          "maxItems": {
            "title": "Maximum rows in the run (optional)",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop when this many rows are saved (stories and comments together). 1 to 100000. Empty means no extra limit."
          },
          "searchQueries": {
            "title": "Search keywords",
            "maxItems": 10,
            "type": "array",
            "description": "Up to 10 words or phrases, each up to 200 characters. If filled, the Actor searches Hacker News instead of reading a list (exact item IDs still come first).",
            "items": {
              "type": "string"
            }
          },
          "searchTags": {
            "title": "What to search",
            "enum": [
              "story",
              "comment",
              "ask_hn",
              "show_hn",
              "poll",
              "job",
              "front_page",
              "any"
            ],
            "type": "string",
            "description": "Type of items to find.",
            "default": "story"
          },
          "searchSort": {
            "title": "Sort by",
            "enum": [
              "relevance",
              "date"
            ],
            "type": "string",
            "description": "Relevance or newest first.",
            "default": "relevance"
          },
          "searchAuthor": {
            "title": "Author (optional)",
            "type": "string",
            "description": "HN username, for example pg. Works with or without keywords."
          },
          "dateFrom": {
            "title": "From date (optional)",
            "type": "string",
            "description": "YYYY-MM-DD, or relative like \"7 days\", \"24 hours\", \"2 weeks\", \"3 months\"."
          },
          "dateTo": {
            "title": "To date (optional)",
            "type": "string",
            "description": "YYYY-MM-DD (the whole day is included), or relative like \"1 day\"."
          },
          "minPoints": {
            "title": "Minimum points",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Only items with at least this many points. 0 to 100000."
          },
          "minComments": {
            "title": "Minimum comments",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Only items with at least this many comments. 0 to 100000."
          },
          "onlyNew": {
            "title": "Only new stories",
            "type": "boolean",
            "description": "Skip stories saved by earlier runs with the same monitor name. The first run returns everything. Skipped stories are not fetched or billed.",
            "default": false
          },
          "monitorName": {
            "title": "Monitor name",
            "type": "string",
            "description": "Name of the list of seen stories for Only new stories. Use one name per watchlist. Letters, digits, spaces, _ . -",
            "default": "default"
          },
          "deliveryConnector": {
            "title": "Send results to (optional)",
            "type": "string",
            "description": "Your Slack, Notion or other MCP connector. After the run the Actor posts a short summary there. Connect services once in Apify Console → MCP connectors."
          },
          "deliveryTarget": {
            "title": "Notion page or channel (optional)",
            "type": "string",
            "description": "Where to post the summary: a Notion page link (each run is added on top of that page) or a Slack channel ID. Notion needs a page here; without it the summary is not sent and the run summary says why."
          },
          "includeAuthorKarma": {
            "title": "Add author karma",
            "type": "boolean",
            "description": "For each story, also read the author profile: authorKarma and authorCreatedAt. One extra request per author.",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}