YouTube's search only works on titles, descriptions, and tags. You cannot search for specific words or phrases spoken within videos. Researchers, content curators, and developers need the ability to search inside video content to find exactly what they are looking for.
YouTubeTranscripts.co extracts searchable text from any video. Index transcripts in Elasticsearch, Typesense, or a vector database for full-text and semantic search. Build applications that let users search for specific topics, quotes, or discussions within video libraries.
import httpx
API_KEY = "YOUR_API_KEY"
# Fetch and index a transcript
resp = httpx.get(
"https://api.youtubetranscripts.co/v1/transcript",
params={"url": "https://youtube.com/watch?v=VIDEO_ID"},
headers={"x-api-key": API_KEY},
)
data = resp.json()
# Simple keyword search across transcript segments
def search_transcript(transcript: list, query: str) -> list:
results = []
query_lower = query.lower()
for segment in transcript:
if query_lower in segment["text"].lower():
results.append({
"text": segment["text"],
"timestamp": segment["start"],
"url": f"https://youtube.com/watch?v=VIDEO_ID&t={int(segment['start'])}",
})
return results
matches = search_transcript(data["transcript"], "machine learning")
for match in matches:
print(f"[{match['timestamp']:.0f}s] {match['text']}")
print(f" Link: {match['url']}")Search for specific words spoken in any video
Link results directly to video timestamps
Index thousands of videos for full-text search
Combine with vector embeddings for semantic search
Build internal knowledge bases from video content
Power search features for video platforms and tools
Sign up in 30 seconds and get 150 free API requests. No credit card required. Start building your video search engine solution today.