{
  "openapi": "3.0.1",
  "info": {
    "title": "Hacker News Stories & Comments Scraper ($1/1K)",
    "description": "Hacker News stories and comments scraper: title, URL, domain, points, comment count, author, date and text, also for Show HN, Ask HN, jobs and the front page. Takes keywords with filters for points, comments, dates, author or domain. Use it to track mentions of a product on HN.",
    "version": "1.0",
    "x-build-id": "pnjLfU1hTvr9MJ5fO"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/tamnt67~hacker-news-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-tamnt67-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/tamnt67~hacker-news-scraper/runs": {
      "post": {
        "operationId": "runs-sync-tamnt67-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/tamnt67~hacker-news-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-tamnt67-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": {
          "queries": {
            "title": "Search queries",
            "type": "array",
            "description": "Keywords to search, one per line. Leave empty to list by type and filters only.",
            "items": {
              "type": "string"
            }
          },
          "itemType": {
            "title": "Item type",
            "enum": [
              "story",
              "comment",
              "show_hn",
              "ask_hn",
              "job",
              "poll",
              "front_page"
            ],
            "type": "string",
            "description": "What to return.",
            "default": "story"
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "relevance",
              "date"
            ],
            "type": "string",
            "description": "Most relevant first, or newest first.",
            "default": "relevance"
          },
          "minPoints": {
            "title": "Minimum points",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Only items with at least this many points. 0 for no limit.",
            "default": 0
          },
          "minComments": {
            "title": "Minimum comments",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Only stories with at least this many comments. 0 for no limit.",
            "default": 0
          },
          "dateFrom": {
            "title": "Date from",
            "type": "string",
            "description": "Optional start date, for example 2026-01-01."
          },
          "dateTo": {
            "title": "Date to",
            "type": "string",
            "description": "Optional end date, for example 2026-06-30."
          },
          "author": {
            "title": "Author",
            "type": "string",
            "description": "Optional Hacker News user name to limit results to."
          },
          "domain": {
            "title": "Domain",
            "type": "string",
            "description": "Optional site of the linked article, for example github.com."
          },
          "maxItemsPerQuery": {
            "title": "Max items per query",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Stop after this many items for each query (the API allows up to 1,000).",
            "default": 100
          },
          "feed": {
            "title": "Live feed (optional)",
            "enum": [
              "top",
              "new",
              "best",
              "ask",
              "show",
              "job"
            ],
            "type": "string",
            "description": "Optional. Also read a live Hacker News list in its current order: top (front page), new, best, Ask HN, Show HN or jobs, up to Max items per query. Rows get feed and feedRank. The points, comments, date, author and domain filters apply; Item type and Sort by do not."
          },
          "storyIds": {
            "title": "Story IDs or URLs (optional)",
            "type": "array",
            "description": "Optional. Hacker News item IDs (8863) or links (https://news.ycombinator.com/item?id=8863). Each one returns that item; turn on Include comments to get its whole comment thread.",
            "items": {
              "type": "string"
            }
          },
          "includeComments": {
            "title": "Include comments",
            "type": "boolean",
            "description": "Adds a comments list (id, parentId, author, createdAt, depth, text) to every story, Ask HN, Show HN, job or poll. One extra request per story with comments.",
            "default": false
          },
          "maxCommentsPerStory": {
            "title": "Max comments per story",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Upper limit of comments (replies included) per story when Include comments is on.",
            "default": 100
          },
          "commentDepth": {
            "title": "Comment depth",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "How deep to follow reply chains: 1 = only top-level comments, 2 = plus their direct replies, and so on.",
            "default": 50
          },
          "includeAuthorProfile": {
            "title": "Include author profile",
            "type": "boolean",
            "description": "Adds authorKarma and authorCreatedAt (account creation date) from the author's public Hacker News profile. One extra request per distinct author.",
            "default": false
          },
          "whoIsHiringMonths": {
            "title": "\"Who is hiring?\" months (optional)",
            "minimum": 0,
            "maximum": 24,
            "type": "integer",
            "description": "Optional. Also collect the job posts (top-level comments) of the last N monthly \"Ask HN: Who is hiring?\" threads, with hiringHeadline, hiringCompany, hiringRemote and hiringSalary parsed from the text. Max items per query applies per thread. 0 = off."
          },
          "hiringKeywords": {
            "title": "Job post keywords",
            "type": "array",
            "description": "Optional. Keep only \"Who is hiring?\" posts that contain at least one of these words, for example rust or python (not case-sensitive).",
            "items": {
              "type": "string"
            }
          },
          "hiringRemoteOnly": {
            "title": "Remote job posts only",
            "type": "boolean",
            "description": "Keep only \"Who is hiring?\" posts whose first line mentions remote work.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Proxy for the API requests. Usually not needed; datacenter proxy is fine.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}