---
title: "查询评论列表"
description: "查询评论列表"
doc_type: openapi
doc_category: openapi
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/zh-hans-cn/docs/admin-rest-api/online-store/comments/query-list-of-comments'
  md: 'https://developer.shopline.com/zh-hans-cn/docs/admin-rest-api/online-store/comments/query-list-of-comments.md'
---
# 查询评论列表

查询评论列表

- **Base URL:** `https://{handle}.myshopline.com/admin/openapi`
- **Required Scopes:** `read_content`
- **API Version:** v20270301
- **API Type:** Admin
- **API Protocol:** RESTful

## Endpoint

```http
GET /store/comments.json
```

## Base URL

* `https://{handle}.myshopline.com/admin/openapi`

  * `{handle}`: `handle` ：店铺的唯一标识符，值为店铺域名的前缀。例如，域名为 `open001.myshopline.com` 的店铺，其 `handle` 是 `open001` 。

## Required Permissions

* `read_content`

## Request

### Query Parameters

* `blog_collection_id`

  string (optional)

  评论所属的文章归属的博客集合id

* `blog_id`

  string (optional)

  评论所属博客id

* `created_at_max`

  string (optional)

  评论创建最大时间 ISO 8601

* `created_at_min`

  string (optional)

  评论创建最小时间 ISO 8601

* `fields`

  string (optional)

  限定返回的对象的字段,多个则用逗号分隔

* `limit`

  integer (optional)

  查询数量限制，默认50，不能超过250

* `published_at_max`

  string (optional)

  发布评论最大时间 ISO 8601

* `published_at_min`

  string (optional)

  发布评论最小时间 ISO 8601

* `published_status`

  string (optional)

  发布状态，枚举值：published（已发布状态）；unpublished：（未发布状态）；any：（所有状态）；

* `since_id`

  string (optional)

  显示此id之后的数据

* `status`

  string (optional)

  状态：枚举值：unapproved（评论等待批准）；published（已发布状态）；

* `updated_at_max`

  string (optional)

  更新最大时间 ISO 8601

* `updated_at_min`

  string (optional)

  更新最小时间 ISO 8601

### Request Headers

* `Content-Type`

  string (required)

  字段值固定为 `application/json; charset=utf-8`。

* `Authorization`

  string (required)

  资源的访问令牌。参考 [应用授权](https://developer.shopline.com/zh-hans-cn/docs/apps/api-instructions-for-use/app-authorization.md?lang=zh-hans-cn) 获取访问令牌，然后将获取到的访问令牌以 Bearer 格式传入。

## Response

### Status Codes

* `200`

  更多状态码信息，参考 [HTTP 状态码](https://developer.shopline.com/zh-hans-cn/docs/apps/api-instructions-for-use/http-status-code.md?lang=zh-hans-cn)。

* `401`

  

* `429`

  

### Response Headers

* `traceId`

  请求的全局唯一标识符。用于追踪请求在系统中的流转，以便于问题发生时进行定位和调试。

### Response Body

#### 200

* `comments`

  array<object>

  评论信息

  * `id`

    string

    评论id

  * `published_at`

    string

    发布评论的时间 ISO 8601

  * `author`

    string

    评论的作者

  * `body`

    string

    评论内容

  * `blog_collection_id`

    string

    评论所属的文章归属的博客集合id

  * `create_at`

    string

    评论的创建时间 ISO 8601

  * `blog_id`

    string

    评论所属博客id

  * `email`

    string

    评论作者的邮件地址

  * `ip`

    string

    发表评论的ip

  * `updated_at`

    string

    更新时间 ISO 8601

  * `body_html`

    string

    含有html标记的body内容

  * `status`

    string

    评论状态，枚举值：unapproved（默认状态，评论等待批准，C端不展示此状态评论）； published：（已发布状态，并且对C端用户可见）； spam：（垃圾评论，C端用户不可见）； removed：（评论标记为已删除状态，C端用户不可见）

  * `user_agent`

    string

    用户代理信息


#### 401

* `errors`

  string

  错误描述。


#### 429

* `errors`

  string

  错误描述。


## OpenAPI Definition

```json
{
  "description": "查询评论列表",
  "externalDocs": {
    "description": "接口使用的权限点: `read_content` ，更多权限点使用信息，请参考:",
    "url": "ec20/3cv5d7wpfgr6a8z5/xabczf5442284vkq?lang=zh-hans-cn",
    "errorTableDescription": ""
  },
  "operationId": "fMRKvhct",
  "parameters": [
    {
      "name": "blog_collection_id",
      "in": "query",
      "description": "评论所属的文章归属的博客集合id",
      "style": "form",
      "explode": true,
      "schema": {
        "name": "blog_collection_id",
        "description": "评论所属的文章归属的博客集合id",
        "type": "string",
        "example": "639bfda0ee877c4a9bd600b6"
      },
      "example": "639bfda0ee877c4a9bd600b6"
    },
    {
      "name": "blog_id",
      "in": "query",
      "description": "评论所属博客id",
      "style": "form",
      "explode": true,
      "schema": {
        "name": "blog_id",
        "description": "评论所属博客id",
        "type": "string",
        "example": "63a2afa527797d5cedcecb52"
      },
      "example": "63a2afa527797d5cedcecb52"
    },
    {
      "name": "created_at_max",
      "in": "query",
      "description": "评论创建最大时间 ISO 8601",
      "style": "form",
      "explode": true,
      "schema": {
        "name": "created_at_max",
        "description": "评论创建最大时间 ISO 8601",
        "type": "string",
        "example": "2022-08-03T10:45:00+08:00\t\n"
      },
      "example": "2022-08-03T10:45:00+08:00\t\n"
    },
    {
      "name": "created_at_min",
      "in": "query",
      "description": "评论创建最小时间 ISO 8601",
      "style": "form",
      "explode": true,
      "schema": {
        "name": "created_at_min",
        "description": "评论创建最小时间 ISO 8601",
        "type": "string",
        "example": "2022-08-03T10:45:00+08:00\t\n"
      },
      "example": "2022-08-03T10:45:00+08:00\t\n"
    },
    {
      "name": "fields",
      "in": "query",
      "description": "限定返回的对象的字段,多个则用逗号分隔",
      "style": "form",
      "explode": true,
      "schema": {
        "name": "fields",
        "description": "限定返回的对象的字段,多个则用逗号分隔",
        "type": "string",
        "example": "body_html,author"
      },
      "example": "body_html,author"
    },
    {
      "name": "limit",
      "in": "query",
      "description": "查询数量限制，默认50，不能超过250",
      "style": "form",
      "explode": true,
      "schema": {
        "name": "limit",
        "description": "查询数量限制，默认50，不能超过250",
        "type": "integer",
        "example": 100
      },
      "example": 100
    },
    {
      "name": "published_at_max",
      "in": "query",
      "description": "发布评论最大时间 ISO 8601",
      "style": "form",
      "explode": true,
      "schema": {
        "name": "published_at_max",
        "description": "发布评论最大时间 ISO 8601",
        "type": "string",
        "example": "2022-08-03T10:45:00+08:00\t\n"
      },
      "example": "2022-08-03T10:45:00+08:00\t\n"
    },
    {
      "name": "published_at_min",
      "in": "query",
      "description": "发布评论最小时间 ISO 8601",
      "style": "form",
      "explode": true,
      "schema": {
        "name": "published_at_min",
        "description": "发布评论最小时间 ISO 8601",
        "type": "string",
        "example": "2022-08-03T10:45:00+08:00\t\n"
      },
      "example": "2022-08-03T10:45:00+08:00\t\n"
    },
    {
      "name": "published_status",
      "in": "query",
      "description": "发布状态，枚举值：published（已发布状态）；unpublished：（未发布状态）；any：（所有状态）；",
      "style": "form",
      "explode": true,
      "schema": {
        "name": "published_status",
        "description": "发布状态，枚举值：published（已发布状态）；unpublished：（未发布状态）；any：（所有状态）；",
        "type": "string",
        "example": "published"
      },
      "example": "published"
    },
    {
      "name": "since_id",
      "in": "query",
      "description": "显示此id之后的数据",
      "style": "form",
      "explode": true,
      "schema": {
        "name": "since_id",
        "description": "显示此id之后的数据",
        "type": "string",
        "example": "63aaacb8b0fea649647a241a"
      },
      "example": "63aaacb8b0fea649647a241a"
    },
    {
      "name": "status",
      "in": "query",
      "description": "状态：枚举值：unapproved（评论等待批准）；published（已发布状态）；",
      "style": "form",
      "explode": true,
      "schema": {
        "name": "status",
        "description": "状态：枚举值：unapproved（评论等待批准）；published（已发布状态）；",
        "type": "string",
        "example": "unapproved"
      },
      "example": "unapproved"
    },
    {
      "name": "updated_at_max",
      "in": "query",
      "description": "更新最大时间 ISO 8601",
      "style": "form",
      "explode": true,
      "schema": {
        "name": "updated_at_max",
        "description": "更新最大时间 ISO 8601",
        "type": "string",
        "example": "2022-08-03T10:45:00+08:00\t\n"
      },
      "example": "2022-08-03T10:45:00+08:00\t\n"
    },
    {
      "name": "updated_at_min",
      "in": "query",
      "description": "更新最小时间 ISO 8601",
      "style": "form",
      "explode": true,
      "schema": {
        "name": "updated_at_min",
        "description": "更新最小时间 ISO 8601",
        "type": "string",
        "example": "2022-08-03T10:45:00+08:00\t\n"
      },
      "example": "2022-08-03T10:45:00+08:00\t\n"
    },
    {
      "name": "Content-Type",
      "in": "header",
      "description": "字段值固定为 `application/json; charset=utf-8`。",
      "required": true,
      "style": "string",
      "schema": {
        "name": "Content-Type",
        "type": "string",
        "example": "application/json; charset=utf-8"
      }
    },
    {
      "name": "Authorization",
      "in": "header",
      "description": "资源的访问令牌。参考 [应用授权](https://developer.shopline.com/zh-hans-cn/docs/apps/api-instructions-for-use/app-authorization.md?lang=zh-hans-cn) 获取访问令牌，然后将获取到的访问令牌以 Bearer 格式传入。",
      "required": true,
      "style": "string",
      "schema": {
        "name": "Authorization",
        "description": "资源的访问令牌。请参考 [应用授权](https://developer.shopline.com/zh-hans-cn/docs/apps/api-instructions-for-use/app-authorization.md?lang=zh-hans-cn) 获取访问令牌，然后将获取到的访问令牌以 Bearer 格式传入",
        "type": "string",
        "example": "Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhcHBJZCI6MCwiYXBwS2V5IjoiNzU2ZjI1NWE2NjdlZTcwNTk1MzM0ZjVjYzk4NzU5MzBmN2E3NGZjMSIsImV4cCI6MTg3OTQ4MjA3NiwiaXNzIjoieXNvdWwiLCJzZWxsZXJJZCI6IjIwMDAyMzQ4ODAiLCJzdG9yZUlkIjoiMTY3MjM2OTcyOTYwNiIsInRpbWVzdGFtcCI6MTc4NDc4NzY3NjY2MSwidmVyc2lvbiI6IlYyIn0.3ZzbGAH4cLU1QR2VPEvMOQInUDvus-C4amkINSQIPuNVlXsFKj0sAt1c0KnUy9MWUOFV9cHlkf7J90r2y1FzpA"
      },
      "example": "Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhcHBJZCI6MCwiYXBwS2V5IjoiNzU2ZjI1NWE2NjdlZTcwNTk1MzM0ZjVjYzk4NzU5MzBmN2E3NGZjMSIsImV4cCI6MTg3OTQ4MjA3NiwiaXNzIjoieXNvdWwiLCJzZWxsZXJJZCI6IjIwMDAyMzQ4ODAiLCJzdG9yZUlkIjoiMTY3MjM2OTcyOTYwNiIsInRpbWVzdGFtcCI6MTc4NDc4NzY3NjY2MSwidmVyc2lvbiI6IlYyIn0.3ZzbGAH4cLU1QR2VPEvMOQInUDvus-C4amkINSQIPuNVlXsFKj0sAt1c0KnUy9MWUOFV9cHlkf7J90r2y1FzpA"
    }
  ],
  "responses": {
    "200": {
      "description": "更多状态码信息，参考 [HTTP 状态码](https://developer.shopline.com/zh-hans-cn/docs/apps/api-instructions-for-use/http-status-code.md?lang=zh-hans-cn)。",
      "headers": {
        "traceId": {
          "description": "请求的全局唯一标识符。用于追踪请求在系统中的流转，以便于问题发生时进行定位和调试。"
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "comments": {
                "name": "comments",
                "description": "评论信息",
                "type": "array",
                "items": {
                  "name": "comments",
                  "description": "评论信息",
                  "type": "object",
                  "properties": {
                    "id": {
                      "name": "id",
                      "description": "评论id",
                      "type": "string",
                      "example": "63aaa20f6b7b014b289c0765"
                    },
                    "published_at": {
                      "name": "published_at",
                      "description": "发布评论的时间 ISO 8601",
                      "type": "string",
                      "example": "2022-08-03T10:45:00+08:00\t\n"
                    },
                    "author": {
                      "name": "author",
                      "description": "评论的作者",
                      "type": "string",
                      "example": "demo-author"
                    },
                    "body": {
                      "name": "body",
                      "description": "评论内容",
                      "type": "string",
                      "example": "demo-content"
                    },
                    "blog_collection_id": {
                      "name": "blog_collection_id",
                      "description": "评论所属的文章归属的博客集合id",
                      "type": "string",
                      "example": "639bfda0ee877c4a9bd600b6"
                    },
                    "create_at": {
                      "name": "create_at",
                      "description": "评论的创建时间 ISO 8601",
                      "type": "string",
                      "example": "2022-08-03T10:45:00+08:00\t\n"
                    },
                    "blog_id": {
                      "name": "blog_id",
                      "description": "评论所属博客id",
                      "type": "string",
                      "example": "63a2afa527797d5cedcecb52"
                    },
                    "email": {
                      "name": "email",
                      "description": "评论作者的邮件地址",
                      "type": "string",
                      "example": "demo@qq.com"
                    },
                    "ip": {
                      "name": "ip",
                      "description": "发表评论的ip",
                      "type": "string",
                      "example": "172.28.173.136"
                    },
                    "updated_at": {
                      "name": "updated_at",
                      "description": "更新时间 ISO 8601",
                      "type": "string",
                      "example": "2022-08-03T10:45:00+08:00\t\n"
                    },
                    "body_html": {
                      "name": "body_html",
                      "description": "含有html标记的body内容",
                      "type": "string",
                      "example": "<p>demo-content</p>"
                    },
                    "status": {
                      "name": "status",
                      "description": "评论状态，枚举值：unapproved（默认状态，评论等待批准，C端不展示此状态评论）； published：（已发布状态，并且对C端用户可见）； spam：（垃圾评论，C端用户不可见）； removed：（评论标记为已删除状态，C端用户不可见）",
                      "type": "string",
                      "example": "unapproved"
                    },
                    "user_agent": {
                      "name": "user_agent",
                      "description": "用户代理信息",
                      "type": "string",
                      "example": ""
                    }
                  },
                  "example": {
                    "email": "demo@qq.com",
                    "blog_id": "63a2afa527797d5cedcecb52",
                    "body_html": "<p>demo-content</p>",
                    "published_at": "2022-08-03T10:45:00+08:00\t\n",
                    "status": "unapproved",
                    "blog_collection_id": "639bfda0ee877c4a9bd600b6",
                    "updated_at": "2022-08-03T10:45:00+08:00\t\n",
                    "user_agent": "",
                    "author": "demo-author",
                    "create_at": "2022-08-03T10:45:00+08:00\t\n",
                    "id": "63aaa20f6b7b014b289c0765",
                    "ip": "172.28.173.136",
                    "body": "demo-content"
                  }
                },
                "example": [
                  {
                    "blog_id": "63a2afa527797d5cedcecb52",
                    "email": "demo@qq.com",
                    "published_at": "2022-08-03T10:45:00+08:00\t\n",
                    "ip": "172.28.173.136",
                    "author": "demo-author",
                    "blog_collection_id": "639bfda0ee877c4a9bd600b6",
                    "user_agent": "",
                    "body_html": "<p>demo-content</p>",
                    "status": "unapproved",
                    "updated_at": "2022-08-03T10:45:00+08:00\t\n",
                    "create_at": "2022-08-03T10:45:00+08:00\t\n",
                    "body": "demo-content",
                    "id": "63aaa20f6b7b014b289c0765"
                  }
                ]
              }
            },
            "example": {
              "comments": [
                {
                  "user_agent": "",
                  "body_html": "<p>demo-content</p>",
                  "blog_id": "63a2afa527797d5cedcecb52",
                  "author": "demo-author",
                  "id": "63aaa20f6b7b014b289c0765",
                  "updated_at": "2022-08-03T10:45:00+08:00\t\n",
                  "body": "demo-content",
                  "status": "unapproved",
                  "email": "demo@qq.com",
                  "ip": "172.28.173.136",
                  "published_at": "2022-08-03T10:45:00+08:00\t\n",
                  "create_at": "2022-08-03T10:45:00+08:00\t\n",
                  "blog_collection_id": "639bfda0ee877c4a9bd600b6"
                }
              ]
            }
          },
          "examples": {
            "查询评论列表": {
              "value": {
                "comments": [
                  {
                    "email": "test@qq.com",
                    "body": "fsf",
                    "author": "testdew",
                    "create_at": "2022-11-25T12:19:44+08:00",
                    "id": "63804260a0a9ba4487960881",
                    "status": "published",
                    "blog_collection_id": "632c137a0fe5b42e60a04b62",
                    "ip": "157.119.232.38,10.98.217.51",
                    "published_at": "2022-11-25T12:19:57+08:00",
                    "updated_at": "2022-11-25T12:19:57+08:00",
                    "blog_id": "63803d9ec57c9739b672296b"
                  },
                  {
                    "create_at": "2022-11-25T12:12:54+08:00",
                    "ip": "157.119.232.38,10.98.209.49",
                    "status": "published",
                    "author": "testdet",
                    "blog_id": "63357995840927149ba6c75c",
                    "blog_collection_id": "632c137a0fe5b42e60a04b62",
                    "body": "test",
                    "email": "test@qq.com",
                    "id": "638040c6a0a9ba4487960880",
                    "published_at": "2022-11-25T12:13:01+08:00",
                    "updated_at": "2022-11-25T12:13:01+08:00"
                  },
                  {
                    "author": "test",
                    "id": "6373961f22270c51e7ea5831",
                    "ip": "172.71.14.132,10.98.223.48",
                    "blog_collection_id": "633456618c5d1d25c6502e05",
                    "body": "test@qq.com",
                    "status": "published",
                    "blog_id": "63345662840927149ba620ce",
                    "create_at": "2022-11-15T21:37:35+08:00",
                    "email": "test@qq.com",
                    "published_at": "2022-11-15T21:37:49+08:00",
                    "updated_at": "2022-11-15T21:37:49+08:00"
                  },
                  {
                    "id": "63563943e3ef6c5645bd5c38",
                    "status": "published",
                    "blog_collection_id": "633456618c5d1d25c6502e05",
                    "email": "test@ww.vom",
                    "blog_id": "63345662840927149ba620ce",
                    "create_at": "2022-10-24T15:05:39+08:00",
                    "author": "测试",
                    "ip": "218.253.130.212,10.218.10.96",
                    "updated_at": "2022-10-24T15:05:50+08:00",
                    "body": "test@ww.vom",
                    "published_at": "2022-10-24T15:05:50+08:00"
                  },
                  {
                    "id": "63156ef7f79e9061863e0f7d",
                    "ip": "218.253.130.211,10.218.16.233",
                    "blog_collection_id": "630d8e61624a3b67a72ebd0a",
                    "author": "自动发布66",
                    "body": "自动发布66@qq.com",
                    "create_at": "2022-09-05T11:37:27+08:00",
                    "status": "published",
                    "published_at": "2022-09-05T20:33:48+08:00",
                    "blog_id": "630d8e4b7bd58a0b24e453b5",
                    "updated_at": "2022-09-05T20:33:48+08:00",
                    "email": "6@qq.com"
                  },
                  {
                    "status": "published",
                    "id": "63156edaf79e9061863e0f7c",
                    "author": "LE",
                    "blog_collection_id": "630d8e61624a3b67a72ebd0a",
                    "ip": "218.253.130.211,10.218.16.233",
                    "email": "werwerwe@qq.com",
                    "body": "LEfsfdsfsdf",
                    "create_at": "2022-09-05T11:36:58+08:00",
                    "published_at": "2022-09-05T20:33:48+08:00",
                    "updated_at": "2022-09-05T20:33:48+08:00",
                    "blog_id": "630d8e4b7bd58a0b24e453b5"
                  },
                  {
                    "email": "23423@qq.com",
                    "status": "published",
                    "id": "63156ec9f79e9061863e0f7b",
                    "ip": "218.253.130.211,10.218.31.172",
                    "create_at": "2022-09-05T11:36:41+08:00",
                    "blog_id": "630d8e4b7bd58a0b24e453b5",
                    "updated_at": "2022-09-05T20:33:48+08:00",
                    "author": "234234",
                    "body": "23424234",
                    "published_at": "2022-09-05T20:33:48+08:00",
                    "blog_collection_id": "630d8e61624a3b67a72ebd0a"
                  },
                  {
                    "author": "12321",
                    "id": "6310299f0a68a2615bfd6b70",
                    "ip": "218.253.130.211,10.218.32.10",
                    "status": "published",
                    "updated_at": "2022-09-01T11:40:24+08:00",
                    "blog_collection_id": "63102984a41c340478649389",
                    "create_at": "2022-09-01T11:40:15+08:00",
                    "email": "12312@qq.com",
                    "published_at": "2022-09-01T11:40:24+08:00",
                    "blog_id": "63102984a41c34047864938a",
                    "body": "123213"
                  },
                  {
                    "body": "123213",
                    "email": "123213@qq.com",
                    "ip": "218.253.130.211,10.218.17.33",
                    "updated_at": "2022-08-30T17:14:06+08:00",
                    "blog_collection_id": "62e0dfd59eb73e6fdebe0d63",
                    "blog_id": "63032d4027ed7c01fa62c72f",
                    "id": "630d8eb087f3f8143e0e1bc0",
                    "published_at": "2022-08-30T17:14:06+08:00",
                    "author": "123213",
                    "status": "published",
                    "create_at": "2022-08-30T12:14:40+08:00"
                  }
                ]
              }
            }
          }
        }
      }
    },
    "401": {
      "headers": {
        "traceId": {
          "description": "请求的全局唯一标识符。用于追踪请求在系统中的流转，以便于问题发生时进行定位和调试。"
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "errors": {
                "description": "错误描述。",
                "type": "string"
              }
            },
            "required": [
              "errors"
            ]
          }
        }
      }
    },
    "429": {
      "headers": {
        "traceId": {
          "description": "请求的全局唯一标识符。用于追踪请求在系统中的流转，以便于问题发生时进行定位和调试。"
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "errors": {
                "description": "错误描述。",
                "type": "string"
              }
            },
            "required": [
              "errors"
            ]
          }
        }
      }
    }
  },
  "security": [
    {
      "oauth2": []
    }
  ],
  "method": "get",
  "path": "/store/comments.json",
  "servers": [
    {
      "url": "https://{handle}.myshopline.com/admin/openapi",
      "variables": {
        "handle": {
          "default": "openapiceshidianpu",
          "description": "`handle` ：店铺的唯一标识符，值为店铺域名的前缀。例如，域名为 `open001.myshopline.com` 的店铺，其 `handle` 是 `open001` 。"
        }
      }
    }
  ],
  "info": {
    "title": "查询评论列表",
    "version": "v20270301"
  },
  "authIndexes": [
    "read_content"
  ]
}
```