{
  "openapi": "3.0.1",
  "info": {
    "title": "Hacker News Scraper - search, feeds, comments, Who is Hiring",
    "description": "Search HN stories and comments by keyword, author, date, points; pull front page, newest, Ask HN, Show HN and job feeds; or parse monthly 'Who is hiring?' threads into structured postings (company, roles, remote, salary, tech, emails). Official API, monitor mode.",
    "version": "0.5",
    "x-build-id": "BIeEh1Yfxq10hDWVh"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/codeyouknowadmin~hacker-news-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-codeyouknowadmin-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/codeyouknowadmin~hacker-news-scraper/runs": {
      "post": {
        "operationId": "runs-sync-codeyouknowadmin-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/codeyouknowadmin~hacker-news-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-codeyouknowadmin-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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "feed",
              "whoIsHiring"
            ],
            "type": "string",
            "description": "search = full-text search of stories/comments; feed = front page, newest, Ask HN, Show HN, jobs; whoIsHiring = parse the monthly 'Who is hiring?' / 'Who wants to be hired?' / 'Freelancer?' threads into structured postings.",
            "default": "search"
          },
          "query": {
            "title": "Search query",
            "type": "string",
            "description": "Full-text query, e.g. \"rust async\", \"postgres\", \"YC W26\". Leave empty to list everything matching the other filters. (search mode)"
          },
          "kind": {
            "title": "What to search",
            "enum": [
              "story",
              "comment",
              "ask_hn",
              "show_hn",
              "job",
              "poll",
              "front_page",
              "any"
            ],
            "type": "string",
            "description": "Type of item to return. (search mode)",
            "default": "story"
          },
          "sort": {
            "title": "Sort",
            "enum": [
              "relevance",
              "date"
            ],
            "type": "string",
            "description": "relevance = most relevant/popular first; date = newest first. (search mode)",
            "default": "relevance"
          },
          "author": {
            "title": "Author (HN username)",
            "type": "string",
            "description": "Only items by this user, e.g. \"pg\". (search mode)"
          },
          "storyId": {
            "title": "Story ID",
            "type": "string",
            "description": "With 'Comments' kind: all comments of this story. E.g. 22238335. (search mode)"
          },
          "dateFrom": {
            "title": "From date",
            "type": "string",
            "description": "Only items created on/after this date (search & feed modes)."
          },
          "dateTo": {
            "title": "To date",
            "type": "string",
            "description": "Only items created on/before this date (search & feed modes)."
          },
          "minPoints": {
            "title": "Min points",
            "minimum": 0,
            "type": "integer",
            "description": "Only items with at least this many upvotes. (search mode)"
          },
          "minComments": {
            "title": "Min comments",
            "minimum": 0,
            "type": "integer",
            "description": "Only stories with at least this many comments. (search mode)"
          },
          "feed": {
            "title": "Feed",
            "enum": [
              "front_page",
              "newest",
              "ask_hn",
              "show_hn",
              "jobs",
              "best_comments"
            ],
            "type": "string",
            "description": "Which feed to pull. (feed mode)",
            "default": "front_page"
          },
          "threadType": {
            "title": "Who-is-hiring thread type",
            "enum": [
              "hiring",
              "wants_to_be_hired",
              "freelancer"
            ],
            "type": "string",
            "description": "companies hiring, candidates looking, or freelancers. (whoIsHiring mode)",
            "default": "hiring"
          },
          "months": {
            "title": "How many latest months",
            "minimum": 1,
            "maximum": 24,
            "type": "integer",
            "description": "1 = current month's thread only. (whoIsHiring mode)",
            "default": 1
          },
          "threadId": {
            "title": "Specific thread ID (optional)",
            "type": "string",
            "description": "Parse one specific HN thread by id, overriding thread type/months. (whoIsHiring mode)"
          },
          "remoteOnly": {
            "title": "Remote only",
            "type": "boolean",
            "description": "Keep only postings mentioning remote work. (whoIsHiring mode)",
            "default": false
          },
          "visaOnly": {
            "title": "Visa sponsorship mentioned",
            "type": "boolean",
            "description": "Keep only postings mentioning visa sponsorship. (whoIsHiring mode)",
            "default": false
          },
          "includeText": {
            "title": "Include full post text",
            "type": "boolean",
            "description": "(whoIsHiring mode)",
            "default": true
          },
          "keywords": {
            "title": "Keywords (any match, post-filter)",
            "type": "array",
            "description": "Keep items whose title/text/url contain ANY of these words (case-insensitive). Applied after fetching, in every mode.",
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "type": "array",
            "description": "Drop items containing ANY of these words.",
            "items": {
              "type": "string"
            }
          },
          "onlyNewSinceLastRun": {
            "title": "Only new items since last run (monitor mode)",
            "type": "boolean",
            "description": "Remembers items already returned and outputs only new ones. Schedule it to monitor a keyword, a feed or the hiring thread.",
            "default": false
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Upper bound on results written (you pay per item).",
            "default": 500
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}