Workflow

YouTube Notes to Obsidian via Search API

Extract YouTube video metadata into Obsidian notes automatically. Search for videos, pull metadata, and create interlinked notes in your vault.

Overview

Searches YouTube for videos on a topic, extracts metadata (title, channel, views, description), and creates formatted Markdown notes in an Obsidian vault with interlinks and tags.

Trigger

Manual trigger or daily cron for tracked topics

Schedule

Manual or daily for tracked topics

Workflow Steps

1

Define research topic

Specify the topic to research on YouTube and the Obsidian vault path for output notes.

2

Search YouTube via API

Query Scavio's YouTube search endpoint for the topic. Retrieve top 10-20 results with metadata.

3

Extract video metadata

For each result, extract title, channel name, view count, publish date, description snippet, and URL.

4

Generate Obsidian notes

Create a Markdown file per video with YAML frontmatter (tags, date, channel) and body content with the video details.

5

Create index note

Generate a topic index note that links to all individual video notes for the research session.

6

Add to vault

Write all generated Markdown files to the Obsidian vault directory.

Python Implementation

Python
import requests, os, json
from datetime import date

H = {"x-api-key": os.environ["SCAVIO_API_KEY"]}
VAULT = os.path.expanduser("~/Documents/Obsidian/Research")

def youtube_to_obsidian(topic, max_results=10):
    r = requests.post("https://api.scavio.dev/api/v1/search", headers=H,
        json={"platform": "youtube", "query": topic}, timeout=10).json()
    notes = []
    for video in r.get("organic", [])[:max_results]:
        title = video.get("title", "Untitled")
        slug = title.lower().replace(" ", "-")[:50]
        note = f"""---
title: "{title}"
channel: "{video.get('channel', 'Unknown')}"
date: {date.today()}
tags: [youtube, {topic.replace(' ', '-')}]
---

# {title}

- **Channel:** {video.get('channel', 'Unknown')}
- **Views:** {video.get('views', 'N/A')}
- **URL:** {video.get('link', '')}

## Summary

{video.get('snippet', 'No description available.')}
"""
        filepath = os.path.join(VAULT, f"{slug}.md")
        with open(filepath, "w") as f:
            f.write(note)
        notes.append(slug)
    print(f"Created {len(notes)} notes for topic: {topic}")

youtube_to_obsidian("search api tutorial")

JavaScript Implementation

JavaScript
import fs from "fs";
import path from "path";

const H = {"x-api-key": process.env.SCAVIO_API_KEY, "Content-Type": "application/json"};
const VAULT = path.join(process.env.HOME, "Documents/Obsidian/Research");

async function youtubeToObsidian(topic, maxResults = 10) {
  const r = await fetch("https://api.scavio.dev/api/v1/search", {
    method: "POST", headers: H,
    body: JSON.stringify({platform: "youtube", query: topic})
  }).then(r => r.json());
  for (const video of (r.organic || []).slice(0, maxResults)) {
    const slug = (video.title || "untitled").toLowerCase().replace(/ /g, "-").slice(0, 50);
    const note = "---\ntitle: " + video.title + "\nchannel: " + video.channel +
      "\ntags: [youtube]\n---\n\n# " + video.title +
      "\n\n" + (video.snippet || "");
    fs.writeFileSync(path.join(VAULT, slug + ".md"), note);
  }
}

Platforms Used

YouTube

Video search with transcripts and metadata

Frequently Asked Questions

Searches YouTube for videos on a topic, extracts metadata (title, channel, views, description), and creates formatted Markdown notes in an Obsidian vault with interlinks and tags.

This workflow uses a manual trigger or daily cron for tracked topics. Manual or daily for tracked topics.

This workflow uses the following Scavio platforms: youtube. Each platform is called via the same unified API endpoint.

Yes. Scavio's free tier includes 500 credits per month with no credit card required. That is enough to test and validate this workflow before scaling it.

YouTube Notes to Obsidian via Search API

Extract YouTube video metadata into Obsidian notes automatically. Search for videos, pull metadata, and create interlinked notes in your vault.