---
agent:
  instructions: "Use this search API to find relevant content across this site with keywords or natural-language queries, instead of crawling individual pages. Results are returned in Markdown."
  endpoint: "https://mixpeek.com/.well-known/search?q={query}"
  method: GET
  documentation: "https://mixpeek.com/llms.txt"
---

1.  [](/)
2.  [Code examples](/recipes)
3.  Automated Video Tagging

Back to code examples

# Automated Video Tagging

Automatically generate descriptive tags for video content using scene analysis, object detection, and taxonomy classification. Each video receives structured labels for scenes, objects, actions, and custom business categories without manual annotation.

video

image

text

Multi-Tier

[Run in Builder](/build?recipe=automated-video-tagging)

Python

cURL

import requests

from mixpeek import Mixpeek

client \= Mixpeek(api\_key\="YOUR\_API\_KEY", namespace\="video-tags")

API \= "https://api.mixpeek.com/v1"

HEADERS \= {"Authorization": "Bearer YOUR\_API\_KEY", "X-Namespace": "video-tags"}

\# 1. Category exemplars: short clips labeled sports, cooking, technology, outdoors

example\_bucket \= client.buckets.create(

    bucket\_name\="tag-examples",

    bucket\_schema\={"properties": {"clip": {"type": "video"}}},

)

examples \= client.collections.create(

    collection\_name\="tag-examples",

    source\={"type": "bucket", "bucket\_ids": \[example\_bucket\["bucket\_id"\]\]},

    feature\_extractor\={

        "feature\_extractor\_name": "multimodal\_extractor",

        "version": "v1",

    },

)

client.buckets.upload(

    example\_bucket\["bucket\_id"\],

    blobs\=\[{"property": "clip", "type": "video", "data": "s3://your-bucket/tags/cooking-01.mp4"}\],

)

client.collections.trigger(examples\["collection\_id"\])

\# 2. The retriever the taxonomy uses to find the closest exemplar

matcher \= client.retrievers.create(

    retriever\_name\="tag-matcher",

    collection\_identifiers\=\["tag-examples"\],

    input\_schema\={"query": {"type": "text", "required": True}},

    stages\=\[

        {

            "stage\_name": "search",

            "stage\_id": "feature\_search",

            "parameters": {

                "searches": \[

                    {

                        "feature\_uri": "mixpeek://multimodal\_extractor@v1/vertex\_multimodal\_embedding",

                        "query": {"input\_mode": "text", "value": "{{INPUT.query}}"},

                        "top\_k": 3,

                    },

                \],

                "final\_top\_k": 3,

            },

        },

    \],

)

\# A flat taxonomy matches each document, through a retriever, against a

\# collection of labeled examples. The SDK has no taxonomies resource, so this is REST.

taxonomy \= requests.post(API + "/taxonomies", headers\=HEADERS, json\={

    "taxonomy\_name": "video\_tags",

    "config": {

        "taxonomy\_type": "flat",

        "retriever\_id": matcher\["retriever\_id"\],

        "input\_mappings": \[{"input\_key": "query", "source\_type": "payload", "path": "description"}\],

        "source\_collection": {"collection\_id": examples\["collection\_id"\]},

    },

}).json()

\# 3. The video collection materializes the tags as scenes are written

bucket \= client.buckets.create(

    bucket\_name\="videos",

    bucket\_schema\={"properties": {"video": {"type": "video"}}},

)

videos \= client.collections.create(

    collection\_name\="videos",

    source\={"type": "bucket", "bucket\_ids": \[bucket\["bucket\_id"\]\]},

    feature\_extractor\={

        "feature\_extractor\_name": "multimodal\_extractor",

        "version": "v1",

        "parameters": {

            "split\_method": "scene",

            "run\_video\_description": True,

        },

    },

    taxonomy\_applications\=\[{"taxonomy\_id": taxonomy\["taxonomy\_id"\], "execution\_mode": "materialize"}\],

)

client.buckets.upload(

    bucket\["bucket\_id"\],

    blobs\=\[{"property": "video", "type": "video", "data": "s3://your-bucket/videos/weekend-hike.mp4"}\],

)

client.collections.trigger(videos\["collection\_id"\])

\# Videos indexed before the taxonomy was attached are labeled with apply-taxonomy

requests.post(API + "/collections/videos/apply-taxonomy", headers\=HEADERS, json\={"taxonomy\_id": taxonomy\["taxonomy\_id"\]})

### Feature Extractors

Multimodal Extractor

Unified embeddings for video, audio, image, and text: scene/silence chunking, Whisper transcription, thumbnails, and Gemini vision.

### Retriever Stages

feature search

Search and filter documents by vector similarity using feature embeddings

filter

taxonomy enrich

Classify documents against taxonomy nodes via vector similarity

apply

## Frequently asked questions

### How many categories can I define?

There is no hard limit on taxonomy categories. Practical deployments commonly use 50-500 categories across multiple hierarchy levels.

### Do I need training data for each category?

You need a small set of exemplar images or videos per category (5-20 examples is typically sufficient). No model training or fine-tuning is required.

### Can tags be applied retroactively to existing videos?

Yes. Apply a taxonomy to an existing collection and run a batch job to tag all previously ingested content.

## Use Cases Using This Recipe

Advanced

7 min

### Sports Highlights

Auto-generate highlight reels from full-length sports footage

24x faster

Highlight generation time

[

sports

](/solutions/sports)[

entertainment

](/solutions/entertainment)

Who It's For

Sports broadcasters, media companies, and content teams processing 100+ hours of live footage weekly

[View Details](/use-cases/sports-highlights)

Intermediate

8 min

### Media Archive Intelligence

Transform decades of media archives into searchable, monetizable assets

12x more content findable

Archive discoverability

[

entertainment

](/solutions/entertainment)

Who It's For

Broadcasters, news organizations, film studios, music labels, and cultural institutions managing archives of 10,000+ hours of video, millions of photographs, or extensive audio collections

[View Details](/use-cases/media-archive-intelligence)

## Related code examples and resources

Pages on the same stages, extractors and patterns.

[

Extractor

### Multimodal Extractor

Unified embeddings for video, audio, image, and text: scene/silence chunking, Whisper transcription, thumbnails, and Gemini vision.

Learn more





](/extractors/multimodal)[

Recipe

### Hierarchical Classification

Assign content to multi-level category hierarchies using embedding-based classification. Define your taxonomy once, then classify new content automatically with confidence scores.

Learn more





](/recipes/hierarchical-classification)[

Recipe

### Brand Safety & Ad Verification Pipeline

Brand safety pipeline for ad networks. Scores video and image creatives against the GARM brand safety floor and suitability categories, which vendors still use after GARM wound down in 2024, before an ad is served.

Learn more





](/recipes/brand-safety-pipeline)[

Recipe

### Video Scene Search

Find specific scenes within videos using natural language descriptions. The pipeline detects scene boundaries, generates embeddings for each scene, and enables precise timestamp-level search across an entire video library. Query for visual content, actions, or spoken dialogue.

Learn more





](/recipes/video-scene-search)[

Recipe

### Semantic Multimodal Search

Unified semantic search across all content types. Query by natural language and retrieve relevant video clips, images, audio segments, and documents based on meaning-not keywords or manual tags.

Learn more





](/recipes/semantic-multimodal-search)[

Recipe

### Feature Extraction

Multi-tier feature extraction that decomposes content into searchable components: embeddings, transcripts, detected objects, OCR text, scene boundaries, and more. The foundation for all downstream retrieval and analysis.

Learn more





](/recipes/feature-extraction)