{
  "openapi": "3.0.1",
  "info": {
    "title": "Hacker News Search — Stories, Comments & Live Front Page",
    "description": "Search all of Hacker News (stories, comments, Ask/Show/Launch HN, polls, jobs) by keyword with points, comments, date, author, domain and story filters, or pull the live top/new/best/ask/show/jobs lists. Optional nested comment trees and author profiles.",
    "version": "0.1",
    "x-build-id": "3H706eTx7Phek5fx0"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/yadroo~hackernews-search/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-yadroo-hackernews-search",
        "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/yadroo~hackernews-search/runs": {
      "post": {
        "operationId": "runs-sync-yadroo-hackernews-search",
        "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/yadroo~hackernews-search/run-sync": {
      "post": {
        "operationId": "run-sync-yadroo-hackernews-search",
        "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": {
          "query": {
            "title": "Search query",
            "type": "string",
            "description": "Keywords to search. Algolia syntax: wrap a phrase in double quotes for exact match (\"vector database\"), prefix a word with - to exclude it (python -django). Leave empty to list items by date (kind=story → newest stories matching the filters)."
          },
          "queries": {
            "title": "More queries (batch)",
            "type": "array",
            "description": "Additional search terms processed one after another in the same run — e.g. several brand names or competitors to monitor. Each output item carries the `query` that found it. maxItems is a total across all queries.",
            "items": {
              "type": "string"
            }
          },
          "kind": {
            "title": "Kind",
            "enum": [
              "story",
              "comment",
              "ask_hn",
              "show_hn",
              "launch_hn",
              "poll",
              "job",
              "front_page",
              "newest",
              "any",
              "top",
              "new",
              "best",
              "ask",
              "show",
              "jobs"
            ],
            "type": "string",
            "description": "Which HN item type / list to pull. `story`, `comment`, `ask_hn`, `show_hn`, `launch_hn`, `poll`, `job`, `front_page`, `newest`, `any` search the Algolia index and support every filter below. `top`, `new`, `best`, `ask`, `show`, `jobs` are the live ranked lists from the official Firebase API (same order as the HN pages) — query, author, storyId, dates and searchIn are ignored for them.",
            "default": "story"
          },
          "sort": {
            "title": "Sort",
            "enum": [
              "relevance",
              "date",
              "points",
              "comments"
            ],
            "type": "string",
            "description": "`relevance` and `date` are native Algolia sort orders (relevance falls back to date when there is no query). `points` and `comments` are applied client-side to the fetched result set (up to maxItems, max 1000 per query) — combine with dateFrom/sinceDays or minPoints to make the set meaningful. For live Firebase lists the default is the list's own ranking.",
            "default": "relevance"
          },
          "searchIn": {
            "title": "Search in",
            "enum": [
              "all",
              "title",
              "url",
              "text",
              "title_text",
              "author"
            ],
            "type": "string",
            "description": "Restricts which attributes Algolia matches the query against (restrictSearchableAttributes). `all` also matches story text, URLs and comment text — right for brand/mention monitoring, noisy for topic lists: use `title` for \"stories about X\". `url` is handy for finding every submission of a site: query=\"github.com/apify\", searchIn=\"url\".",
            "default": "all"
          },
          "typoTolerance": {
            "title": "Typo tolerance",
            "type": "boolean",
            "description": "Let Algolia match misspellings (one typo per word). Off by default: with it on, \"LLM\" also matches \"Limbo\", \"Limits\" and \"GLM\", \"Kafka\" matches \"Kakapos\". Turn on to catch misspelled mentions.",
            "default": false
          },
          "minPoints": {
            "title": "Min points",
            "minimum": 0,
            "type": "integer",
            "description": "Keep items with at least this many points. Comments have no points on HN — ignored for kind=comment.",
            "default": 0
          },
          "minComments": {
            "title": "Min comments",
            "minimum": 0,
            "type": "integer",
            "description": "Keep stories with at least this many comments (Algolia num_comments). Ignored for kind=comment.",
            "default": 0
          },
          "sinceDays": {
            "title": "Since N days",
            "minimum": 0,
            "maximum": 36500,
            "type": "integer",
            "description": "Only items created in the last N days. 0 = all time. Ignored when dateFrom is set.",
            "default": 0
          },
          "dateFrom": {
            "title": "Date from",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}",
            "type": "string",
            "description": "Earliest creation date, YYYY-MM-DD or ISO 8601 (UTC). Overrides sinceDays."
          },
          "dateTo": {
            "title": "Date to",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}",
            "type": "string",
            "description": "Latest creation date (inclusive; a bare date means end of that day UTC), YYYY-MM-DD or ISO 8601."
          },
          "author": {
            "title": "Author (username)",
            "type": "string",
            "description": "Only items by this HN username (bare, e.g. `pg`, not `author_pg`). Combine with an empty query and sort=date to list everything a user posted."
          },
          "storyId": {
            "title": "Story ID (comments of one thread)",
            "type": "string",
            "description": "HN item id, e.g. 4058874. With kind=comment returns the comments of that thread (searchable by query). Alternative to includeComments when you want flat, paginated comments of a single story."
          },
          "domain": {
            "title": "Domain",
            "type": "string",
            "description": "Keep only items whose URL is on this domain or its subdomains, e.g. `apify.com` or `arxiv.org`. If query is empty the domain is also used as the Algolia URL query, so listing all submissions of a site is one call."
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Total items to output across all queries. Algolia serves at most 1000 hits per query; live lists hold 200–500 ids. (Legacy name `limit` is still accepted.)",
            "default": 50
          },
          "limit": {
            "title": "Max items (legacy alias)",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Deprecated alias of maxItems, kept for backward compatibility. maxItems wins when both are set."
          },
          "includeComments": {
            "title": "Include comment tree",
            "type": "boolean",
            "description": "Attach the discussion of each story as a nested `comments` tree (author, date, plain text, children). Costs one extra request per story with comments; use maxCommentsPerStory/commentsDepth to bound the payload.",
            "default": false
          },
          "maxCommentsPerStory": {
            "title": "Max comments per story",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Total comments kept per story when includeComments is on (breadth-first: top-level replies first, then their children).",
            "default": 20
          },
          "commentsDepth": {
            "title": "Comment tree depth",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many reply levels to keep in `comments` (1 = only direct replies to the story).",
            "default": 2
          },
          "includeAuthorProfile": {
            "title": "Include author profile",
            "type": "boolean",
            "description": "Attach `authorProfile` (karma, account creation date, about, number of submissions) from the official HN API. One request per distinct author (cached within the run).",
            "default": false
          },
          "textMaxLength": {
            "title": "Max text length",
            "minimum": 100,
            "maximum": 50000,
            "type": "integer",
            "description": "Truncation length (characters) for `text` and comment texts after HTML is converted to plain text.",
            "default": 2000
          },
          "dedupeByUrl": {
            "title": "Dedupe by URL",
            "type": "boolean",
            "description": "Output each external URL only once (first hit wins; scheme, www. and trailing slash are ignored). Useful when the same article was submitted several times.",
            "default": false
          },
          "fields": {
            "title": "Output fields",
            "type": "array",
            "description": "Keep only these fields in each item (id is always kept). Leave empty for the full item. Known fields: id, type, kind, query, title, url, domain, hnUrl, points, numComments, author, createdAt, text, storyId, storyTitle, storyUrl, parentId, tags, comments, authorProfile, source, sourceUrl, fetchedAt.",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}