> ## 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.

# Channels Search

> Search for channels by query string

## 搜索账号

**URL**: `/v1/channels/search`\
**方法**: `POST`\
**描述**: 根据条件搜索账号

### 请求参数

| 参数名        | 类型  | 描述                          |
| ---------- | --- | --------------------------- |
| query      | str | 搜索账号名关键词或者账号链接（现在支持公众号文章链接） |
| page\_num  | int | 当前页码，默认值为 `1`。              |
| page\_size | int | 每页条目数，默认值为 `10`。            |

### 响应参数

| 参数名           | 类型    | 描述               |
| ------------- | ----- | ---------------- |
| page\_num     | int   | 当前页码。            |
| page\_size    | int   | 每页条目数。           |
| total\_page   | int   | 总页数。             |
| total\_count  | int   | 总条目数。            |
| channels      | array | 文档数组，每个文档包含以下字段： |
|   id          | str   | 账号唯一 ID。         |
|   name        | str   | 账号名称。            |
|   avatar\_url | str   | 账号头像。            |
|   description | str   | 账号描述。            |
|   following   | bool  | 账号关注状态。          |


## OpenAPI

````yaml POST /v1/channels/search
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/channels/search:
    post:
      tags:
        - openapi-channels
      summary: Search Channels
      description: Search for channels by query string
      operationId: search_channels_reportify_api_v1_channels_search_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OAISearchChannelRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OAISearchChannelPagination'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - BearerAuth: []
components:
  schemas:
    OAISearchChannelRequest:
      properties:
        page_num:
          type: integer
          title: Page Num
          default: 1
        page_size:
          type: integer
          title: Page Size
          default: 10
        query:
          type: string
          title: Query
          description: Query string or url
      type: object
      required:
        - query
      title: OAISearchChannelRequest
    OAISearchChannelPagination:
      properties:
        total_count:
          type: integer
          title: Total Count
          default: 0
        total_page:
          type: integer
          title: Total Page
          default: 0
        page_num:
          type: integer
          title: Page Num
          default: 1
        page_size:
          type: integer
          title: Page Size
          default: 10
        channels:
          items:
            $ref: '#/components/schemas/OAIChannelResponse'
          type: array
          title: Channels
          description: List of channel responses.
      type: object
      required:
        - channels
      title: OAISearchChannelPagination
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    OAIChannelResponse:
      properties:
        id:
          type: string
          title: Id
          description: channel ID
        name:
          type: string
          title: Name
          description: channel name
        description:
          type: string
          title: Description
          description: channel description
          nullable: true
        avatar_url:
          type: string
          title: Avatar Url
          description: channel avatar
          nullable: true
        following:
          type: boolean
          title: Following
          description: follow flag
          default: false
          nullable: true
      type: object
      required:
        - id
        - name
      title: OAIChannelResponse
    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

````