{
  "openapi": "3.0.1",
  "info": {
    "title": "Hacker News Mentions Scraper - Stories, Comments & Evidence",
    "description": "Find literal brand, product or topic mentions in public Hacker News stories and comments. Export matching excerpts, thread links and saved changes using the public Algolia index. No API key.",
    "version": "1.0",
    "x-build-id": "vBsJxpiopP4akzaDc"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/maydit~hacker-news-mentions-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-maydit-hacker-news-mentions-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/maydit~hacker-news-mentions-scraper/runs": {
      "post": {
        "operationId": "runs-sync-maydit-hacker-news-mentions-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/maydit~hacker-news-mentions-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-maydit-hacker-news-mentions-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": {
          "queries": {
            "title": "Words or phrases to monitor",
            "type": "array",
            "description": "Up to 10 literal case-insensitive phrases, at most 100 characters each. Empty/omitted uses OpenAI. A story must match its title, text or linked URL; a comment must match its own text. Fuzzy search and parent-only matches are rejected.",
            "items": {
              "type": "string"
            }
          },
          "itemType": {
            "title": "Item type",
            "enum": [
              "all",
              "story",
              "comment"
            ],
            "type": "string",
            "description": "Search stories, comments, or both. Comment titles provide thread context, while literal match evidence must be in the comment text.",
            "default": "all"
          },
          "sort": {
            "title": "Search order",
            "enum": [
              "recent",
              "relevance"
            ],
            "type": "string",
            "description": "Recent uses the newest indexed matches first; relevance uses Algolia search ranking. Results from multiple queries are processed in sorted query order, not globally ranked.",
            "default": "recent"
          },
          "storyTag": {
            "title": "Story category",
            "enum": [
              "any",
              "ask_hn",
              "show_hn"
            ],
            "type": "string",
            "description": "Optional documented story tag. ask_hn and show_hn require itemType story; tags are also checked locally.",
            "default": "any"
          },
          "author": {
            "title": "Exact public author handle",
            "type": "string",
            "description": "Optional exact Hacker News username, 1-50 letters, digits, underscores or hyphens. This uses the public search author tag and a local exact check."
          },
          "startDate": {
            "title": "Published on or after",
            "type": "string",
            "description": "Optional real YYYY-MM-DD date, inclusive at 00:00 UTC. Filters the item publication time, not the index update time."
          },
          "endDate": {
            "title": "Published on or before",
            "type": "string",
            "description": "Optional real YYYY-MM-DD date, inclusive through the end of that UTC day."
          },
          "maxCandidatesPerQuery": {
            "title": "Search candidate window per phrase",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Inspect this many indexed candidates per query before local literal checks and deduplication. Algolia only exposes up to 1,000 hits for a search; this is not complete historical coverage.",
            "default": 100
          },
          "pageSize": {
            "title": "Search page size",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Number of indexed candidates requested per page. Small pages help bounded pagination checks but require more requests.",
            "default": 100
          },
          "maxResults": {
            "title": "Maximum saved mentions",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum unique matching rows saved across the whole run. Normal requested caps are bounded coverage, not source failures.",
            "default": 20
          },
          "comparePrevious": {
            "title": "Compare with prior saved observations",
            "type": "boolean",
            "description": "Return matching rows with new, changed or unchanged comparison status. Uses a named persistent store. Only confirmed saved rows advance history. The first run establishes observations, and SUMMARY confirms whether history was committed.",
            "default": false
          },
          "onlyChanges": {
            "title": "Save only new or changed observations",
            "type": "boolean",
            "description": "Implies comparison. Unchanged matching observations are skipped without a dataset charge. A first run saves matching observations; subsequent unchanged runs can correctly save zero. No disappearance/deletion inference.",
            "default": false
          },
          "snapshotName": {
            "title": "History name",
            "type": "string",
            "description": "Use 1-80 letters, digits, underscores or hyphens. History also includes the sorted sources/queries and content filters. Run only one writer at a time for each scope. Start a new name for an incompatible saved baseline.",
            "default": "default"
          },
          "maxRunSeconds": {
            "title": "Run time budget (seconds)",
            "minimum": 30,
            "maximum": 3600,
            "type": "integer",
            "description": "Requests use this budget and the platform deadline minus 25 seconds. Each request is capped at 25 seconds. Partial coverage and spending stops are explicit in SUMMARY.",
            "default": 240
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}