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

# Get Followed Companies

> Get all companies followed by a user

## 获取用户关注的公司

**URL**: `/v1/tools/user/followed-companies`\
**方法**: `GET`\
**描述**: 获取当前用户关注的所有公司列表。

### 请求参数

无需参数。

### 响应参数

| 参数名             | 类型      | 描述                     |
| --------------- | ------- | ---------------------- |
| companies       | array   | 关注的公司列表                |
|   symbol        | string  | 股票代码（如 `US:AAPL`）      |
|   ticker        | string  | 股票简码（如 `AAPL`）         |
|   market        | string  | 市场（如 `US`, `HK`, `CN`） |
|   name          | string  | 公司名称                   |
|   chinese\_name | string  | 中文名称                   |
|   english\_name | string  | 英文名称                   |
|   logo          | string  | 公司 Logo URL            |
|   followed\_at  | integer | 关注时间戳（毫秒）              |
| total           | integer | 关注公司总数                 |

### 请求示例

**cURL**

```bash theme={null}
curl -X GET "https://api.reportify.cn/v1/tools/user/followed-companies" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

**Python**

```python theme={null}
import requests

url = "https://api.reportify.cn/v1/tools/user/followed-companies"
headers = {
    "Authorization": "Bearer YOUR_API_KEY"
}

response = requests.get(url, headers=headers)
data = response.json()

for company in data["companies"]:
    print(f"{company['name']} ({company['symbol']})")
```

**TypeScript**

```typescript theme={null}
const response = await fetch(
  'https://api.reportify.cn/v1/tools/user/followed-companies',
  {
    headers: {
      'Authorization': 'Bearer YOUR_API_KEY'
    }
  }
);

const data = await response.json();
console.log(`Total followed companies: ${data.total}`);
```

### 响应示例

```json theme={null}
{
  "companies": [
    {
      "symbol": "US:AAPL",
      "ticker": "AAPL",
      "market": "US",
      "name": "Apple Inc.",
      "chinese_name": "苹果公司",
      "english_name": "Apple Inc.",
      "logo": "https://example.com/logos/aapl.png",
      "followed_at": 1704067200000
    },
    {
      "symbol": "HK:00700",
      "ticker": "00700",
      "market": "HK",
      "name": "腾讯控股",
      "chinese_name": "腾讯控股",
      "english_name": "Tencent Holdings Ltd",
      "logo": "https://example.com/logos/tencent.png",
      "followed_at": 1704153600000
    }
  ],
  "total": 2
}
```

### 错误响应

| 状态码 | 描述       |
| --- | -------- |
| 422 | 请求参数验证失败 |

### 使用场景

1. **获取用户关注列表**
   * 用于展示用户关注的所有公司
   * 构建个性化看板

2. **与时间线接口配合使用**
   * 先获取关注公司，再查询相关动态


## OpenAPI

````yaml GET /v1/tools/user/followed-companies
openapi: 3.1.0
info:
  title: Reportify API
  version: 1.0.0
  description: API documentation for Reportify's document management and search services.
servers:
  - url: https://api.reportify.cn
    description: Production server
security:
  - BearerAuth: []
paths:
  /v1/tools/user/followed-companies:
    get:
      tags:
        - openapi-tools-user
      summary: Get Followed Companies
      description: Get all companies followed by a user
      operationId: >-
        get_followed_companies_reportify_api_v1_tools_user_followed_companies_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FollowedCompaniesResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - BearerAuth: []
components:
  schemas:
    FollowedCompaniesResponse:
      properties:
        companies:
          type: array
          items:
            $ref: '#/components/schemas/FollowedCompanyItem'
          title: Companies
          description: List of followed companies
          default: []
        total:
          type: integer
          title: Total
          description: Total number of followed companies
          default: 0
      type: object
      title: FollowedCompaniesResponse
      description: Response containing followed companies
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    FollowedCompanyItem:
      properties:
        symbol:
          type: string
          title: Symbol
          description: Company symbol (e.g., US:AAPL)
        ticker:
          type: string
          title: Ticker
          description: Company ticker (e.g., AAPL)
        market:
          type: string
          title: Market
          description: Market (e.g., US, HK, CN)
        name:
          type: string
          title: Name
          description: Company name
        chinese_name:
          type: string
          title: Chinese Name
          description: Chinese name
        english_name:
          type: string
          title: English Name
          description: English name
        logo:
          type: string
          title: Logo
          description: Company logo URL
        followed_at:
          type: integer
          title: Followed At
          description: Follow timestamp in milliseconds
      type: object
      required:
        - symbol
      title: FollowedCompanyItem
      description: Followed company information
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Enter your Bearer token

````