{
  "openapi": "3.0.1",
  "info": {
    "title": "Hacker News Search & Comments API",
    "description": "Search Hacker News stories and comments, or retrieve the front page with bounded discussion expansion. Public APIs only.",
    "version": "1.0",
    "x-build-id": "iS3fcK5iUyojhgNsT"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/atesen-software~hacker-news-search-comments/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-atesen-software-hacker-news-search-comments",
        "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/atesen-software~hacker-news-search-comments/runs": {
      "post": {
        "operationId": "runs-sync-atesen-software-hacker-news-search-comments",
        "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/atesen-software~hacker-news-search-comments/run-sync": {
      "post": {
        "operationId": "run-sync-atesen-software-hacker-news-search-comments",
        "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": [
              "query",
              "frontpage"
            ],
            "type": "string",
            "description": "Query uses Algolia; frontpage uses the current Firebase topstories list.",
            "default": "query"
          },
          "query": {
            "title": "Search text",
            "maxLength": 500,
            "type": "string",
            "description": "Empty means latest/relevant records without a text filter. Must be empty in frontpage mode.",
            "default": ""
          },
          "itemType": {
            "title": "Search item type",
            "enum": [
              "story",
              "comment"
            ],
            "type": "string",
            "description": "Frontpage requires story. Comment scores are not public.",
            "default": "story"
          },
          "sort": {
            "title": "Search order",
            "enum": [
              "date",
              "relevance"
            ],
            "type": "string",
            "description": "Applies to query mode. Frontpage preserves the live topstories order.",
            "default": "date"
          },
          "fromDate": {
            "title": "Created from (UTC)",
            "type": "string",
            "description": "Optional inclusive UTC timestamp, e.g. 2026-01-01T00:00:00Z. Also applies to expanded comments."
          },
          "toDate": {
            "title": "Created until (UTC)",
            "type": "string",
            "description": "Optional inclusive UTC timestamp, e.g. 2026-10-01T00:00:00Z."
          },
          "minScore": {
            "title": "Minimum story score",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Story score threshold. Must be zero for comment search; comment scores are unavailable.",
            "default": 0
          },
          "maxResults": {
            "title": "Maximum data rows",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Combined limit for stories and comments. A free final status row is additional.",
            "default": 3
          },
          "maxPages": {
            "title": "Maximum search pages",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Query mode only. Algolia's own pagination window can be smaller.",
            "default": 5
          },
          "pageSize": {
            "title": "Search page size",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Query mode only.",
            "default": 50
          },
          "maxRequests": {
            "title": "Maximum HTTP attempts",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Hard shared budget for search, stories, comments, and retries.",
            "default": 200
          },
          "includeComments": {
            "title": "Expand story discussions",
            "type": "boolean",
            "description": "Retrieve Firebase comment trees for matching stories within the limits below.",
            "default": false
          },
          "maxCommentsPerStory": {
            "title": "Comment visits per story",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum comment IDs visited per story, including deleted/filtered comments. Breadth-first order.",
            "default": 5
          },
          "maxCommentDepth": {
            "title": "Maximum comment depth",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Top-level replies have depth 1.",
            "default": 2
          },
          "requestDelayMs": {
            "title": "Minimum request spacing (ms)",
            "minimum": 100,
            "maximum": 5000,
            "type": "integer",
            "description": "Single sequential request stream; retries also obey spacing.",
            "default": 200
          },
          "timeoutSecs": {
            "title": "HTTP attempt timeout (seconds)",
            "minimum": 1,
            "maximum": 60,
            "type": "integer",
            "description": "Includes response body reading. Maximum two retries for transient failures.",
            "default": 15
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}