# YouTube Channel post API (youtube.community_post)

- Canonical page: [https://everyinfra.com/en/youtube-api/community_post](https://everyinfra.com/en/youtube-api/community_post?utm_medium=ai_doc&utm_campaign=page_md)
- Endpoint: POST https://api.everyinfra.com/api/v1/social with {"platform": "youtube", "action": "community_post", "params": {...}}
- Price: $0.000556 per call ($0.56 per 1,000 requests); failed calls and empty results are not charged
- Returns: single object
- Mode: sync; add "mode": "async" for slow tasks

## Health

- Live health (24h percent, hourly and daily trends): https://api.everyinfra.com/api/v1/social/availability?platform=youtube&action=community_post

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| url | not declared | yes | not declared | A YouTube channel post link (`https://www.youtube.com/post/Ugkx…`), or just the part after /post/. |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| id | The record's unique ID on the platform. Unique only within one platform; IDs can repeat across platforms. |
| url | Link to the record on the platform. |
| text | Body text with HTML removed, returned in full and never cut short (on a few platforms the list results themselves carry only an excerpt; the platform's field notes say so). |
| author_name | Author's display name. |
| author_username | Author's username (@handle), usually usable in URLs. |
| author_id | Author's unique ID on the platform. |
| author_url | Link to the author's profile on the platform. |
| author_avatar_url | platform-native meaning |
| like_count | Likes. null means the platform or this capability does not disclose it; it is not 0. |
| comment_count | Comments. null means not disclosed, not 0. |
| published_text | Publish time as written on the YouTube page, in relative form (e.g. `2 years ago`), returned as is; null when the page shows none. |
| attachment_type | What the post carries: `image` (one image), `multi_image` (several images), `video` or `poll`; null for text-only posts. |
| image_urls | Array of image links in the platform's display order; absent when there are no images. |
| video_id | ID of the video it belongs to; null for replies to a channel post comment. On channel posts, the ID of the video attached to the post, or null if none is attached. |
| video_title | Title of the video attached to the post; null if no video is attached. |
| poll_options | Poll options, as an array of strings; an empty array if the post is not a poll. |
| poll_total_votes | Total votes on the poll, as an integer. YouTube shows an approximate count, so 1.8M is returned as 1800000; null if the post is not a poll. |
| links | Links in the post text, as an array. |
| platform | Source platform identifier, the same as platform in the request (for example xiaohongshu, tiktok). |

## Example

```bash
curl -X POST 'https://api.everyinfra.com/api/v1/social' \
  -H "Authorization: Bearer $EVERYINFRA_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "platform": "youtube",
  "action": "community_post",
  "params": {
    "url": "https://www.youtube.com/post/Ugkx2lkCYp85jak0n5z7-bq_4ug2Rntk9iWT"
  }
}'
```

```python
import os
import requests

response = requests.post(
    "https://api.everyinfra.com/api/v1/social",
    headers={"Authorization": f"Bearer {os.environ['EVERYINFRA_API_KEY']}"},
    json={
        "platform": "youtube",
        "action": "community_post",
        "params": {
            "url": "https://www.youtube.com/post/Ugkx2lkCYp85jak0n5z7-bq_4ug2Rntk9iWT",
        },
    },
    timeout=120,
)
print(response.status_code)
print(response.json())
```

## Response example

Real response to the example request above, captured 2026-11-21T07:24:23Z. `results` and `count` are real with personal information (names, handles, avatars, profile links, contact details) removed. `id`, `billing` and `quota` differ on every call, so only their shape is shown.

```text
{
  "id": "req_…",
  "platform": "youtube",
  "action": "community_post",
  "results": {
    "id": "Ugkx2lkCYp85jak0n5z7-bq_4ug2Rntk9iWT",
    "url": "https://www.youtube.com/post/Ugkx2lkCYp85jak0n5z7-bq_4ug2Rntk9iWT",
    "text": "These last two videos are the best content we’ve ever made and somehow our next 3 uploads are even better. (The team is cooking) I’m feeling more excited and energized about our videos than ever before, new era of Beast coming up 🥰",
    "author_name": "M•••t",
    "author_username": "M•••t",
    "author_id": "•••",
    "author_url": "https://www.youtube.com/•••",
    "author_avatar_url": "https://yt3.googleusercontent.com/•••",
    "like_count": 175000,
    "comment_count": 5000,
    "published_text": "1 month ago",
    "attachment_type": "image",
    "image_urls": [
      "https://yt3.ggpht.com/9davaq2roo2vRpZ80IIGBiCAy6CmeYfm17AkJbLofKYVreyWRk9Y3SF2tcHwTpdGSzRXym9Y_6096A=s994-rw-nd-v1"
    ],
    "platform": "youtube"
  },
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## Also

- Capability catalog (no key): https://api.everyinfra.com/api/v1/social/catalog?platform=youtube
- OpenAPI: https://everyinfra.com/openapi.json · Agents guide: https://everyinfra.com/agents.md
