{
  "openapi": "3.0.1",
  "info": {
    "title": "Hacker News Scraper - Stories, Jobs & Comments",
    "description": "Extract public Hacker News stories, comments, jobs, polls, Ask HN, and Show HN posts by keyword, feed, or item ID. Pay per delivered row plus a run start fee.",
    "version": "0.3",
    "x-build-id": "Mdw567nrXfCXwQMh1"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/lentic_clockss~hacker-news-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-lentic_clockss-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/lentic_clockss~hacker-news-scraper/runs": {
      "post": {
        "operationId": "runs-sync-lentic_clockss-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/lentic_clockss~hacker-news-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-lentic_clockss-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": {
          "searchQuery": {
            "title": "Search keyword",
            "maxLength": 200,
            "type": "string",
            "description": "Keyword or phrase to search on Hacker News. When set, Specific item IDs and Hacker News feeds are ignored; clear it to use those inputs."
          },
          "itemIds": {
            "title": "Specific item IDs (optional)",
            "maxItems": 100,
            "type": "array",
            "description": "Positive Hacker News item IDs (the number after item?id= in a news.ycombinator.com link), used when Search keyword is empty. Ignored when Search keyword is set (they are not collected or billed). Each item ID gets its own Maximum rows per search, feed, or item ID."
          },
          "feeds": {
            "title": "Hacker News feeds",
            "minItems": 1,
            "maxItems": 6,
            "type": "array",
            "description": "Choose live feeds: top, new, best, ask, show, or job. Used when Search keyword and Specific item IDs are both empty.",
            "items": {
              "type": "string"
            }
          },
          "recordTypes": {
            "title": "Record types to keep",
            "minItems": 1,
            "maxItems": 5,
            "type": "array",
            "description": "Choose which item types to keep as dataset rows: story, comment, job, poll, or pollopt. Applies to search, feed, and item-ID modes.",
            "items": {
              "type": "string"
            },
            "default": [
              "story",
              "comment",
              "job",
              "poll",
              "pollopt"
            ]
          },
          "includeDescendants": {
            "title": "Include comment and poll descendants",
            "type": "boolean",
            "description": "Add separate comment and poll-option rows beneath selected roots in feed or item-ID mode, up to Maximum descendant depth. Each added row is billed like any other row; search mode returns matching rows without expanding threads.",
            "default": false
          },
          "enrichDetails": {
            "title": "Enrich public author profiles",
            "type": "boolean",
            "description": "Add website and social links from public author profiles, without creating extra profile rows. Limited to 25 distinct authors and about 20 seconds per collection part of up to 70 rows; gaps are recorded in leadAbsences.",
            "default": true
          },
          "skipNoLeads": {
            "title": "Only keep records with outreach clues",
            "type": "boolean",
            "description": "When enabled, omit records without an email, phone, location, organization, website, or social profile. Author username alone does not count as an outreach clue.",
            "default": false
          },
          "maxDepth": {
            "title": "Maximum descendant depth",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Depth below each selected root to traverse when descendants are enabled. A root has depth 0. Not used in keyword-search mode.",
            "default": 2
          },
          "maxResults": {
            "title": "Maximum rows per search, feed, or item ID",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Most Dataset rows for each search query, feed, or explicit item ID (1–2,000). Default 70; larger values are collected in parts of 70. Root and descendant row types count together for that input. The run stops at your maximum total charge. Free Apify plan: 200 rows per run and 10 runs of this Actor.",
            "default": 70
          },
          "maxFetches": {
            "title": "Maximum candidate reads",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Most candidate items to read per collection part of up to 70 rows; must be at least Maximum rows per search, feed, or item ID. Reading stops once the row allowance is filled; public profile enrichment has a separate 25-author and 20-second limit.",
            "default": 500
          },
          "workerBaseUrl": {
            "title": "Developer testing URL",
            "type": "string",
            "description": "Leave empty. Used only by the developer for testing."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}