UNPKG

youtube-data-mcp

Version:

MCP server for YouTube data extraction - transcripts, comments, and search

253 lines 7.19 kB
import { z } from "zod"; export declare const VideoUrlSchema: z.ZodObject<{ url: z.ZodString; }, "strip", z.ZodTypeAny, { url: string; }, { url: string; }>; export declare const TranscriptInputSchema: { url: z.ZodString; lang: z.ZodDefault<z.ZodString>; }; export declare const VideoInfoInputSchema: { url: z.ZodString; }; export declare const CommentsInputSchema: { url: z.ZodOptional<z.ZodString>; limit: z.ZodDefault<z.ZodNumber>; sort: z.ZodDefault<z.ZodEnum<["relevance", "time"]>>; pageToken: z.ZodOptional<z.ZodString>; }; export declare const RepliesInputSchema: { pageToken: z.ZodString; }; export declare const SearchInputSchema: { query: z.ZodString; limit: z.ZodDefault<z.ZodNumber>; gl: z.ZodOptional<z.ZodString>; hl: z.ZodOptional<z.ZodString>; sp: z.ZodOptional<z.ZodString>; pageToken: z.ZodOptional<z.ZodString>; }; export declare const TranscriptOutputSchema: { videoInfo: z.ZodObject<{ id: z.ZodString; title: z.ZodOptional<z.ZodString>; channelName: z.ZodOptional<z.ZodString>; publishedAt: z.ZodOptional<z.ZodString>; viewCount: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { id: string; title?: string | undefined; channelName?: string | undefined; publishedAt?: string | undefined; viewCount?: string | undefined; }, { id: string; title?: string | undefined; channelName?: string | undefined; publishedAt?: string | undefined; viewCount?: string | undefined; }>; fullText: z.ZodString; language: z.ZodString; }; export declare const VideoInfoOutputSchema: { videoId: z.ZodString; title: z.ZodOptional<z.ZodString>; viewCount: z.ZodOptional<z.ZodString>; publishDate: z.ZodOptional<z.ZodString>; channelName: z.ZodOptional<z.ZodString>; commentCount: z.ZodOptional<z.ZodNumber>; commentsNextPageToken: z.ZodOptional<z.ZodString>; commentsSortingTokens: z.ZodOptional<z.ZodArray<z.ZodObject<{ title: z.ZodString; token: z.ZodString; }, "strip", z.ZodTypeAny, { title: string; token: string; }, { title: string; token: string; }>, "many">>; }; export declare const CommentSchema: z.ZodObject<{ commentId: z.ZodString; author: z.ZodString; text: z.ZodString; time: z.ZodString; likes: z.ZodNumber; replies: z.ZodOptional<z.ZodNumber>; repliesToken: z.ZodOptional<z.ZodNullable<z.ZodString>>; }, "strip", z.ZodTypeAny, { text: string; time: string; commentId: string; author: string; likes: number; replies?: number | undefined; repliesToken?: string | null | undefined; }, { text: string; time: string; commentId: string; author: string; likes: number; replies?: number | undefined; repliesToken?: string | null | undefined; }>; export declare const CommentsOutputSchema: { videoId: z.ZodString; videoTitle: z.ZodOptional<z.ZodString>; comments: z.ZodArray<z.ZodObject<{ commentId: z.ZodString; author: z.ZodString; text: z.ZodString; time: z.ZodString; likes: z.ZodNumber; replies: z.ZodOptional<z.ZodNumber>; repliesToken: z.ZodOptional<z.ZodNullable<z.ZodString>>; }, "strip", z.ZodTypeAny, { text: string; time: string; commentId: string; author: string; likes: number; replies?: number | undefined; repliesToken?: string | null | undefined; }, { text: string; time: string; commentId: string; author: string; likes: number; replies?: number | undefined; repliesToken?: string | null | undefined; }>, "many">; commentCount: z.ZodNumber; nextPageToken: z.ZodOptional<z.ZodString>; }; export declare const RepliesOutputSchema: { parentCommentId: z.ZodString; replies: z.ZodArray<z.ZodObject<{ commentId: z.ZodString; author: z.ZodString; text: z.ZodString; time: z.ZodString; likes: z.ZodNumber; }, "strip", z.ZodTypeAny, { text: string; time: string; commentId: string; author: string; likes: number; }, { text: string; time: string; commentId: string; author: string; likes: number; }>, "many">; replyCount: z.ZodNumber; nextPageToken: z.ZodOptional<z.ZodString>; }; export declare const SearchOutputSchema: { searchMetadata: z.ZodOptional<z.ZodAny>; searchParameters: z.ZodOptional<z.ZodAny>; videoResults: z.ZodArray<z.ZodAny, "many">; channelResults: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>; playlistResults: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>; pagination: z.ZodOptional<z.ZodObject<{ current: z.ZodOptional<z.ZodNumber>; next: z.ZodOptional<z.ZodString>; nextPageToken: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { current?: number | undefined; next?: string | undefined; nextPageToken?: string | undefined; }, { current?: number | undefined; next?: string | undefined; nextPageToken?: string | undefined; }>>; }; export interface VideoBasicInfo { title?: string; channelName?: string; publishedAt?: string; viewCount?: string; } export interface VideoInfoResponse { videoId: string; title?: string; viewCount?: string; publishDate?: string; channelName?: string; commentCount?: number; commentsNextPageToken?: string; commentsSortingTokens?: SortingToken[]; } export interface SortingToken { title: string; token: string; } export interface Comment { commentId: string; author: string; text: string; time: string; likes: number; replies?: number; repliesToken?: string | null; } export interface CommentsResponse { videoId: string; videoTitle?: string; comments: Comment[]; commentCount: number; nextPageToken?: string; } export interface Reply { commentId: string; author: string; text: string; time: string; likes: number; } export interface RepliesResponse { parentCommentId: string; replies: Reply[]; replyCount: number; nextPageToken?: string; } export interface TranscriptSegment { text: string; offset: number; duration: number; } export interface TranscriptResponse { videoInfo: { id: string; title?: string; channelName?: string; publishedAt?: string; viewCount?: string; }; fullText: string; language: string; transcript?: TranscriptSegment[]; } export interface SearchResponse { searchMetadata?: Record<string, unknown>; searchParameters?: Record<string, unknown>; videoResults: Record<string, unknown>[]; channelResults?: Record<string, unknown>[]; playlistResults?: Record<string, unknown>[]; pagination?: { current?: number; next?: string; nextPageToken?: string; }; } //# sourceMappingURL=index.d.ts.map