-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathyoutube-copilot-yml.yml
187 lines (183 loc) · 5.89 KB
/
youtube-copilot-yml.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
openapi: 3.0.1
info:
title: YouTube API for Microsoft Copilot
description: Searches YouTube and fetches video statistics using an API key.
version: 1.0.0
servers:
- url: https://www.googleapis.com/youtube/v3
description: YouTube Data API v3 server
paths:
/search:
get:
operationId: searchYouTubeExact
summary: Searches YouTube for videos matching an exact query.
description: |
Returns a list of YouTube videos that match the search query exactly.
The `q` parameter is required and will be enclosed in double quotes ("%22query%22")
to ensure an exact match search on YouTube.
parameters:
- name: part
in: query
required: true
description: The resource properties to include in the API response.
schema:
type: string
enum: [snippet]
default: snippet
- name: q
in: query
required: true
description: |
The exact search query. To ensure an exact match, the query should be enclosed in double quotes ("%22query%22").
schema:
type: string
example: "%22Khaata%22"
- name: type
in: query
required: false
description: Restrict results to a particular resource type, such as "video".
schema:
type: string
enum: [video]
default: video
- name: maxResults
in: query
required: false
description: The maximum number of results to return.
schema:
type: integer
default: 5
minimum: 1
maximum: 20
- name: key
in: query
required: true
description: Your YouTube Data API key.
schema:
type: string
security:
- apiKeyAuth: []
responses:
'200':
description: A list of YouTube video search results matching the exact query.
content:
application/json:
schema:
$ref: '#/components/schemas/YouTubeSearchResponse'
'400':
description: Bad request, possibly due to missing or incorrect parameters.
'403':
description: Access forbidden, likely due to API key issues.
'500':
description: Internal server error.
/videos:
get:
operationId: getYouTubeVideoStatistics
summary: Fetches video statistics for one or more video IDs.
description: |
Retrieves video statistics such as view count, like count, and comment count.
Requires the `id` parameter, which supports **comma-separated video IDs**.
parameters:
- name: part
in: query
required: true
description: The resource properties to include in the API response.
schema:
type: string
enum: [statistics]
default: statistics
- name: id
in: query
required: true
description: Comma-separated list of YouTube video IDs.
schema:
type: string
example: "6Xe2HWo21zc,_q2q6NJgYYo,CUzFP3RDA_k"
- name: key
in: query
required: true
description: Your YouTube Data API key.
schema:
type: string
security:
- apiKeyAuth: []
responses:
'200':
description: Video statistics for the given video IDs.
content:
application/json:
schema:
$ref: '#/components/schemas/YouTubeVideoStatisticsResponse'
'400':
description: Bad request, possibly due to missing or incorrect parameters.
'403':
description: Access forbidden, likely due to API key issues.
'500':
description: Internal server error.
components:
securitySchemes:
apiKeyAuth:
type: apiKey
in: query
name: key
description: API key required as a query parameter for Microsoft Copilot.
schemas:
YouTubeSearchResponse:
type: object
properties:
kind:
type: string
example: "youtube#searchListResponse"
items:
type: array
items:
type: object
properties:
id:
type: object
properties:
videoId:
type: string
example: "dQw4w9WgXcQ"
snippet:
type: object
properties:
title:
type: string
example: "Example Video Title"
description:
type: string
example: "This is an example description."
channelTitle:
type: string
example: "Example Channel"
publishedAt:
type: string
format: date-time
example: "2023-01-01T12:34:56Z"
YouTubeVideoStatisticsResponse:
type: object
properties:
kind:
type: string
example: "youtube#videoListResponse"
items:
type: array
items:
type: object
properties:
id:
type: string
example: "6Xe2HWo21zc"
statistics:
type: object
properties:
viewCount:
type: string
example: "1000000"
likeCount:
type: string
example: "50000"
commentCount:
type: string
example: "1200"