Data stuctures

Each coub or channel have a unique identification number — the id. To request for a coub or a channel data you need to know its id.

Besides the id each coub or channel also have the permalink — a short string, which is a part of the coub/channel's URL, that points to a specific one. The permalink of a coub is generated automatically; the permalink of a channel is set by a user.

All the data the Coub server responses with have a JSON format.

Apart from short response messages (like status messages), the Coub server can provide you with an extensive amount of the information about a coub video or a channel.

The Coub web API defines two types of representations of this information: big — a detailed JSON with full available data; and small — simplified one that contains only necessary fields.

Coub big JSON

Coub big JSON contains all available data about a coub video:

  • id (integer) — the coub identifier;
  • type (string)Coub::Simple by default or Coub::Recoub if it is a recoub;
  • permalink (string) — the permalink of the coub;
  • title (string) — the title of the coub;
  • visibility_type (string) — the type of the coub's visibility; accepts one of the following values:
    • public — the coub is visible for everyone;
    • friends — the coub is visible only for its creator's friends;
    • unlisted — the coub is accessible only via direct link;
    • private — the coub is visible only for its creator.
  • channel_id (integer) — the identifier of the channel that the coub belongs to;
  • created_at (UNIX-time) — the time when the coub was created;
  • updated_at (UNIX-time) — the time of the last coub's update;
  • is_done (boolean) — whether the coub's uploading process is completed;
  • duration (float) — the duration of the coub video in seconds;
  • views_count (integer) — the number of times the coub was viewed;
  • cotd (boolean) — whether the coub was chosen as the coub of the day;
  • cotd_at (UNIX-time) — the date when the coub was chosen as the coub of the day;
  • recoub (boolean) — whether the coub was recoubed by the current channel;
  • like (boolean) — whether the coub was liked by the the current channel;
  • recoubs_count (integer) — the number of recoubs of the coub;
  • likes_count (integer) — the number of likes the coub has received;
  • recoub_to (integer) — the identifier of the original coub which the current coub is recoubed from;
  • flag (boolean) — whether the coub has any abuses;
  • original_sound (boolean) — if the coub has the audio track from its source video;
  • has_sound (boolean) — whether the coub has an audio track;

  • file_versions (JSON) — the JSON object that describes versions of coub's video formats; it contains several nested JSON objects:

    • web (JSON) — the JSON object that contains the coub data specific to the version of the video that intented to be displayed on web sites:
      • template (string) — the template of the URLs to the files specified in this JSON;
      • types (array) — the array of strings that specify video formats in which the coub is coded; available formats are: flw, mp4;
      • version (array) — the array of strings of video dimensions of the coub; available dimensions are:
        • big — scaled into 1280x1280 rectangle;
        • med — scaled into 640x500 rectangle;
        • small — scaled into 400x400 rectangle;
    • web_chunks (JSON) — the JSON object that contains the coub data, specific to the version of the video intented to be displayed on web sites, that divided into several parts — chunks:
      • template (string) — the template of the URLs to the files specified in this JSON;
      • types (array) — the array of strings that specify video formats in which the coub is coded; available formats are: flw, mp4;
      • version (array) — the array of strings of video dimensions of the coub; available dimensions are:
        • big — scaled into 1280x1280 rectangle;
        • med — scaled into 640x500 rectangle;
        • small — scaled into 400x400 rectangle;
      • chunks (array) — the array of integers — chunks numbers;
    • html5 (JSON) — the JSON object that contains the coub data specific to the HTML5 version of the coub video:
      • template (string) — the template of the URLs to the files specified in this JSON;
      • chunks (array) — the array of integers — chunks numbers;
    • iphone (JSON) — the JSON object that contains a coub data specific to the version of the video intented to be displayed on iOS devices.
      • url (string) — the URL to the video file;
    • mobile (JSON) — the JSON object that contains the coub data specific to the version of the video intented to be displayed on mobile devices:
      • audio_url (string) — the URL to the audio track of this coub version;
      • base64_url (string) — the URL to the mobile version of the video file that is encoded in the base64 format;
      • base64_files (array) — the array of URLs to the chunks of the mobile video version encoded in the base64 format;
      • frames_count (integer) — the number of frames of the video file;
  • audio_versions (JSON) — the JSON object that describes versions of coub's audio formats;

    • template (string) — the template of the URLs to the files specified in this JSON;
    • version (array) — the array of strings of audio qualities of the coub; available qualities are: high, mid, low;
    • chunks (JSON) — the JSON object that contains data specific to chunks of the audio track.
      • template (string) — the template of the URLs to the files specified in this JSON;
      • version (array) — the array of strings of audio qualities of the chunks; available qualities are: high, mid, low;
        • chunks (JSON) — the array of integers — chunks numbers;
  • flv_audio_versions (JSON) — the JSON object that describes versions of the audio track that relates to the flv-version of the coub video;

    • file (JSON) — the JSON object that describes the audio track of flv-version of the coub.
      • template (string) — the template of the URLs to the files specified in this JSON;
      • version (array) — the array of strings of audio qualities of the chunks; available qualities are: high, mid, low;
    • chunks (JSON) — the JSON object that contains data, specific to chunks of the audio track of the flv-version.
      • template (string) — the template of the URLs to the files specified in this JSON;
      • version (array) — the array of strings of audio qualities of the chunks; available qualities are: high, mid, low;
      • chunks (JSON) — the array of integers — chunks numbers;
  • image_versions (JSON) — the JSON object that describes available thumbnail images of the video;

    • template (string) — the template of the URLs to the files specified in this JSON;
    • version (array) — the array of strings that describe types of preview images; available types are:
      • micro — 70x46 pixels;
      • tiny — 112x85 pixels;
      • age_restrcited — 640x640 pixels; this image have the restriction sign;
      • ios_large — 600x525 pixels; intended to be dispayed on iOS devices;
      • big — 1280x1280 pixels;
      • med — 640x500 pixels;
      • small — 400x400 pixels;
      • pinterest — 600x600 pixels; intended to be dispayed in pinterest web site;
  • first_frame_versions (JSON) — the JSON object that describes the first frame of the coub;

    • template (string) — the template of the URLs to the files specified in this JSON;
    • version (array) — the array of strings that describe types of preview images; available types are:
      • big — 1280x1280 pixels;
      • med — 640x500 pixels;
      • small — 400x400 pixels;
      • ios_large — 600x525 pixels; this image is intended to be dispayed on iOS devices;
  • dimensions (JSON) — the JSON objects describes exact resolutions for every version of the coub video:

    • big (array) — the array that contains two integers: the height and the width of the video with the big resolution;
    • med (array) — the array that contains two integers: the height and the width of the video with the med resolution;
    • small (array) — the array that contains two integers: the height and the width of the video with the small resolution;
  • age_restricted (boolean) — whether the coub video has age restrictions set by its creator;

  • age_restricted_by_admin (boolean) — whether the coub video has age restrictions set by the Coub administration;

  • allow_reuse (boolean) — whether the coub video is allowed to be used in other coubs;

  • banned (boolean) — whether the coub video is banned by the Coub administration;

  • external_download (JSON) — the JSON objects that describes the external source of the video (in case if it is uploaded from a user computer, this field is set to false).

    • type (string) — the type of the external source; can be one of the following:
      • Youtube;
      • Vimeo;
      • Vk;
      • Instagram;
      • Vine;
      • Wimp;
      • Facebook;
      • Odnoklassniki;
      • Funnyordie;
      • Carambatv;
      • CollegeHumor;
      • LiveLeak;
      • Dailymotion;
      • TetTv;
    • url (string) — the URL of the source video;
  • channel (JSON) — the channel small JSON that describes the channel the video is uploaded to;

  • percent_done (integer) — the percent of the completion of the video upload;
  • tags (array) — the array of JSON objects that stores the data of tags added to the coub:

    • id (integer) — the id of the tag;
    • title (string) — the title of the tag;
    • value (string) — the title of the tag with escaped characters;
  • raw_video_id (integer) — the id of the uploaded video file's source;

  • media_blocks (JSON) — the JSON object that stores the data relates to the sources of the coub's video and audio:

    • audio_track (JSON) — the JSON object stores the data relates to the source of the coub's audio track:
      • id (integer) — the identifier of the source audio file;
      • title (string) — the original title of the source audio;
      • url (string) — the URL to the source audio file;
      • image (string) — the URL to the thumbnail image of the audio track;
      • image_retina (string) — the URL to the high resolution thumbnail image of the audio track;
      • itunes_url (string) — the URL to the iTunes resource that contains the audio track (if the audio have an other source — is set to null)
      • amazon_url (string) — the URL to the Amazon resource that contains the audio track (if the audio have an other source — is set to null)
      • bandcamp_url (string) — the URL to the Bandcamp resource that contains the audio track (if the audio have an other source — is set to null)
      • soundcloud_url (string) — the URL to the Soundcloud resource that contains the audio track (if the audio have an other source — is set to null)
      • track_name (string) — the name of the original audio track;
      • track_artist (string) — the author of the original audio track;
      • track_album (string) — the album contains the original audio track;
      • meta (JSON) — the JSON object contains meta information about the audio track:
        • year (string) — the year of the track's release;
        • album (string) — the track's album;
        • title (string) — the track's title;
        • artist (string) — the track's author;
    • external_video (JSON) — the JSON object that stores the data relates to the source of the coub's video.
      • id (integer) — the identifier of the source audio file;
      • title (string) — the original title of the source video;
      • url (string) — the URL to the source video file;
      • image (string) — the URL to the thumbnail image of the video;
      • image_retina (string) — the URL to the high resolution thumbnail image of the video;
      • itunes_url (string) — the URL to the iTunes resource that contains the video (if the video have an other source — is set to null)
      • amazon_url (string) — the URL to the Amazon resource that contains the video (if the audio video an other source — is set to null)
      • bandcamp_url (string) — the URL to the Bandcamp resource that contains the video (if the video have an other source — is set to null)
      • soundcloud_url (string) — the URL to the Soundcloud resource that contains the video track (if the video have an other source — is set to null)
  • raw_video_thumbnail_url (string) — the URL to the source video thumbnail;

  • raw_video_title (string) — the title of the source video.

JSON example:

{
  "id": 4951721,
  "type": "Coub::Simple",
  "permalink": "2hzea",
  "title": "Dustin Hoffman's favorite band.",
  "visibility_type": "public",
  "original_visibility_type": "public",
  "channel_id": 53881,
  "created_at": "2014-07-16T12:49:31Z",
  "updated_at": "2015-03-09T10:42:48Z",
  "is_done": true,
  "views_count": 14151,
  "cotd": null,
  "cotd_at": null,
  "original_sound": false,
  "has_sound": false,
  "recoub_to": null,
  "file_versions": {
    "web": {
      "template": "http://ell.akamai.coub.com/get/bucket:12.21/p/coub/simple/cw_file/6d3cb163027/54fbb3cd4f7f9e3555f16/%{type}_%{version}_size_1405515001_%{version}.%{type}",
      "types": [
        "flv",
        "mp4"
      ],
      "versions": [
        "big",
        "med",
        "small"
      ]
    },
    "web_chunks": {
      "template": "http://ell.akamai.coub.com/get/bucket:12.21/p/coub/simple/cw_file/6d3cb163027/54fbb3cd4f7f9e3555f16/%{type}_%{version}_size_c%{chunk}_1405515001_chunk_%{chunk}_%{version}.flv",
      "types": [
        "flv",
        "mp4"
      ],
      "versions": [
        "big",
        "med",
        "small"
      ],
      "chunks": [
        1,
        2,
        3,
        4
      ]
    },
    "html5": {
      "template": "http://ell.akamai.coub.com/get/bucket:12.21/p/coub/simple/cw_ipad_video_base64/6d3cb163027/54fbb3cd4f7f9e3555f16/chunk_%{chunk_num}_1405515166_ipad_video_base64",
      "chunks": [
        0,
        1,
        2,
        3,
        4,
        5,
        6,
        7,
        8,
        9
      ]
    },
    "iphone": {
      "url": "http://ell.akamai.coub.com/get/bucket:12.21/p/coub/simple/cw_file/6d3cb163027/54fbb3cd4f7f9e3555f16/iphone_1405515001_iphone.mp4"
    },
    "mobile": {
      "audio_url": "http://ell.akamai.coub.com/get/bucket:12.21/p/coub/simple/cw_audio/6d3cb163027/54fbb3cd4f7f9e3555f16/low_1405515030_out.mp3",
      "base64_url": "http://ell.akamai.coub.com/get/bucket:12.21/p/coub/simple/cw_ipad_video_base64/6d3cb163027/54fbb3cd4f7f9e3555f16/1405515166_ipad_video_base64",
      "base64_files": [
        "http://ell.akamai.coub.com/get/bucket:12.21/p/coub/simple/cw_ipad_video_base64/6d3cb163027/54fbb3cd4f7f9e3555f16/chunk_0_1405515166_ipad_video_base64",
        "http://ell.akamai.coub.com/get/bucket:12.21/p/coub/simple/cw_ipad_video_base64/6d3cb163027/54fbb3cd4f7f9e3555f16/chunk_1_1405515166_ipad_video_base64",
        "http://ell.akamai.coub.com/get/bucket:12.21/p/coub/simple/cw_ipad_video_base64/6d3cb163027/54fbb3cd4f7f9e3555f16/chunk_2_1405515166_ipad_video_base64",
        "http://ell.akamai.coub.com/get/bucket:12.21/p/coub/simple/cw_ipad_video_base64/6d3cb163027/54fbb3cd4f7f9e3555f16/chunk_3_1405515166_ipad_video_base64",
        "http://ell.akamai.coub.com/get/bucket:12.21/p/coub/simple/cw_ipad_video_base64/6d3cb163027/54fbb3cd4f7f9e3555f16/chunk_4_1405515166_ipad_video_base64",
        "http://ell.akamai.coub.com/get/bucket:12.21/p/coub/simple/cw_ipad_video_base64/6d3cb163027/54fbb3cd4f7f9e3555f16/chunk_5_1405515166_ipad_video_base64",
        "http://ell.akamai.coub.com/get/bucket:12.21/p/coub/simple/cw_ipad_video_base64/6d3cb163027/54fbb3cd4f7f9e3555f16/chunk_6_1405515166_ipad_video_base64",
        "http://ell.akamai.coub.com/get/bucket:12.21/p/coub/simple/cw_ipad_video_base64/6d3cb163027/54fbb3cd4f7f9e3555f16/chunk_7_1405515166_ipad_video_base64",
        "http://ell.akamai.coub.com/get/bucket:12.21/p/coub/simple/cw_ipad_video_base64/6d3cb163027/54fbb3cd4f7f9e3555f16/chunk_8_1405515166_ipad_video_base64",
        "http://ell.akamai.coub.com/get/bucket:12.21/p/coub/simple/cw_ipad_video_base64/6d3cb163027/54fbb3cd4f7f9e3555f16/chunk_9_1405515166_ipad_video_base64"
      ],
      "frames_count": 145
    }
  },
  "audio_versions": {
    "template": "http://ell.akamai.coub.com/get/bucket:12.21/p/coub/simple/cw_audio/6d3cb163027/54fbb3cd4f7f9e3555f16/%{version}_1405515030_out.mp3",
    "versions": [
      "high",
      "mid",
      "low"
    ],
    "chunks": {
      "template": "http://ell.akamai.coub.com/get/bucket:12.21/p/coub/simple/cw_audio/6d3cb163027/54fbb3cd4f7f9e3555f16/mp3_%{version}_c%{chunk}_1405515030_out.mp3",
      "versions": [
        "high",
        "mid",
        "low"
      ],
      "chunks": [
        1,
        2,
        3,
        4
      ]
    }
  },
  "flv_audio_versions": {
    "file": {
      "template": "http://ell.akamai.coub.com/get/bucket:12.21/p/coub/simple/cw_audio/6d3cb163027/54fbb3cd4f7f9e3555f16/flv_%{version}_1405515030_out.flv",
      "versions": [
        "high",
        "mid",
        "low"
      ]
    },
    "chunks": {
      "template": "http://ell.akamai.coub.com/get/bucket:12.21/p/coub/simple/cw_audio/6d3cb163027/54fbb3cd4f7f9e3555f16/flv_%{version}_c%{chunk}_1405515030_out.flv",
      "versions": [
        "high",
        "mid",
        "low"
      ],
      "chunks": [
        1,
        2,
        3,
        4
      ]
    }
  },
  "image_versions": {
    "template": "http://ell.akamai.coub.com/get/bucket:32.11/p/coub/simple/cw_image/6d3cb163027/54fbb3cd4f7f9e3555f16/%{version}_1405515031_00030.jpg",
    "versions": [
      "micro",
      "tiny",
      "age_restricted",
      "ios_large",
      "ios_mosaic",
      "big",
      "med",
      "small",
      "pinterest"
    ]
  },
  "first_frame_versions": {
    "template": "http://ell.akamai.coub.com/get/bucket:22.31/p/coub/simple/cw_timeline_pic/6d3cb163027/54fbb3cd4f7f9e3555f16/%{version}_1405515030_image.jpg",
    "versions": [
      "big",
      "med",
      "small",
      "ios_large"
    ]
  },
  "dimensions": {
    "big": [
      "640",
      "328"
    ],
    "med": [
      "640",
      "328"
    ],
    "small": [
      "400",
      "204"
    ]
  },
  "age_restricted": false,
  "allow_reuse": false,
  "banned": false,
  "external_download": {
    "type": "Youtube",
    "url": "http://www.youtube.com/watch?v=n6Dkmw_Pajw"
  },
  "channel": {
    "id": 53881,
    "permalink": "d98e1ef7fa16f94c41ff4e6b43f8faf3",
    "title": "Rusty Shackleford",
    "i_follow_him": false,
    "followers_count": 2486,
    "following_count": 2215,
    "avatar_versions": {
      "template": "http://ell.akamai.coub.com/get/b24/p/channel/cw_avatar/8b4666d5570/231f84f4e0d541fd27722/%{version}_1421731390_fear.jpg",
      "versions": [
        "medium",
        "medium_2x",
        "profile_pic",
        "profile_pic_new",
        "profile_pic_new_2x",
        "tiny",
        "tiny_2x",
        "small",
        "small_2x",
        "ios_large",
        "ios_small"
      ]
    }
  },
  "percent_done": 100,
  "tags": [
    {
      "id": 445587,
      "title": "alfa romeo spider the graduate",
      "value": "alfa%20romeo%20spider%20the%20graduate"
    },
    {
      "id": 445589,
      "title": "1600 duetto",
      "value": "1600%20duetto"
    },
    {
      "id": 89773,
      "title": "dustin hoffman",
      "value": "dustin%20hoffman"
    },
    {
      "id": 365926,
      "title": "simon & garfunkel",
      "value": "simon%20&%20garfunkel"
    },
    {
      "id": 102141,
      "title": "mrs. robinson",
      "value": "mrs.%20robinson"
    }
  ],
  "recoubs_count": 132,
  "likes_count": 301,
  "raw_video_id": 110290,
  "media_blocks": {
    "external_video": {
      "id": 811384,
      "title": "Alfa Romeo Spider 1600 Duetto - The graduate",
      "url": "http://www.youtube.com/watch?v=n6Dkmw_Pajw",
      "image": "http://ell.akamai.coub.com/get/bucket:22.31/p/media_block/cw_image/98c2dcc24a9/590e5057e0063ba399da3/video_1406736021__1395321764_1jj19v4_att-url-download.jpg",
      "image_retina": "http://ell.akamai.coub.com/get/bucket:22.31/p/media_block/cw_image/98c2dcc24a9/590e5057e0063ba399da3/video_retina_1406736021__1395321764_1jj19v4_att-url-download.jpg",
      "meta": {
        "service": "Youtube"
      },
      "duration": 44.96
    },
    "audio_track": {
      "id": 811416,
      "title": "Graceless",
      "url": "https://itunes.apple.com/album/graceless/id626872826?i=626873231&uo=4&at=10l5bB",
      "image": "http://ell.akamai.coub.com/get/bucket:32.11/p/media_block/cw_image/5415613ed3f/4fee7cc1c593bc718537f/audio_1406736027_1405514408_135rvkv_att-url-download.jpg",
      "image_retina": "http://ell.akamai.coub.com/get/bucket:32.11/p/media_block/cw_image/5415613ed3f/4fee7cc1c593bc718537f/audio_retina_1406736027_1405514408_135rvkv_att-url-download.jpg",
      "itunes_url": "https://itunes.apple.com/album/graceless/id626872826?i=626873231&uo=4&at=10l5bB",
      "amazon_url": null,
      "google_play_url": null,
      "bandcamp_url": null,
      "soundcloud_url": null,
      "track_name": null,
      "track_artist": null,
      "track_album": null,
      "meta": {
        "year": null,
        "album": null,
        "title": "Graceless",
        "artist": "The National"
      },
      "duration": null
    }
  },
  "raw_video_thumbnail_url": "http://ell.akamai.coub.com/get/bucket:12.21/p/raw_video/cw_image/92a87a1aa5e/71de3252cf5db1c6b3d08/coub_media_1408547315_1385049584_att-url-download20131121-17667-hwin8w.jpg",
  "raw_video_title": "Alfa Romeo Spider 1600 Duetto - The graduate",
  "video_block_banned": false,
  "duration": 9.56
}

Coub small JSON

Coubs small JSON contains less data, providing simplified info about a coub. It has following fields:

  • id (integer) — the coub identifier;
  • type (string) — the type of the coub; can be one of the following:
    • Coub::Simple — the coub that was created from the external source and posted;
    • Coub::Temp — the coub that was created via an iOS app and hasn't been posted yet;
    • Coub::Recoub — the coub that was recoubed from other coub;
  • permalink (string) — the permalink of the coub;
  • title (string) — the title of the coub;

  • channel (JSON) — the channel small JSON that describes the channel, the video is upload to:

    • id (integer) — the identifier of the channel;
    • permalink (string) — the permalink of the channel;
    • description (string) — the description of the channel;
    • title (string) — the title of the channel;
    • i_follow_him (boolean) — if this channel is followed by you;
    • followers_count (integer) — the number of channel's followers;
    • following_count (integer) — the number of channels that the channel follows;
    • avatar_versions (JSON) — the JSON object that contains data about channel's thumbnail images:
      • template (string) — the template of the URLs to the files specified in this JSON;
      • versions (array) — the array of strings that refer to available image versions:
        • medium — 48x48 pixels;
        • medium_2x — 96x96 pixels;
        • profile_pic — 160x160 pixels;
        • profile_pic_2x — 320x320 pixels;
        • profile_pic_new — 110x110 pixels;
        • profile_pic_new_2x — 220x220 pixels;
        • tiny — 32x32 pixels;
        • tiny_2x — 64x64 pixels;
        • small — 38x38 pixels;
        • small_2x — 76x76 pixels;
        • ios_large — 140x140 pixels;
        • ios_small — 70x70 pixels;
  • image_versions (JSON) — the JSON object that describes available thumbnail images of the video;

    • template (string) — the template of the URLs to the files specified in this JSON;
    • version (array) — the array of strings that describe types of preview images; available types are:
      • micro — 70x46 pixels;
      • tiny — 112x85 pixels;
      • age_restrcited — 640x640 pixels; this image have the restriction sign;
      • ios_large — 600x525 pixels; intended to be dispayed on iOS devices;
      • big — 1280x1280 pixels;
      • med — 640x500 pixels;
      • small — 400x400 pixels;
      • pinterest — 600x600 pixels; intended to be dispayed in pinterest web site.

JSON example:

{
  "id": 22976,
  "type": "Coub::Simple",
  "permalink": "7oey74p",
  "title": "alternate tooth removal method",
  "picture": "http:\/\/cdn1.akamai.coub.com\/coub\/simple\/cw_image\/28ef3ed2aa6\/fa0f5047a845f027cc636\/med_1381567404_00030.jpg",
  "explore_suggest": "http:\/\/cdn1.akamai.coub.com\/coub\/simple\/cw_image\/28ef3ed2aa6\/fa0f5047a845f027cc636\/explore_1381567404_00030.jpg",
  "channel": {
    "id": 1164719,
    "permalink": "misha.tabunov",
    "title": "Mikhail Tabunov",
    "i_follow_him": false,
    "followers_count": 341,
    "following_count": 22,
    "avatar_versions": {
      "template": "http:\/\/ell.akamai.coub.com\/get\/bucket:22.31\/p\/channel\/cw_avatar\/3423e13cb0c\/cfa069147ddde03f3c6c3\/%{version}_1405601244_1p36erq_att-url-download.jpg",
      "versions": [
        "medium",
        "medium_2x",
        "profile_pic",
        "profile_pic_2x",
        "profile_pic_new",
        "profile_pic_new_2x",
        "tiny",
        "tiny_2x",
        "small",
        "small_2x",
        "ios_large",
        "ios_small"
      ]
    }
  },
  "image_versions": {
    "template": "http:\/\/cdn1.akamai.coub.com\/coub\/simple\/cw_image\/28ef3ed2aa6\/fa0f5047a845f027cc636\/%{version}_1381567404_00030.jpg",
    "versions": [
      "micro",
      "micro_2x"
    ]
  }
}

Channel big JSON

Big channel JSON contains all available data about a channel:

  • i_follow_him (boolean) — whether the channel is followed by you;
  • he_follows_me (boolean) — whether the channel follows you;
  • simple_coubs_count (integer) — the number of original coubs (not recoubs) of the channel;
  • id (integer) — the identifier of the channel;
  • permalink (string) — the permalink of the channel;
  • title (string) — the title of the channel;
  • description (string) — the channel's description text;
  • contacts (JSON) — the JSON object contains string fields with user homepage URL and social networks profile names (if user have no profile the string will be empty):
    • homepage;
    • facebook;
    • livejournal;
    • flickr;
    • twitter;
    • skype;
    • myspace;
    • youtube;
    • lastfm:
    • vimeo;
    • tumblr;
  • created_at (UNIX-time) — the time when the channel was created;
  • updated_at (UNIX-time) — the time of the channel's last update;

  • avatar_versions (JSON) — the JSON object that contains data about channel's thumbnail images:

    • template (string) — the template of the URLs to the files specified in this JSON;
    • versions (array) — the array of strings that refer to available image versions:
      • medium — 48x48 pixels;
      • medium_2x — 96x96 pixels;
      • profile_pic — 160x160 pixels;
      • profile_pic_2x — 320x320 pixels;
      • profile_pic_new — 110x110 pixels;
      • profile_pic_new_2x — 220x220 pixels;
      • tiny — 32x32 pixels;
      • tiny_2x — 64x64 pixels;
      • small — 38x38 pixels;
      • small_2x — 76x76 pixels;
      • ios_large — 140x140 pixels;
      • ios_small — 70x70 pixels;
  • followers_count (integer) — the number of channel's followers;

  • following_count (integer) — the number of channels that the channel foolows;
  • recoubs_count (integer) — the number of recoubs the channel have;
  • likes_count (integer) — the number of likes the channel have received;

  • authentications (JSON) — the JSON contains channel's authentication data:

    • id (integer) — the identifier of the user — the channel's owner;
    • channel_id (integer) — the identifier of the channel;
    • provider (string) — the authentication provider of the channel's owner account;
    • username_from_provider (string) — the username of the channel's owner in the authentication provider service.

JSON example:

{
  "i_follow_him": false,
  "follows_by_users_channels": [],
  "he_follows_me": false,
  "id": 1221019,
  "user_id": 1900479,
  "crown": null,
  "permalink": "d9d6536685ce1371350990517c87c6a8",
  "title": "Husein Abbasov",
  "description": null,
  "contacts": {},
  "created_at": "2014-07-24T07:43:14Z",
  "updated_at": "2015-03-11T13:45:01Z",
  "avatar_versions": {
    "template": "http://ell.akamai.coub.com/get/bucket:12.21/p/channel/cw_avatar/a6b57593e53/f731a331b290a5d0c2b55/%{version}_1406187797_540952659342151.jpg",
    "versions": [
      "medium",
      "medium_2x",
      "profile_pic",
      "profile_pic_new",
      "profile_pic_new_2x",
      "tiny",
      "tiny_2x",
      "small",
      "small_2x",
      "ios_large",
      "ios_small"
    ]
  },
  "followers_count": 33,
  "following_count": 32,
  "recoubs_count": 2039,
  "likes_count": 2125,
  "background_coub": {
    "id": 22976,
    "type": "Coub::Simple",
    "permalink": "7oey74p",
    "title": "alternate tooth removal method",
    "picture": "http:\/\/cdn1.akamai.coub.com\/coub\/simple\/cw_image\/28ef3ed2aa6\/fa0f5047a845f027cc636\/med_1381567404_00030.jpg",
    "explore_suggest": "http:\/\/cdn1.akamai.coub.com\/coub\/simple\/cw_image\/28ef3ed2aa6\/fa0f5047a845f027cc636\/explore_1381567404_00030.jpg",
    "channel": {
      "id": 1164719,
      "permalink": "misha.tabunov",
      "title": "Mikhail Tabunov",
      "i_follow_him": false,
      "followers_count": 341,
      "following_count": 22,
      "avatar_versions": {
        "template": "http:\/\/ell.akamai.coub.com\/get\/bucket:22.31\/p\/channel\/cw_avatar\/3423e13cb0c\/cfa069147ddde03f3c6c3\/%{version}_1405601244_1p36erq_att-url-download.jpg",
        "versions": [
          "medium",
          "medium_2x",
          "profile_pic",
          "profile_pic_2x",
          "profile_pic_new",
          "profile_pic_new_2x",
          "tiny",
          "tiny_2x",
          "small",
          "small_2x",
          "ios_large",
          "ios_small"
        ]
      }
    },
    "image_versions": {
      "template": "http:\/\/cdn1.akamai.coub.com\/coub\/simple\/cw_image\/28ef3ed2aa6\/fa0f5047a845f027cc636\/%{version}_1381567404_00030.jpg",
      "versions": [
        "micro",
        "micro_2x"
      ]
    }
  },
  "background_image": "http:\/\/ell.akamai.coub.com\/get\/bucket:12.21\/p\/background\/cw_image\/27a4bbeebd3\/b42505281270317187ab6\/1416322803_Screen_Shot_2014-06-21_at_7.26.39_PM.png"
  "meta": {
    "description": nil,
    "homepage": "",
    "facebook": "100004200893",
    "twitter": "husabasov",
    "tumblr": "",
    "youtube": "",
    "vimeo": ""
  },
  "views_count": 0,
  "hide_owner": false
}

Channel small JSON

Channel small JSON contains less data providing simplified info about a channel. It has following fields:

  • id (integer) — the identifier of the channel;
  • permalink (string) — the permalink of the channel;
  • description (string) — the description of the channel;
  • title (string) — the title of the channel;
  • i_follow_him (boolean) — whether this channel is followed by you;
  • followers_count (integer) — the number of channel's followers;
  • following_count (integer) — the number of channels that the channel follows;

  • avatar_versions (JSON) — the JSON object that contains data about channel's thumbnail images:

    • template (string) — the template of the URLs to the files specified in this JSON;
    • versions (array) — the array of strings that refer to available image versions:
      • medium — 48x48 pixels;
      • medium_2x — 96x96 pixels;
      • profile_pic — 160x160 pixels;
      • profile_pic_2x — 320x320 pixels;
      • profile_pic_new — 110x110 pixels;
      • profile_pic_new_2x — 220x220 pixels;
      • tiny — 32x32 pixels;
      • tiny_2x — 64x64 pixels;
      • small — 38x38 pixels;
      • small_2x — 76x76 pixels;
      • ios_large — 140x140 pixels;
      • ios_small — 70x70 pixels.

JSON example:

{
  "id": 1221019,
  "permalink": "d9d6536685ce1371350990517c87c6a8",
  "title": "Husein Abbasov",
  "i_follow_him": false,
  "followers_count": 1,
  "following_count": 23,
  "avatar_versions": {
    "template": "http:\/\/ell.akamai.coub.com\/get\/bucket:12.21\/p\/channel\/cw_avatar\/a6b57593e53\/f731a331b290a5d0c2b55\/%{version}_1406187797_540952659342151.jpg",
    "versions": [
      "medium",
      "medium_2x",
      "profile_pic",
      "profile_pic_2x",
      "profile_pic_new",
      "profile_pic_new_2x",
      "tiny",
      "tiny_2x",
      "small",
      "small_2x",
      "ios_large",
      "ios_small"
    ]
  }
}