Skip to main content

YouTube Subscriptions, Ratings, Reports and Activity

Act as the connected YouTube channel: see its subscriptions and subscribers, subscribe to or unsubscribe from channels, like or dislike videos, report a video to YouTube, and read the channel's recent activity.

All endpoints need the header Authorization: Apikey your-api-key-here and user (profile username with a YouTube channel connected). They follow the common rules of the YouTube endpoints.

Use them for real actions of the channel owner. YouTube's policies forbid inflating engagement (mass subscribing, liking or reporting). Each request acts on one channel or one video, and each YouTube channel can subscribe, unsubscribe, rate or report a limited number of times per day through Upload-Post (429 youtube_action_daily_limit, with limit, retry_after and resets_at; resets at midnight Pacific Time).

Subscriptions​

List​

GET /api/uploadposts/youtube/subscriptions

Send exactly one of:

NameDescription
filter=mineChannels the connected channel is subscribed to.
filter=my_subscribersSubscribers of the connected channel (YouTube may limit how many it returns).
filter=my_recent_subscribersSame, newest first.
channel_idPublic subscriptions of another channel (UC…).
idsUp to 50 subscription IDs.

Optional: for_channel_id (up to 50 channel IDs: only subscriptions to those channels, e.g. to check whether you are subscribed), order (relevance, alphabetical, unread), parts (snippet, contentDetails, subscriberSnippet; default the first two), max_results (0-50, default 5) and page_token.

Items are YouTube's subscription resources; the id is what you need to unsubscribe.

Subscribe​

POST /api/uploadposts/youtube/subscriptions

Body: user, channel_id (UC…). Answers 201 with the new subscription. youtube_already_subscribed (400) if it already was; cannot_subscribe_to_self (400) for the channel itself.

Unsubscribe​

DELETE /api/uploadposts/youtube/subscriptions/{subscription_id}?user=my-profile

Ratings​

Like, dislike or remove the rating​

POST /api/uploadposts/youtube/videos/{video_id}/rate

Body: user, rating = like, dislike or none (removes the channel's rating).

curl -X POST https://api.upload-post.com/api/uploadposts/youtube/videos/dQw4w9WgXcQ/rate \
-H 'Authorization: Apikey your-api-key-here' \
-H 'Content-Type: application/json' \
-d '{"user": "my-profile", "rating": "like"}'

Read the channel's rating​

GET /api/uploadposts/youtube/videos/rating?user=my-profile&ids=dQw4w9WgXcQ,abc123def45

Up to 50 video IDs. Returns {"success": true, "items": [{"videoId": "dQw4w9WgXcQ", "rating": "like"}, …], "next_page_token": null, "page_info": null} (none or unspecified when the channel has not rated it). The videos the channel liked are also available with my_rating=like in video details.

Report a video​

POST /api/uploadposts/youtube/videos/{video_id}/report-abuse
NameTypeRequiredDescription
userStringYesProfile username.
reason_idStringYesAn id from abuse reasons.
secondary_reason_idStringNoOne of the secondaryReasons of that reason.
commentsStringNoExtra details for YouTube (up to 3,000 characters). Must be a string.
languageStringNoLanguage of the reporter, from languages.
confirmBooleanYesMust be true: the report is sent on behalf of the channel and cannot be withdrawn.

The reason, secondary reason and language are checked before anything is sent (invalid_reason_id, invalid_secondary_reason_id, invalid_language).

Activity​

GET /api/uploadposts/youtube/activities

The connected channel's recent activity (uploads, playlist additions…), or another channel's with channel_id. Optional: published_after / published_before (RFC 3339), region_code, parts (snippet, contentDetails), max_results (0-50, default 5) and page_token. Items are YouTube's activity resources.

Daily allowance​

Lists cost 1 YouTube quota unit per page; subscribing, unsubscribing, rating and reporting cost 50. They count towards your account's daily allowance. Uploads are never affected.

Errors​

  • 400 — invalid_filter, invalid_channel_id, invalid_ids, invalid_parts, invalid_for_channel_id, invalid_order, invalid_max_results, invalid_subscription_id, invalid_video_id, invalid_rating, missing_ids, invalid_reason_id, invalid_secondary_reason_id, invalid_language, comments_too_long, invalid_field (comments is not a string), confirmation_required, invalid_json, invalid_published_after, invalid_published_before, invalid_region_code, youtube_invalid_page_token; or YouTube rejected the call.
  • 404 — youtube_video_not_found, youtube_subscription_not_found, youtube_channel_not_found.
  • 429 — youtube_action_daily_limit (this channel's daily limit of actions), or the daily allowance / YouTube quota used up (retry_after, resets_at).
  • 502 — youtube_write_outcome_unknown: YouTube did not confirm the result in time, so the action may or may not have been applied; check (for example with the rating or the subscriptions list) before retrying. youtube_unreachable: YouTube could not be reached; retry later.

The common YouTube errors (401 reconnect, 403, 503 youtube_feature_disabled) are listed in video details.