{
  "openapi": "3.0.1",
  "info": {
    "title": "Stock News API - Analyst Ratings, Earnings Calendar, Benzinga",
    "description": "Pull stock market news, analyst ratings and price targets, consensus ratings, and earnings, dividend, IPO, guidance, economic, split, M&A and offering calendars from the Benzinga API into a dataset. Filter by ticker, date, channel or topic. Read only. Bring your own Benzinga API key.",
    "version": "0.1",
    "x-build-id": "V3iR1r4ORVpwOgwSH"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nabeelbaghoor~stock-news-analyst-ratings-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nabeelbaghoor-stock-news-analyst-ratings-api",
        "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/nabeelbaghoor~stock-news-analyst-ratings-api/runs": {
      "post": {
        "operationId": "runs-sync-nabeelbaghoor-stock-news-analyst-ratings-api",
        "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/nabeelbaghoor~stock-news-analyst-ratings-api/run-sync": {
      "post": {
        "operationId": "run-sync-nabeelbaghoor-stock-news-analyst-ratings-api",
        "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": "What to read",
            "enum": [
              "news",
              "ratings",
              "consensusRatings",
              "earnings",
              "dividends",
              "ipos",
              "guidance",
              "economics",
              "conferenceCalls",
              "splits",
              "ma",
              "offerings"
            ],
            "type": "string",
            "description": "News reads articles for tickers, channels, topics or dates. Analyst ratings reads upgrades, downgrades, initiations and price target changes. Consensus ratings reads one aggregate per ticker. The calendar modes read earnings, dividends, IPOs, guidance, economic indicators, conference calls, splits, M&A and secondary offerings.",
            "default": "news"
          },
          "tickers": {
            "title": "Tickers",
            "type": "array",
            "description": "Stock tickers such as AAPL or MSFT, one per line. Sent 50 to a request. Optional in every mode except consensus ratings; with no tickers the mode reads across the whole market. The economic calendar takes none.",
            "items": {
              "type": "string"
            }
          },
          "startDate": {
            "title": "Start date",
            "type": "string",
            "description": "On or after this date, as YYYY-MM-DD. Without dates the calendars return the provider's latest records and news returns the newest articles."
          },
          "endDate": {
            "title": "End date",
            "type": "string",
            "description": "On or before this date, as YYYY-MM-DD."
          },
          "updatedSince": {
            "title": "Updated since (Unix timestamp)",
            "minimum": 0,
            "type": "integer",
            "description": "Every mode except consensus ratings. Only records updated at or after this Unix timestamp in seconds (UTC), for incremental pulls."
          },
          "importance": {
            "title": "Minimum importance",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Analyst ratings, earnings, dividends, guidance, splits, M&A and offerings: 0 to 5. Economic calendar: 1 to 3. Only records at or above this importance."
          },
          "newsDisplay": {
            "title": "News text",
            "enum": [
              "headline",
              "abstract",
              "full"
            ],
            "type": "string",
            "description": "News. Headline only, headline and teaser, or headline and full body.",
            "default": "abstract"
          },
          "newsChannels": {
            "title": "News channels",
            "type": "array",
            "description": "News. Only articles in these channels, by name or ID, such as WIIM for why is it moving stories, or any name from the provider's news channel list.",
            "items": {
              "type": "string"
            }
          },
          "newsTopics": {
            "title": "News topics",
            "type": "array",
            "description": "News. Words or phrases searched in the title, tags and body, in that order of priority.",
            "items": {
              "type": "string"
            }
          },
          "topicMatch": {
            "title": "Topic match",
            "enum": [
              "or",
              "and"
            ],
            "type": "string",
            "description": "News. Whether an article must match any of the topics or all of them.",
            "default": "or"
          },
          "newsAuthors": {
            "title": "News authors",
            "type": "array",
            "description": "News. Only articles by these authors.",
            "items": {
              "type": "string"
            }
          },
          "newsSort": {
            "title": "News sort order",
            "enum": [
              "created:desc",
              "created:asc",
              "updated:desc",
              "updated:asc",
              "id:desc",
              "id:asc"
            ],
            "type": "string",
            "description": "News. Sort by created time, updated time or ID.",
            "default": "created:desc"
          },
          "ratingAction": {
            "title": "Rating action",
            "enum": [
              "Upgrades",
              "Downgrades",
              "Maintains",
              "Reiterates",
              "Reinstates",
              "Assumes",
              "Initiates Coverage On",
              "Terminates Coverage On",
              "Removes",
              "Suspends",
              "Firm Dissolved"
            ],
            "type": "string",
            "description": "Analyst ratings. Only this rating action. Leave empty for all."
          },
          "simplifyRatings": {
            "title": "Simplify ratings",
            "type": "boolean",
            "description": "Analyst ratings and consensus ratings. Map ratings to standardized categories (consensus: buy, hold and sell only)."
          },
          "consensusAggregate": {
            "title": "Consensus aggregate type",
            "enum": [
              "number",
              "percentage"
            ],
            "type": "string",
            "description": "Consensus ratings. Count the rating distribution as numbers of analysts or as percentages.",
            "default": "number"
          },
          "dividendDateSort": {
            "title": "Dividend date field",
            "enum": [
              "announced",
              "ex",
              "payable",
              "record"
            ],
            "type": "string",
            "description": "Dividends. Which dividend date to sort on, newest first."
          },
          "splitDateField": {
            "title": "Split date field",
            "enum": [
              "announced",
              "ex"
            ],
            "type": "string",
            "description": "Stock splits. Which date the date range filters and sorts by. The provider default is the announced date."
          },
          "maDateSort": {
            "title": "M&A date field",
            "enum": [
              "announced",
              "expected",
              "completed"
            ],
            "type": "string",
            "description": "Mergers and acquisitions. Which deal date to sort on."
          },
          "guidancePrimary": {
            "title": "Guidance type",
            "enum": [
              "Y",
              "N",
              "All"
            ],
            "type": "string",
            "description": "Guidance. Primary guidance only, secondary only, or all.",
            "default": "Y"
          },
          "economicsCountry": {
            "title": "Country",
            "type": "string",
            "description": "Economic calendar. A three letter country code, such as USA, CAN or GBR."
          },
          "economicsCategories": {
            "title": "Economic event categories",
            "type": "array",
            "description": "Economic calendar. Only events in these categories, such as Employment.",
            "items": {
              "type": "string"
            }
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "The most rows this run returns and charges for, across all tickers. Pages are read up to 100 news articles or 1000 calendar records at a time.",
            "default": 200
          },
          "requestsPerMinute": {
            "title": "Requests per minute",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Pacing. Benzinga rate limits depend on your licence; the actor also waits and retries when the provider answers 429.",
            "default": 120
          },
          "apiKey": {
            "title": "API key",
            "type": "string",
            "description": "Your own Benzinga API key, issued with your Benzinga API licence. Stored as a secret and sent as the token parameter the provider documents; it is never logged. You can instead set the DATA_API_KEY environment secret."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}