> ## Documentation Index
> Fetch the complete documentation index at: https://finance.chiefpriest.design/llms.txt
> Use this file to discover all available pages before exploring further.

# Analyst Recommendations

> Get analyst recommendations and ratings for a stock

Get current analyst recommendations including buy, sell, and hold ratings from major financial institutions.

## Parameters

<ParamField path="symbol" type="string" required>
  Stock symbol (e.g., AAPL, MSFT, GOOGL)
</ParamField>

## Response

<ResponseField name="symbol" type="string">
  The stock symbol
</ResponseField>

<ResponseField name="recommendations" type="object">
  Current recommendation counts

  <Expandable title="recommendations properties">
    <ResponseField name="strongBuy" type="number">
      Number of strong buy recommendations
    </ResponseField>

    <ResponseField name="buy" type="number">
      Number of buy recommendations
    </ResponseField>

    <ResponseField name="hold" type="number">
      Number of hold recommendations
    </ResponseField>

    <ResponseField name="sell" type="number">
      Number of sell recommendations
    </ResponseField>

    <ResponseField name="strongSell" type="number">
      Number of strong sell recommendations
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="summary" type="object">
  Recommendation summary statistics

  <Expandable title="summary properties">
    <ResponseField name="total_analysts" type="number">
      Total number of analysts covering the stock
    </ResponseField>

    <ResponseField name="average_rating" type="number">
      Average rating (1=Strong Buy, 5=Strong Sell)
    </ResponseField>

    <ResponseField name="consensus" type="string">
      Overall consensus recommendation
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET "https://stocks-dev.up.railway.app/api/v1/stock/AAPL/recommendations" \
    -H "X-API-Key: your_api_key"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('/api/v1/stock/AAPL/recommendations', {
    headers: {
      'X-API-Key': 'your_api_key'
    }
  });
  const data = await response.json();
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      'https://stocks-dev.up.railway.app/api/v1/stock/AAPL/recommendations',
      headers={'X-API-Key': 'your_api_key'}
  )
  data = response.json()
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "symbol": "AAPL",
    "recommendations": {
      "strongBuy": 15,
      "buy": 12,
      "hold": 8,
      "sell": 2,
      "strongSell": 0
    },
    "summary": {
      "total_analysts": 37,
      "average_rating": 1.8,
      "consensus": "Buy"
    }
  }
  ```
</ResponseExample>

## Use Cases

* **Investment Research**: Gauge analyst sentiment
* **Decision Making**: Consider professional opinions
* **Market Analysis**: Track recommendation changes over time
* **Risk Assessment**: Understand analyst concerns

## Rating Scale

* **1.0-1.5**: Strong Buy
* **1.5-2.5**: Buy
* **2.5-3.5**: Hold
* **3.5-4.5**: Sell
* **4.5-5.0**: Strong Sell

## Notes

* Recommendations are aggregated from major financial institutions
* Data is updated regularly but may have slight delays
* Consider recommendations as one factor among many in investment decisions
* Analyst coverage varies by stock size and sector
