{
  "openapi": "3.0.1",
  "info": {
    "title": "Hacker News Search Scraper | Stories & Comments",
    "description": "Search Hacker News by keyword, author, points and date. Returns title, link, author, points, comment count, text and publish date for stories, comments, Ask/Show HN, polls and jobs. Many queries per run, no login or proxy.",
    "version": "0.0",
    "x-build-id": "h5uDnC8TP8bgQ5ARt"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/genial_candlestand~hacker-news-search-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-genial_candlestand-hacker-news-search-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/genial_candlestand~hacker-news-search-scraper/runs": {
      "post": {
        "operationId": "runs-sync-genial_candlestand-hacker-news-search-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/genial_candlestand~hacker-news-search-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-genial_candlestand-hacker-news-search-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 terms",
            "type": "array",
            "description": "Keywords to search on Hacker News, one per line. Each term is a separate search and every row shows which term found it. Use \"exact phrase\" in quotes and -word to exclude. Leave empty to browse by author, date range, points or a type such as Front page.",
            "items": {
              "type": "string"
            }
          },
          "type": {
            "title": "Item type",
            "enum": [
              "story",
              "comment",
              "all",
              "ask_hn",
              "show_hn",
              "front_page",
              "poll",
              "job"
            ],
            "type": "string",
            "description": "What to search: stories (link and text posts), comments, all types, only Ask HN, only Show HN, polls, job ads, or stories that reached the front page. Minimum points/comments do not work with Comments or Jobs (they have no points on HN).",
            "default": "story"
          },
          "sort": {
            "title": "Sort by",
            "enum": [
              "relevance",
              "date"
            ],
            "type": "string",
            "description": "Relevance (best match first, at most 1000 results per search term — a limit of Hacker News search) or Date (newest first, no 1000 limit: use it to collect everything or to monitor new posts).",
            "default": "relevance"
          },
          "maxItemsPerQuery": {
            "title": "Max results per search term",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop each search term after this many results. With Sort by Relevance at most 1000 are available; with Sort by Date up to 100000.",
            "default": 100
          },
          "author": {
            "title": "Author",
            "type": "string",
            "description": "Only items posted by this Hacker News user, e.g. pg or a profile URL like https://news.ycombinator.com/user?id=pg. Usernames are case-sensitive. Works with or without search terms."
          },
          "minPoints": {
            "title": "Minimum points",
            "minimum": 0,
            "type": "integer",
            "description": "Only items with at least this many points (upvotes). Works for stories, Ask/Show HN, front page and polls; not for Comments or Jobs. With type All, comments and jobs drop out of the results."
          },
          "minComments": {
            "title": "Minimum comments",
            "minimum": 0,
            "type": "integer",
            "description": "Only items with at least this many comments. Works for stories, Ask/Show HN, front page and polls; not for Comments or Jobs. With type All, comments and jobs drop out of the results."
          },
          "dateFrom": {
            "title": "Posted from",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Only items posted on or after this day (UTC), format YYYY-MM-DD, e.g. 2024-01-01. Works with every type and sort."
          },
          "dateTo": {
            "title": "Posted to",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Only items posted on or before this day (UTC, the whole day included), format YYYY-MM-DD, e.g. 2024-01-31. Must not be earlier than Posted from."
          },
          "searchIn": {
            "title": "Search in",
            "enum": [
              "all",
              "title",
              "url",
              "text"
            ],
            "type": "string",
            "description": "Where the search terms must match: everywhere (title, link, text, author), only the title, only the link URL (e.g. github.com) or only the post/comment text. Title and URL work for stories, Ask/Show HN, front page, polls and jobs, not for Comments. Needs search terms.",
            "default": "all"
          },
          "exactMatch": {
            "title": "Exact words only (no typo matching)",
            "type": "boolean",
            "description": "Turn off Hacker News search's typo tolerance, so rust no longer also matches just or trust. Fewer, cleaner results. Off by default, as on hn.algolia.com.",
            "default": false
          },
          "onlyNew": {
            "title": "Only new since the last run",
            "type": "boolean",
            "description": "Monitoring: return only items this search did not return in earlier runs with this option on (remembered for 90 days, separately for each set of search settings). Best with Sort by Date and a schedule.",
            "default": false
          },
          "maxItems": {
            "title": "Max results in total",
            "minimum": 1,
            "type": "integer",
            "description": "Stop the whole run after this many results across all search terms. Leave empty for no total limit (Max results per search term still applies)."
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Not needed: Hacker News search answers without a proxy. Turn on Apify Proxy only if your runs get blocked.",
            "default": {
              "useApifyProxy": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}