π REST API. @video-metadata#
The @video-metadata service fetches metadata for an external video URL.
It is used by the frontend VideoURLWidget to autopopulate content fields when an editor pastes a video URL.
Module: sc.videos.services.metadata.post
Permission: sc.videos.video.add (Add Video)
π€ Request#
POST /{context}/@video-metadata
Content-Type: application/json
Accept: application/json
Body#
{
"videoUrl": "https://www.youtube.com/watch?v=x7QX9tQxEBc"
}
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
|
Yes |
The external video URL to fetch metadata for. |
π₯ Response#
Success. 200 OK#
{
"service": "youtube",
"video_id": "x7QX9tQxEBc",
"title": "MΓ£o na Massa: ComeΓ§ando um projeto com Plone 6.1",
"text": "O Plone 6.1 jΓ‘ Γ© uma realidade...",
"duration": 3720,
"thumbnail_url": "https://i.ytimg.com/vi/x7QX9tQxEBc/maxresdefault.jpg",
"channel": "PloneGov-Br",
"subjects": ["plone", "python", "web"]
}
Field |
Type |
Description |
|---|---|---|
|
|
Provider identifier ( |
|
|
Provider-specific video ID. |
|
|
Video title. |
|
|
Video description. |
|
|
Duration in seconds. May be |
|
|
URL of the best available thumbnail. |
|
|
Channel or author name. |
|
|
Tags/keywords associated with the video. |
Error. 400 Bad Request#
Returned when the URL is not recognized by any registered provider.
{
"error": "Unsupported video URL"
}
Error. 502 Bad Gateway#
Returned when the provider's API is unreachable or returns an unexpected response.
{
"error": "Failed to fetch video metadata from youtube"
}
π Supported URL patterns#
The endpoint delegates to registered IVideoMetadataProvider utilities.
Each provider declares a url_pattern regex that the service uses to match incoming URLs.
YouTube#
Pattern |
Example |
|---|---|
|
|
|
|
|
|
|
|
|
|
Vimeo#
Pattern |
Example |
|---|---|
|
|
|
|
π YouTube API vs public oEmbed#
The service supports two modes for YouTube:
YouTube Data API v3: richer metadata (description, duration, tags). Requires a Google API key configured in the βοΈ Video Settings control panel.
Public oEmbed: no API key needed, but returns limited data (no duration, description, or tags).
The mode is controlled by the youtube_api_enabled setting in the Video Settings control panel.
See π Configure the YouTube Data API for setup instructions.
Vimeo always uses the public oEmbed endpoint. no API key required.
See also
π The video metadata pipeline. End-to-end flow from URL to content fields.
π The provider system. How providers are registered and resolved.
βοΈ Video Settings control panel. Video Settings control panel configuration.