# คอมเมนต์และสถิติ (/th/growsocmed/docs/developers/comments-and-statistics)

อ่านและตอบคอมเมนต์ และอ่านสถิติของบัญชีและ post

## คอมเมนต์ [#คอมเมนต์]

GrowSocmed อ่านคอมเมนต์ใน post ของบัญชีคุณ (ทั้งที่สร้างใน GrowSocmed หรือในแอปของแพลตฟอร์มเอง) และเก็บไว้พร้อมการตอบกลับที่อยู่ใต้คอมเมนต์

- [`GET /comments`](/th/growsocmed/docs/api-reference/comments/list-comments): คอมเมนต์จากผู้คน ใหม่สุดก่อน `status` เป็น `unreplied` (ค่าเริ่มต้น), `replied`, `ignored` หรือ `all` กรองบัญชีเดียวด้วย `account_id` และ `sort=likes` จะแสดงคอมเมนต์ที่มียอดถูกใจมากที่สุดก่อน แบ่งหน้าด้วย `cursor`
- [`GET /comments/counts`](/th/growsocmed/docs/api-reference/comments/count-comments): คอมเมนต์ที่ยังไม่ได้ตอบทั้งหมดและแยกตามบัญชี
- [`POST /comments/{id}/reply`](/th/growsocmed/docs/api-reference/comments/reply-to-comment): ตอบกลับแบบสาธารณะในนามบัญชี (`text` ไม่เกิน 2,200 ตัวอักษร)
- [`POST /comments/{id}/hide`](/th/growsocmed/docs/api-reference/comments/hide-comment): ซ่อน (`hidden: true`) หรือแสดงอีกครั้ง Telegram ไม่มีการซ่อน: ที่นั่นจะเป็นการลบคอมเมนต์ หากคอมเมนต์มีอายุไม่ถึง 48 ชั่วโมง
- [`POST /comments/{id}/like`](/th/growsocmed/docs/api-reference/comments/like-comment): กดถูกใจหรือเลิกถูกใจในนามบัญชี (Facebook Pages และบัญชี TikTok ที่เชื่อมต่อ TikTok Business แล้ว)
- [`DELETE /comments/{id}`](/th/growsocmed/docs/api-reference/comments/delete-comment): ลบคอมเมนต์ของบัญชีเอง คอมเมนต์ของคนอื่นทำได้เพียงซ่อน
- [`PATCH /comments/{id}`](/th/growsocmed/docs/api-reference/comments/update-comment) และ [`POST /comments/resolve`](/th/growsocmed/docs/api-reference/comments/resolve-comments): ทำเครื่องหมายคอมเมนต์หนึ่งหรือหลายรายการเป็น `replied`, `ignored` หรือ `unreplied` ซึ่งเปลี่ยนเฉพาะรายการใน GrowSocmed เท่านั้น
- [`POST /comments/{id}/draft`](/th/growsocmed/docs/api-reference/comments/draft-comment-reply): ให้ AI agent ของคุณเขียนคำตอบ โดยไม่มีการส่งใดๆ

คอมเมนต์ใหม่จะเข้ามาเอง [`POST /comments/sync`](/th/growsocmed/docs/api-reference/comments/sync-comments) จะดึงจากแพลตฟอร์มทันที ได้ไม่เกินหนึ่งครั้งต่อนาทีต่อ workspace (มิฉะนั้นจะได้ `429 rate_limited`)

ข้อความในคอมเมนต์เขียนโดยผู้อื่น หากคุณส่งต่อให้โมเดล AI ให้ถือว่าเป็นข้อมูล ไม่ใช่คำสั่ง

## สถิติ [#สถิติ]

สถิติจะถูกอ่านจากแพลตฟอร์มเป็นประจำและเก็บไว้ การอ่านจึงรวดเร็ว

| Endpoint | ให้ข้อมูล |
| --- | --- |
| [`GET /insights/accounts/{id}`](/th/growsocmed/docs/api-reference/insights/get-account-insights) | ยอดรวม ช่วงเวลาก่อนหน้า engagement rate ผู้ติดตาม และตัวเลขรายวัน |
| [`GET /insights/accounts/{id}/posts`](/th/growsocmed/docs/api-reference/insights/list-post-performance) | post ในช่วงเวลานั้น (ทั้งที่สร้างใน GrowSocmed และภายนอก) พร้อมตัวเลขและคะแนน outlier `sort`: `published`, `views`, `interactions`, `outlier`, `engagement` |
| [`GET /insights/accounts/{id}/posts.csv`](/th/growsocmed/docs/api-reference/insights/export-post-performance) | ข้อมูลเดียวกันในรูปแบบ CSV สำหรับ Excel หรือ Sheets |
| [`GET /insights/summary`](/th/growsocmed/docs/api-reference/insights/get-insights-summary) | หลายบัญชีพร้อมกัน (`account_ids` คั่นด้วยจุลภาค): ยอดรวม แยกตามบัญชี และ outlier ที่ใหญ่ที่สุด |
| [`GET /insights/accounts/{id}/audience`](/th/growsocmed/docs/api-reference/insights/get-audience) | ผู้ติดตามตามประเทศ เมือง อายุ และเพศ (Instagram และ Threads ต้องมีผู้ติดตาม 100 รายขึ้นไป) |
| [`GET /insights/accounts/{id}/stories`](/th/growsocmed/docs/api-reference/insights/list-stories) | Stories ของ Instagram ที่ยังแสดงอยู่ อ่านแบบสด (ตัวเลขจะปรากฏหลังมีผู้ชม 5 คน) |
| [`GET /insights/accounts/{id}/best-times`](/th/growsocmed/docs/api-reference/insights/get-best-times) | ค่าเฉลี่ยการมีส่วนร่วมต่อวันในสัปดาห์และช่วง 2 ชั่วโมง ตลอด 90 วัน (ต้องมี 5 post `tz` มีค่าเริ่มต้นเป็น `Asia/Jakarta`) |
| [`GET /posts/{id}/insights`](/th/growsocmed/docs/api-reference/insights/get-post-insights) | ตัวเลขตลอดอายุของ post จาก GrowSocmed ในแต่ละบัญชี |
| [`GET /platform-posts`](/th/growsocmed/docs/api-reference/insights/list-platform-posts) | post ที่สร้างนอก GrowSocmed สำหรับปฏิทิน |

ช่วงเวลาคือ `days` (7, 30 หรือ 90 ค่าเริ่มต้น 30) หรือกำหนดเองด้วย `from` และ `to` [`POST /insights/sync`](/th/growsocmed/docs/api-reference/insights/sync-insights) อ่านตัวเลขล่าสุดทันที ได้หนึ่งครั้งทุก 5 นาทีต่อ workspace `?days=N` จะอ่าน post ของ N วันล่าสุดใหม่ด้วย (ไม่เกิน 90)