api.video
SearchCtrl K

Features

Developers

Video tagging best practices

January 1, 2020 - Doug Sillars in Video update

Adding tags is a great way to simplify searches in your video collection - you can simply search for a specific tag to show all of the videos.

Adding tags is easy, but there are a few tricks you should be aware of. For example this video has the tag "captions":

   "videoId": "vi5UNyaStzuuj0xTAGp7qtjf",
    "title": "Elephant's Dream",
    "description": "",
    "public": true,
    "panoramic": false,
    "mp4Support": true,
    "publishedAt": "2020-03-05T19:26:21+00:00",
    "updatedAt": "2020-03-11T08:23:04+00:00",
    "tags": [
        "captions"
    ],

if I want to add a tag "dialogue", I cannot simply Update the Video witha new caption. The PATCH command will rewrite the "tag" entry.

You can see more about available tagging commands in the API reference documentation:

Best practice

Show the Video to receive a JSON similar to the snippet above. Collect any existing tags, append the new tag, and then Update the video:

curl -X PATCH https://ws.api.video/videos/vi5UNyaStzuuj0xTAGp7qtjf  -H 'Authorization: Bearer {access_token}}'   -d '{   "tags":["captions", "dialogue"] }'

and you'll have the correct tags on the video:

  "title": "Elephant's Dream",
    "description": "",
    "public": true,
    "panoramic": false,
    "mp4Support": true,
    "publishedAt": "2020-03-05T19:26:21+00:00",
    "updatedAt": "2020-03-12T21:06:21+00:00",
    "tags": [
        "captions",
        "dialogue"
    ],

Examples of tags in action

upload.a.video/toDiscord is an uploader that tags each video with 'Discord' We then have a wayto see all te videos in our collection that have been posted to Discord channels.

moderate.a.video checks each video for inappropriate content. On upload, the video is tagged 'needsModertion'. Once the moderation has been performaned, and results come back, the 'needsModeration' tag is removed, and 'SFW' or 'NSFW' (and others) are added. These tags are then used to generate the SFW page.

Conclusion

Are you ready to start your video journey, and using tags to help organise your videos? Sign up now at api.video to begin testing for free!

Doug Sillars

Head of Developer Relations

Create your free account

Start building with video now