API DocsyoutubeContentGet post detail
Get post detail
What this API is for
- Get YouTube post (community post) detail information
- Includes post content, attachments, engagement data
GET
/openapi/api/v1/youtube/web_v2/get_post_detailPrice:Price unavailable · Actual charges depend on free quota and account discounts
Authentication
All API requests require a Bearer project token in the Authorization header
Authorization header
Authorization: Bearer YOUR_API_TOKENRequest parameters
- Required:
- **post_id** (string)
- **Purpose**: Post ID
- **How to get**: Extract from post URL, e.g., https://www.youtube.com/post/UgkxiCSRfD6g7SPlWGPDa3vbP7aIsytXRkvy
- **Example**: "UgkxiCSRfD6g7SPlWGPDa3vbP7aIsytXRkvy"
- Optional:
- **language_code** (string, optional) - Language code, default "zh-CN"
- **country_code** (string, optional) - Country code, default "US"
- **need_format** (bool, optional) - Whether to format data, default true
| Name | Location / type | Required | Notes | Example |
|---|---|---|---|---|
| post_id | query / string | Yes |
| UgkxiCSRfD6g7SPlWGPDa3vbP7aIsytXRkvy |
| language_code | query / string | No |
| zh-CN |
| country_code | query / string | No |
| US |
| need_format | query / boolean | No |
|
Request examples
curl -X GET "https://api.trmesh.com/openapi/api/v1/youtube/web_v2/get_post_detail" \ -H "Authorization: Bearer sdc_your_project_token" \ -H "Accept: application/json"
Response fields
- When need_format=true:
- post: Post detail
- post_id: Post ID
- post_url: Post URL
- author_name: Author name
- author_channel_id: Author channel ID
- author_url: Author channel URL
- author_thumbnails: Author avatar thumbnails
- content_text: Post text content
- published_time: Published time (relative)
- vote_count: Like count
- comment_count: Comment count
- attachment: Attachment data (image/multi_image/video/poll, may be null)
- channel_metadata: Channel metadata (name, description, URL, etc.)
- comments_continuation_token: Comments pagination token
- When need_format=false:
- Returns raw data
| Field | Type | Notes | Example |
|---|---|---|---|
| post | unknown |
| |
| post_id | unknown |
| |
| post_url | unknown |
| |
| author_name | unknown |
| |
| author_channel_id | unknown |
| |
| author_url | unknown |
| |
| author_thumbnails | unknown |
| |
| content_text | unknown |
| |
| published_time | unknown |
| |
| vote_count | unknown |
| |
| comment_count | unknown |
| |
| attachment | unknown |
| |
| channel_metadata | unknown |
| |
| comments_continuation_token | unknown |
|
Common response envelope
Common fields for response status, request identifiers and data
| Field | Type | Notes | Example |
|---|---|---|---|
| code | integer |
| |
| request_id | string | null |
| |
| message | string |
| |
| message_zh | string |
| |
| support | string |
| |
| time | string |
| |
| time_stamp | integer |
| |
| time_zone | string |
| |
| docs | string | null |
| |
| cache_message | string | null |
| |
| cache_message_zh | string | null |
| |
| cache_url | string | null |
| |
| router | string |
| |
| params | unknown |
| |
| data | unknown | null |
|
Errors and limits
The docs cover not only success responses, but also auth failures, rate limits, and data-service errors
| Code | Meaning | Notes |
|---|---|---|
| 200 | Success | The request completed and returned the standard response envelope. |
| 401 | Unauthorized | The token is missing, invalid, or no longer active. |
| 429 | Rate limited | The request exceeded token, user, or plan-level throughput limits. |
| 502 | Service unavailable | The gateway could not obtain a healthy result. Retry in a moment. |
Next steps
New to the API? Read the guide or explore examples