{
  "openapi": "3.0.1",
  "info": {
    "title": "Stock News Monitor - Headlines, Buzz and Sentiment per Ticker",
    "description": "Monitor a list of tickers for news: Google News and Yahoo Finance headlines with a sentiment label, new headlines since the last run, Stocktwits bull/bear ratio and price context. No API keys, $5 per 1,000 tickers.",
    "version": "0.1",
    "x-build-id": "b9eEEuz8t8DTSIiwh"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/saekoto~stock-news-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-saekoto-stock-news-monitor",
        "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/saekoto~stock-news-monitor/runs": {
      "post": {
        "operationId": "runs-sync-saekoto-stock-news-monitor",
        "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/saekoto~stock-news-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-saekoto-stock-news-monitor",
        "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": {
          "tickers": {
            "title": "Tickers",
            "type": "array",
            "description": "Stock symbols as Yahoo Finance spells them, one per line (NVDA, AAPL, BRK-B, ASML.AS, 7203.T). A leading $ is stripped, case is ignored and duplicates are removed. Soft cap 1,000 per run.",
            "items": {
              "type": "string"
            }
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "summary",
              "headlines",
              "both"
            ],
            "type": "string",
            "description": "summary = one row per ticker (event ticker-check). headlines = one row per headline (event headline-row). both = both row types in the same dataset; the row_type field tells them apart.",
            "default": "summary"
          },
          "windowDays": {
            "title": "News window (days)",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "How far back headlines are collected and counted. Google News returns at most 100 items per query, so busy tickers are capped at 100 headlines for any window (the google_news_capped field says when that happened).",
            "default": 7
          },
          "requireMention": {
            "title": "Only headlines that name the company",
            "type": "boolean",
            "description": "Keep a headline only when its title contains the ticker or a distinctive word of the company name. Yahoo's per-ticker feed pads with unrelated market stories (15 of 17 NVDA items on 2026-10-29 did not mention Nvidia); this drops them. Turn off to count everything the feeds returned. headlines_fetched always reports the unfiltered number.",
            "default": true
          },
          "maxHeadlinesPerTicker": {
            "title": "Max headline rows per ticker",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Cap on headline rows emitted per ticker in headlines and both modes, newest first. The summary row always counts every headline collected.",
            "default": 100
          },
          "stocktwitsPages": {
            "title": "Stocktwits pages",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Pages of 30 messages read from the public Stocktwits symbol stream to compute the bullish/bearish ratio and the messages-per-hour rate. 0 skips Stocktwits. Individual messages are never emitted, only the counts.",
            "default": 3
          },
          "includeGdelt": {
            "title": "Mention volume baseline (GDELT, experimental)",
            "type": "boolean",
            "description": "Read the 30-day daily news-volume series for the company name from the free GDELT DOC API to compute buzz_ratio and buzz_flag. GDELT throttles hard (one request per 5-10 seconds per IP, with a cooldown after a burst), so this adds about 10 seconds per ticker and may be refused on shared IPs; when it is, the buzz fields are null and the ticker is still delivered and charged normally. Off by default.",
            "default": false
          },
          "includePrice": {
            "title": "Price context (Yahoo Finance)",
            "type": "boolean",
            "description": "Add last price, 1-day / 5-day / 30-day change and the volume-versus-20-day-average ratio from the public Yahoo Finance chart endpoint. Context only, not a signal.",
            "default": true
          },
          "trackChanges": {
            "title": "Track changes between runs",
            "type": "boolean",
            "description": "Remember the headlines seen per ticker in a named key-value store and report how many are new on the next run, plus the change in headline count. Free. Combine with a Schedule for monitoring.",
            "default": false
          },
          "stateStoreName": {
            "title": "State store name",
            "pattern": "^[a-zA-Z0-9][a-zA-Z0-9-]{1,61}[a-zA-Z0-9]$",
            "type": "string",
            "description": "Name of the key-value store that holds the per-ticker headline snapshot used by change tracking (3-63 letters, digits or hyphens, not starting or ending with a hyphen). Use a different name per watchlist.",
            "default": "stock-news-monitor-state"
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "All sources are public and key-free, but Yahoo Finance and Stocktwits throttle shared datacenter IPs. Apify datacenter proxies are the default; switch to RESIDENTIAL if a run reports many HTTP 403/429 warnings for those sources.",
            "default": {
              "useApifyProxy": true
            }
          },
          "requestDelayMs": {
            "title": "Delay between requests per host (ms)",
            "minimum": 100,
            "maximum": 10000,
            "type": "integer",
            "description": "Minimum pause between two requests to the same host across the whole run. GDELT is always paced at 10,000 ms regardless of this value.",
            "default": 500
          },
          "maxConcurrency": {
            "title": "Parallel tickers",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "How many tickers are processed at the same time. Each ticker makes 5 to 15 requests across five hosts.",
            "default": 4
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}