DEVELOPERS

Loops API Docs

Full API Reference
RESOURCE

Video

Represents a video post. Returned by video and feed endpoints. Serialized by VideoResource.

Fields

FieldTypeDescription
idstringUnique identifier for the video.
accountobjectThe account that posted the video. A compact subset of the Account resource (see below).
captionnullablestringCaption text. Null when the video has no caption.
urlstringCanonical URL of the video.
shortcodestringShort identifier used in the video URL.
is_ownerbooleanWhether the authenticated user posted this video.
is_sensitivebooleanWhether the video is marked as sensitive.
is_localbooleanWhether the video is hosted on this instance.
mediaobjectVideo media and playback details (see below).
pinnedbooleanWhether the video is pinned to the profile.
likesintegerNumber of likes.
sharesintegerNumber of shares.
commentsintegerNumber of comments.
bookmarksintegerNumber of bookmarks.
has_likedbooleanWhether the authenticated user has liked this video.
has_bookmarkedbooleanWhether the authenticated user has bookmarked this video.
is_editedbooleanWhether the video has been edited since publishing.
langnullablestringBCP-47 language code for the caption, or null.
tagsarrayHashtags on the video. Empty array when none.
mentionsarrayAccounts mentioned in the caption. Empty array when none.
permissionsobjectWhat the authenticated user may do with this video (see below).
audioobjectAudio and sound metadata (see below).
metaobjectContent metadata flags (see below).
created_atstringISO 8601 timestamp of publication.

Example

Video
{
  "id": "107099161459215690",
  "account": {
    "id": "1",
    "name": "dansup",
    "username": "dansup",
    "avatar": "https://loopsusercontent.com/avatars/1/y6i8g7330.jpg"
  },
  "caption": "Wow!",
  "url": "https://loops.video/v/5YvxWOxcRa",
  "shortcode": "5YvxWOxcRa",
  "is_owner": true,
  "is_sensitive": false,
  "is_local": true,
  "media": {
    "thumbnail": "https://loopsusercontent.com/.../SZDoYkIThHJ.jpg",
    "src_url": "https://loopsusercontent.com/videos/1...J.mp4",
    "hls_url": null,
    "alt_text": null,
    "duration": 54,
    "width": 720,
    "height": 1278
  },
  "pinned": true,
  "likes": 327,
  "shares": 23,
  "comments": 50,
  "bookmarks": 6,
  "has_liked": true,
  "has_bookmarked": true,
  "is_edited": true,
  "lang": null,
  "tags": [],
  "mentions": [],
  "permissions": {
    "can_comment": true,
    "can_download": false,
    "can_duet": false,
    "can_stitch": false,
    "can_embed": true
  },
  "audio": {
    "has_audio": true,
    "id": "at:107099161459215690",
    "count": 0,
    "key": "80cf38c3-cd9c-4e75-8e24-a955c79c883b",
    "sound_id": "248936263126653225"
  },
  "meta": {
    "contains_ai": false,
    "contains_ad": false
  },
  "created_at": "2025-01-18T00:15:42+00:00"
}
Some fields are relative to the viewer.is_owner, has_liked, has_bookmarked, and the permissions object reflect the authenticated request, so they change depending on who is asking.

account

A compact form of the Account resource.

FieldTypeDescription
idstringUnique identifier for the account.
namestringDisplay name of the account.
usernamestringThe account handle.
avatarstringURL of the account avatar.

media

FieldTypeDescription
thumbnailstringPoster image URL.
src_urlstringDirect MP4 source URL.
hls_urlnullablestringHLS playlist URL for adaptive streaming. Null when not available.
alt_textnullablestringAccessibility description of the video. Null when not set.
durationintegerDuration in seconds.
widthintegerVideo width in pixels.
heightintegerVideo height in pixels.

permissions

FieldTypeDescription
can_commentbooleanWhether the user may comment on the video.
can_downloadbooleanWhether the user may download the video.
can_duetbooleanWhether the user may create a duet.
can_stitchbooleanWhether the user may stitch the video.
can_embedbooleanWhether the video may be embedded.

audio

FieldTypeDescription
has_audiobooleanWhether the video has an audio track.
idstringAudio reference. Original audio uses the at:<video-id> form.
countintegerNumber of videos using this sound.
keystringInternal audio key (UUID).
sound_idstringUnique identifier of the sound.

meta

FieldTypeDescription
contains_aibooleanWhether the video is flagged as containing AI-generated content.
contains_adbooleanWhether the video contains a paid promotion or ad.