{
  "openapi": "3.0.1",
  "info": {
    "title": "Yahoo Finance Analyst Ratings & Consensus Tracker",
    "description": "Get buy/hold/sell analyst consensus and price targets, or a full history of individual analyst rating changes, for any list of stock tickers.",
    "version": "1.1",
    "x-build-id": "fSERFJhIOwV8Gck7b"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nimbryxo-studio~yahoo-finance-analyst-ratings-and-consensus/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nimbryxo-studio-yahoo-finance-analyst-ratings-and-consensus",
        "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/nimbryxo-studio~yahoo-finance-analyst-ratings-and-consensus/runs": {
      "post": {
        "operationId": "runs-sync-nimbryxo-studio-yahoo-finance-analyst-ratings-and-consensus",
        "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/nimbryxo-studio~yahoo-finance-analyst-ratings-and-consensus/run-sync": {
      "post": {
        "operationId": "run-sync-nimbryxo-studio-yahoo-finance-analyst-ratings-and-consensus",
        "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",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "stockConsensus",
              "analystRatings",
              "priceTargets",
              "stockProfile",
              "stocks",
              "analysts",
              "news",
              "insiderTrades",
              "hedgeFundActivity",
              "search"
            ],
            "type": "string",
            "description": "What to collect. Ticker-based modes use the tickers below; the screener uses the stock filters; the analyst mode uses the analysts list; search uses the search query.",
            "default": "stockConsensus"
          },
          "tickers": {
            "title": "Tickers",
            "type": "array",
            "description": "Stock tickers for ticker-based modes. Accepts symbols such as AAPL, BRK.B, $TSLA, or a TipRanks/Yahoo Finance stock URL.",
            "default": [
              "AAPL"
            ],
            "items": {
              "type": "string"
            }
          },
          "analysts": {
            "title": "Analysts",
            "type": "array",
            "description": "Analyst names, slugs or TipRanks profile URLs for mode=analysts. Examples: Andrew Marok, andrew-marok, https://www.tipranks.com/experts/analysts/andrew-marok.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "searchQuery": {
            "title": "Search query",
            "type": "string",
            "description": "Company, ticker or expert name for mode=search. Examples: Apple, NVDA, Andrew Marok.",
            "default": ""
          },
          "maxItems": {
            "title": "Max records",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Maximum number of records to save across tickers and pages.",
            "default": 50
          },
          "ratingPosition": {
            "title": "Rating position",
            "enum": [
              "all",
              "buy",
              "hold",
              "sell"
            ],
            "type": "string",
            "description": "Only keep analyst ratings with this position (mode=analystRatings).",
            "default": "all"
          },
          "includeAiAnalysts": {
            "title": "Include AI analyst ratings",
            "type": "boolean",
            "description": "Include TipRanks' AI-generated analyst ratings in mode=analystRatings. Off by default to match the human analyst table.",
            "default": false
          },
          "ratingAction": {
            "title": "Rating action",
            "enum": [
              "all",
              "upgraded",
              "downgraded",
              "reiterated",
              "initiated",
              "assigned",
              "other"
            ],
            "type": "string",
            "description": "Only keep analyst ratings with this action (mode=analystRatings).",
            "default": "all"
          },
          "newsSentiment": {
            "title": "News sentiment",
            "enum": [
              "all",
              "positive",
              "negative",
              "neutral"
            ],
            "type": "string",
            "description": "Only keep articles with this sentiment (mode=news). Blog posts have no sentiment and are skipped when a sentiment is selected.",
            "default": "all"
          },
          "newsContent": {
            "title": "News content",
            "enum": [
              "all",
              "articles",
              "posts"
            ],
            "type": "string",
            "description": "Choose articles, TipRanks blog posts, or both (mode=news).",
            "default": "all"
          },
          "transactionType": {
            "title": "Insider transaction type",
            "enum": [
              "all",
              "buy",
              "sell",
              "other"
            ],
            "type": "string",
            "description": "Only keep insider transactions of this type (mode=insiderTrades).",
            "default": "all"
          },
          "minTransactionValue": {
            "title": "Minimum insider transaction value (USD)",
            "minimum": 0,
            "maximum": 1000000000000,
            "type": "integer",
            "description": "Skip insider transactions below this reported value (mode=insiderTrades). Use 0 for no minimum.",
            "default": 0
          },
          "positionAction": {
            "title": "Hedge-fund position action",
            "enum": [
              "all",
              "added",
              "reduced",
              "soldOut",
              "notChanged"
            ],
            "type": "string",
            "description": "Only keep hedge-fund positions with this change (mode=hedgeFundActivity).",
            "default": "all"
          },
          "minPositionValue": {
            "title": "Minimum hedge-fund position value (USD)",
            "minimum": 0,
            "maximum": 1000000000000,
            "type": "integer",
            "description": "Skip hedge-fund positions below this reported value (mode=hedgeFundActivity). Use 0 for no minimum.",
            "default": 0
          },
          "marketCountry": {
            "title": "Screener market",
            "enum": [
              "United States",
              "United Kingdom",
              "Canada",
              "Australia",
              "India",
              "Germany",
              "France",
              "Japan",
              "Hong Kong",
              "Singapore",
              "Brazil"
            ],
            "type": "string",
            "description": "Market to screen (mode=stocks) and country hint for non-US search results (mode=search). US uses the major primary exchanges by default.",
            "default": "United States"
          },
          "sector": {
            "title": "Sector",
            "enum": [
              "Any",
              "Technology",
              "Financial",
              "Healthcare",
              "Consumer Defensive",
              "Consumer Cyclical",
              "Utilities",
              "Basic Materials",
              "Industrials",
              "Energy",
              "Communication Services",
              "Real Estate"
            ],
            "type": "string",
            "description": "Only keep stocks in this sector (mode=stocks).",
            "default": "Any"
          },
          "analystConsensus": {
            "title": "Analyst consensus",
            "enum": [
              "Any",
              "Strong Buy",
              "Moderate Buy",
              "Hold",
              "Moderate Sell",
              "Strong Sell"
            ],
            "type": "string",
            "description": "Only keep stocks with this analyst consensus (mode=stocks).",
            "default": "Any"
          },
          "priceTargetUpside": {
            "title": "Analyst price-target upside",
            "enum": [
              "Any",
              "Upside >20%",
              "Upside 10% - 20%",
              "Upside 5% - 10%",
              "Upside 0% - 5%",
              "Downside 0% - 5%",
              "Downside 5% - 10%",
              "Downside 10% - 20%",
              "Downside >20%"
            ],
            "type": "string",
            "description": "Only keep stocks in this analyst price-target upside bucket (mode=stocks).",
            "default": "Any"
          },
          "marketCapBucket": {
            "title": "Market cap",
            "enum": [
              "Any",
              "Mega (Over $200B)",
              "Large ($10B - $200B)",
              "Medium ($2B - $10B)",
              "Small ($300M - $2B)",
              "Micro (Under $300M)"
            ],
            "type": "string",
            "description": "Only keep stocks in this market-cap bucket (mode=stocks).",
            "default": "Any"
          },
          "dividendYield": {
            "title": "Dividend yield",
            "enum": [
              "Any",
              "None (0%)",
              "Low (0% - 2.5%)",
              "High (2.5% - 5%)",
              "Very High (>5%)"
            ],
            "type": "string",
            "description": "Only keep stocks in this dividend-yield bucket (mode=stocks).",
            "default": "Any"
          },
          "peRatio": {
            "title": "P/E ratio",
            "enum": [
              "Any",
              "Negative",
              "0 - 15",
              "15 - 25",
              "Above 25"
            ],
            "type": "string",
            "description": "Only keep stocks in this P/E bucket (mode=stocks).",
            "default": "Any"
          },
          "includeSecondaryListings": {
            "title": "Include secondary listings",
            "type": "boolean",
            "description": "Include OTC and other secondary listings in the screener (mode=stocks). Off by default so results match the site's primary screener.",
            "default": false
          },
          "exchange": {
            "title": "Exchange",
            "enum": [
              "All US primary exchanges",
              "NASDAQ",
              "NYSE",
              "NYSE American",
              "NYSE Arca",
              "BATS",
              "TXSE",
              "OTC"
            ],
            "type": "string",
            "description": "Exchange filter for the US screener (mode=stocks).",
            "default": "All US primary exchanges"
          },
          "earningsDate": {
            "title": "Upcoming earnings",
            "enum": [
              "Any",
              "Today",
              "Tomorrow",
              "Next 5 Days",
              "This Week",
              "Next Week",
              "This Month"
            ],
            "type": "string",
            "description": "Only keep stocks with earnings in this window (mode=stocks).",
            "default": "Any"
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "Market Cap",
              "Smart Score",
              "Analyst Consensus",
              "Analyst Price Target",
              "Price",
              "Volume",
              "Average Volume (3M)",
              "Dividend Yield",
              "Yearly Gain",
              "Last Rating Date"
            ],
            "type": "string",
            "description": "Sort order for the stock screener (mode=stocks).",
            "default": "Market Cap"
          },
          "sortDirection": {
            "title": "Sort direction",
            "enum": [
              "Descending",
              "Ascending"
            ],
            "type": "string",
            "description": "Direction of the screener sort (mode=stocks).",
            "default": "Descending"
          },
          "pageSize": {
            "title": "Screener page size",
            "minimum": 10,
            "maximum": 1000,
            "type": "integer",
            "description": "Rows requested per screener page (mode=stocks). Larger pages reduce requests.",
            "default": 100
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}