{
  "openapi": "3.0.1",
  "info": {
    "title": "Hacker News Scraper: Stories, Comments & Who Is Hiring",
    "description": "Search Hacker News stories and comments by keyword, author, date and points, past the 1,000-result limit. Front-page lists, full comment threads as flat rows, monthly Who is hiring posts and user profiles. $0.50 per 1,000 rows.",
    "version": "0.1",
    "x-build-id": "BPZIcT8rZgNyNX6OM"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/tagadanar~hacker-news-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-tagadanar-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/tagadanar~hacker-news-scraper/runs": {
      "post": {
        "operationId": "runs-sync-tagadanar-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/tagadanar~hacker-news-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-tagadanar-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": {
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "Keywords to search on Hacker News, one per line (up to 100). Each term is searched in titles, URLs, story text and, with Content type set to comments, in comment text. Leave empty to use only the lists, story URLs, hiring thread or user profiles below.",
            "items": {
              "type": "string"
            }
          },
          "contentType": {
            "title": "Content type",
            "enum": [
              "story",
              "comment",
              "all",
              "ask_hn",
              "show_hn",
              "job"
            ],
            "type": "string",
            "description": "What the search terms look for: stories, comments, both, Ask HN posts, Show HN posts or job posts.",
            "default": "story"
          },
          "sort": {
            "title": "Sort",
            "enum": [
              "relevance",
              "newest"
            ],
            "type": "string",
            "description": "Relevance returns the best matches first (at most 1,000 per search term, a limit of the search engine). Newest returns the most recent first and keeps going past 1,000 by walking back through the dates.",
            "default": "relevance"
          },
          "exactWords": {
            "title": "Exact words only",
            "type": "boolean",
            "description": "On: a search for \"rust\" does not also return \"trust\" or \"just\" (near-spellings). Turn off to accept typo matches.",
            "default": true
          },
          "authors": {
            "title": "Authors",
            "type": "array",
            "description": "Only posts by these Hacker News usernames. Combine with search terms, or use alone (with no search term) to get everything these users posted, filtered by Content type.",
            "items": {
              "type": "string"
            }
          },
          "dateFrom": {
            "title": "Posted on or after",
            "type": "string",
            "description": "YYYY-MM-DD (UTC). Applies to searches and front-page lists."
          },
          "dateTo": {
            "title": "Posted on or before",
            "type": "string",
            "description": "YYYY-MM-DD (UTC), inclusive. Applies to searches and front-page lists."
          },
          "lastDays": {
            "title": "Only the last N days",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Shortcut for a rolling window: only posts from the last N days. Replaces Posted on or after when both are set. Handy for a scheduled run that watches new mentions."
          },
          "minPoints": {
            "title": "Minimum points",
            "minimum": 0,
            "type": "integer",
            "description": "Only stories with at least this many points. Stories only (comments have no public score)."
          },
          "minComments": {
            "title": "Minimum comments",
            "minimum": 0,
            "type": "integer",
            "description": "Only stories with at least this many comments."
          },
          "lists": {
            "title": "Front-page lists",
            "type": "array",
            "description": "Hacker News lists in their live order, with a rank field: Top (the front page, up to 500), New, Best, Ask HN, Show HN and Jobs. Date, points and comment filters apply.",
            "items": {
              "type": "string",
              "enum": [
                "top",
                "new",
                "best",
                "ask",
                "show",
                "job"
              ],
              "enumTitles": [
                "Top (front page)",
                "New",
                "Best",
                "Ask HN",
                "Show HN",
                "Jobs"
              ]
            }
          },
          "storyUrls": {
            "title": "Story URLs or IDs",
            "type": "array",
            "description": "news.ycombinator.com/item?id=... links or bare item IDs (up to 500). Returns the story and its whole comment thread as flat rows (depth, parent ID), up to Max comments per story. A comment link returns that comment and its replies.",
            "items": {
              "type": "string"
            }
          },
          "hiringThread": {
            "title": "Monthly hiring thread",
            "enum": [
              "none",
              "who_is_hiring",
              "who_wants_to_be_hired",
              "freelancer"
            ],
            "type": "string",
            "description": "Pull the job posts (top-level comments) of the latest monthly thread. Each row has a headline field with the post's first line (usually Company | Role | Location | Remote). Max results caps the posts. For an older month, paste that thread's URL in Story URLs.",
            "default": "none"
          },
          "userProfiles": {
            "title": "User profiles",
            "type": "array",
            "description": "Hacker News usernames or profile links (up to 500). One row each: karma, account creation date, about text, number of submissions.",
            "items": {
              "type": "string"
            }
          },
          "includeComments": {
            "title": "Add comment threads to found stories",
            "type": "boolean",
            "description": "For every story found by a search or a list, also return its comments as flat rows (up to Max comments per story). Each comment row is billed like any other row.",
            "default": false
          },
          "maxCommentsPerStory": {
            "title": "Max comments per story",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Cap on comment rows per story for Story URLs and Add comment threads. Comments come in thread order (a reply right after its parent). Default 100, max 10,000.",
            "default": 100
          },
          "maxResults": {
            "title": "Max results per search or list",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Cap on rows per search term, per front-page list and for the hiring thread (comment threads come on top, see Max comments per story). Default 100, max 10,000.",
            "default": 100
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}