{
  "openapi": "3.0.1",
  "info": {
    "title": "Hacker News Scraper - Stories, Jobs, Ask HN & Show HN",
    "description": "Export fresh Hacker News stories, comments, jobs, Ask HN, Show HN, and polls into structured datasets for research, hiring signals, and monitoring.",
    "version": "0.3",
    "x-build-id": "QnsYLOB2hMQt9jGDi"
  },
  "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": "Optional keyword or phrase. When set, the Actor runs a Hacker News keyword search through the public Algolia HN Search API. Leave empty to collect live Firebase feeds and explicit item IDs instead.",
            "default": "AI"
          },
          "feeds": {
            "title": "Hacker News feeds",
            "minItems": 1,
            "maxItems": 6,
            "type": "array",
            "description": "Official Firebase feeds to sample when Search keyword is empty.",
            "items": {
              "type": "string"
            },
            "default": [
              "top",
              "new",
              "best",
              "ask",
              "show",
              "job"
            ]
          },
          "recordTypes": {
            "title": "Record types to keep",
            "minItems": 1,
            "maxItems": 5,
            "type": "array",
            "description": "Hacker News item types emitted to the Dataset. Applies to both keyword-search and feed modes.",
            "items": {
              "type": "string"
            },
            "default": [
              "story",
              "comment",
              "job",
              "poll",
              "pollopt"
            ]
          },
          "itemIds": {
            "title": "Specific item IDs (optional)",
            "maxItems": 100,
            "type": "array",
            "description": "Optional positive Hacker News item IDs for feed/item-ID mode. Ignored when Search keyword is set.",
            "items": {
              "type": "integer",
              "minimum": 1
            },
            "default": []
          },
          "includeDescendants": {
            "title": "Include comment and poll descendants",
            "type": "boolean",
            "description": "For feed/item-ID mode, traverse public kids and poll parts beneath selected roots up to Max depth. Keyword-search mode returns the search hits directly.",
            "default": true
          },
          "enrichDetails": {
            "title": "Enrich public author profiles",
            "type": "boolean",
            "description": "Fetch at most one public Firebase user profile per distinct emitted author and merge public website/social links. Submitted history is never followed.",
            "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
          },
          "maxItems": {
            "title": "Maximum Dataset records (max 2,000; free users capped at 1,000/run)",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Global cap after deduplication and type selection (1–2,000). Free Apify plan users: also limited to 10 total runs of this Actor and capped at 1,000 results per run (Actor developer policy). In keyword-search mode, this is the maximum number of search hits written to the Dataset.",
            "default": 1
          },
          "maxFetches": {
            "title": "Maximum Firebase item fetches",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Safety cap for Firebase item detail requests in feed/item-ID mode. It must be at least Maximum Dataset records; keyword-search mode does not fetch Firebase item details.",
            "default": 500
          },
          "workerBaseUrl": {
            "title": "Worker base URL (optional)",
            "type": "string",
            "description": "Override worker origin for this run. Default: Actor env WORKER_BASE_URL. Production migrations should update WORKER_BASE_URL in Actor settings (no code change)."
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}