Coub API - HelpSeeker/CoubDownloader GitHub Wiki
One of the biggest problems with Coub is the lack of an up-to-date API documentation. This page is supposed to summarize my experiences with Coub's API, which aren't documented elsewhere.
WORK IN PROGRESS
In the past Coub provided up to 3 audio versions:
- MP3@160Kbps (VBR)
- AAC@128Kbps (CBR)
- MP3@128Kbps (CBR)
I don't know when they changed it or why, but the standalone AAC streams are gone. Normally they were listed under the mobile file versions, but now only the MP3@128Kbps stream shows up. A weird move, since they still use AAC audio for their share version, but after all it's Coub we're talking about. I've given up on trying to understand their moves.
Anyway, that means that a lot of AAC related code can be removed going forward.
This list is supposed to give a quick overview over all the API calls you can encounter on Coub's own website.
# Channels
https://coub.com/<channel> -> /api/v2/timeline/channel/<channel>
https://coub.com/<channel>/coubs -> /api/v2/timeline/channel/<channel>?type=simples
https://coub.com/<channel>/reposts -> /api/v2/timeline/channel/<channel>?type=recoubs
https://coub.com/<channel>/stories -> /api/v2/timeline/channel/<channel>?type=stories
# Channel sorting is done via a dropdown menu and applies to all of the previous URLs
"Most recent" -> /api/v2/timeline/channel/<channel>?order_by=newest (default)
"Most liked" -> /api/v2/timeline/channel/<channel>?order_by=likes_count
"Most viewed" -> /api/v2/timeline/channel/<channel>?order_by=views_count
"Oldest" -> /api/v2/timeline/channel/<channel>?order_by=oldest
"Random" -> /api/v2/timeline/channel/<channel>?order_by=random
# Tags
https://coub.com/tags/<tag> -> /api/v2/timeline/tag/<tag>?order_by=newest_popular
https://coub.com/tags/<tag>/likes -> /api/v2/timeline/tag/<tag>?order_by=likes_count
https://coub.com/tags/<tag>/views -> /api/v2/timeline/tag/<tag>?order_by=views_count
https://coub.com/tags/<tag>/fresh -> /api/v2/timeline/tag/<tag>?order_by=newest
# Searches
https://coub.com/search?q=<term> -> /api/v2/search?q=<term>
https://coub.com/search/likes?q=<term> -> /api/v2/search?q=<term>&order_by=likes_count
https://coub.com/search/views?q=<term> -> /api/v2/search?q=<term>&order_by=views_count
https://coub.com/search/fresh?q=<term> -> /api/v2/search?q=<term>&order_by=newest
https://coub.com/search/channels?q=<term> -> /api/v2/search/channels?q=<term>&order_by=followers_count
# Start page
https://coub.com/hot -> /api/v2/timeline/subscriptions/monthly
https://coub.com/rising -> /api/v2/timeline/subscriptions/rising
https://coub.com/fresh -> /api/v2/timeline/subscriptions/fresh
# The hot section also has a dropdown menu to change the timescale
"Daily" -> /api/v2/timeline/subscriptions/daily
"Weekly" -> /api/v2/timeline/subscriptions/weekly
"Monthly" -> /api/v2/timeline/subscriptions/monthly (default)
"Quarterly" -> /api/v2/timeline/subscriptions/quarter
"Six months" -> /api/v2/timeline/subscriptions/half
# Random
https://coub.com/random -> /api/v2/timeline/explore/random
https://coub.com/random/top -> /api/v2/timeline/explore/random?order_by=top
# The random category also allows additional sorting via tabs
"Popular" -> /api/v2/timeline/explore/random (default; no order_by)
"Top" -> /api/v2/timeline/explore/random?order_by=top
# Communities
https://coub.com/community/<community> -> /api/v2/timeline/community/<community>/monthly
https://coub.com/community/<community>/rising -> /api/v2/timeline/community/<community>/rising
https://coub.com/community/<community>/fresh -> /api/v2/timeline/community/<community>/fresh
https://coub.com/community/<community>/top -> /api/v2/timeline/community/<community>/fresh?order_by=likes_count
https://coub.com/community/<community>/views -> /api/v2/timeline/community/<community>/fresh?order_by=views_count
https://coub.com/community/<community>/random -> /api/v2/timeline/random/<community>
# A community's hot section also allows to select a timescale via dropdown menu
"Daily" -> /api/v2/timeline/community/<community>/daily
"Weekly" -> /api/v2/timeline/community/<community>/weekly
"Monthly" -> /api/v2/timeline/community/<community>/monthly (default)
"Quarterly" -> /api/v2/timeline/community/<community>/quarter
"Six months" -> /api/v2/timeline/community/<community>/half
# Featured
https://coub.com/community/featured -> /api/v2/timeline/explore
https://coub.com/featured/stories -> /api/v2/stories/featured
https://coub.com/featured/stories/likes -> /api/v2/stories/featured?order_by=likes_count
https://coub.com/featured/channels -> /api/v2/channels/featured_channels
# The feature community also allows additional sorting via tabs
"Recent" -> /api/v2/timeline/explore (default; no order_by)
"Top of the Month" -> /api/v2/timeline/explore?order_by=top_of_the_month
"Undervalued" -> /api/v2/timeline/explore?order_by=undervalued
# Coub of the Day
https://coub.com/community/coub-of-the-day -> /api/v2/timeline/explore/coub_of_the_day
# The Coub of the Day community also allows additional sorting via tabs
"Recent" -> /api/v2/timeline/explore/coub_of_the_day (default; no order_by)
"Top" -> /api/v2/timeline/explore/coub_of_the_day?order_by=top
"Views Count" -> /api/v2/timeline/explore/coub_of_the_day?order_by=views_count
What is the difference between api/v2/timeline/explore/COMMUNITY and api/v2/timeline/community/COMMUNITY?
/api/v2/stories/featured -> list of popular stories featured on Coub's start page
/api/v2/stories/<id> -> response JSON for a single story (lists coubs under story_coubs)
/api/v2/channels/featured_channels -> list of popular channels featured on Coub's start page
# allows up to 30 items per page (the usual cap is 25)
Timeline exploring covers coub.com/random and coub.com/community/featured (default sort is recent; also accepts top_of_the_month and undervalued) and coub.com/community/coub_of_the_day (default sort is recent; also accepts top and views_count).
Just an official channel that reposts popular coubs.
/api/v2/weekly_digests/*number*/coubs (number being the number of the week; seems like they started counting at some point and just increase the count)
/api/v2/best (show all available years and the endpoints for their tabs)