influship 0.2.0 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +62 -30
- package/LICENSE +1 -1
- package/README.md +88 -43
- package/client.d.mts +49 -29
- package/client.d.mts.map +1 -1
- package/client.d.ts +49 -29
- package/client.d.ts.map +1 -1
- package/client.js +89 -56
- package/client.js.map +1 -1
- package/client.mjs +89 -56
- package/client.mjs.map +1 -1
- package/core/api-promise.d.mts +2 -2
- package/core/api-promise.d.mts.map +1 -1
- package/core/api-promise.d.ts +2 -2
- package/core/api-promise.d.ts.map +1 -1
- package/core/api-promise.js.map +1 -1
- package/core/api-promise.mjs.map +1 -1
- package/core/error.d.mts +2 -2
- package/core/error.d.mts.map +1 -1
- package/core/error.d.ts +2 -2
- package/core/error.d.ts.map +1 -1
- package/core/error.js +4 -4
- package/core/error.js.map +1 -1
- package/core/error.mjs +2 -2
- package/core/error.mjs.map +1 -1
- package/core/pagination.d.mts +75 -0
- package/core/pagination.d.mts.map +1 -0
- package/core/pagination.d.ts +75 -0
- package/core/pagination.d.ts.map +1 -0
- package/core/pagination.js +139 -0
- package/core/pagination.js.map +1 -0
- package/core/pagination.mjs +132 -0
- package/core/pagination.mjs.map +1 -0
- package/core/resource.d.mts +3 -3
- package/core/resource.d.mts.map +1 -1
- package/core/resource.d.ts +3 -3
- package/core/resource.d.ts.map +1 -1
- package/core/resource.js.map +1 -1
- package/core/resource.mjs.map +1 -1
- package/index.d.mts +4 -3
- package/index.d.mts.map +1 -1
- package/index.d.ts +4 -3
- package/index.d.ts.map +1 -1
- package/index.js +6 -4
- package/index.js.map +1 -1
- package/index.mjs +4 -3
- package/index.mjs.map +1 -1
- package/internal/parse.d.mts +2 -2
- package/internal/parse.d.mts.map +1 -1
- package/internal/parse.d.ts +2 -2
- package/internal/parse.d.ts.map +1 -1
- package/internal/parse.js +5 -0
- package/internal/parse.js.map +1 -1
- package/internal/parse.mjs +5 -0
- package/internal/parse.mjs.map +1 -1
- package/internal/shims.js +1 -1
- package/internal/shims.js.map +1 -1
- package/internal/shims.mjs +1 -1
- package/internal/shims.mjs.map +1 -1
- package/internal/tslib.js +17 -17
- package/internal/uploads.d.mts +4 -4
- package/internal/uploads.d.mts.map +1 -1
- package/internal/uploads.d.ts +4 -4
- package/internal/uploads.d.ts.map +1 -1
- package/internal/uploads.js.map +1 -1
- package/internal/uploads.mjs.map +1 -1
- package/internal/utils/base64.js +2 -2
- package/internal/utils/base64.js.map +1 -1
- package/internal/utils/base64.mjs +3 -3
- package/internal/utils/base64.mjs.map +1 -1
- package/internal/utils/log.d.mts +3 -3
- package/internal/utils/log.d.mts.map +1 -1
- package/internal/utils/log.d.ts +3 -3
- package/internal/utils/log.d.ts.map +1 -1
- package/internal/utils/log.js.map +1 -1
- package/internal/utils/log.mjs.map +1 -1
- package/internal/utils/path.js +1 -1
- package/internal/utils/path.js.map +1 -1
- package/internal/utils/path.mjs +2 -2
- package/internal/utils/path.mjs.map +1 -1
- package/internal/utils/query.d.mts +2 -0
- package/internal/utils/query.d.mts.map +1 -0
- package/internal/utils/query.d.ts +2 -0
- package/internal/utils/query.d.ts.map +1 -0
- package/internal/utils/query.js +10 -0
- package/internal/utils/query.js.map +1 -0
- package/internal/utils/query.mjs +6 -0
- package/internal/utils/query.mjs.map +1 -0
- package/internal/utils/values.js +5 -5
- package/internal/utils/values.js.map +1 -1
- package/internal/utils/values.mjs +6 -6
- package/internal/utils/values.mjs.map +1 -1
- package/internal/utils.d.mts +1 -0
- package/internal/utils.d.ts +1 -0
- package/internal/utils.js +1 -0
- package/internal/utils.js.map +1 -1
- package/internal/utils.mjs +1 -0
- package/package.json +24 -3
- package/pagination.d.mts +2 -0
- package/pagination.d.mts.map +1 -0
- package/pagination.d.ts +2 -0
- package/pagination.d.ts.map +1 -0
- package/pagination.js +6 -0
- package/pagination.js.map +1 -0
- package/pagination.mjs +2 -0
- package/pagination.mjs.map +1 -0
- package/resources/creators.d.mts +326 -247
- package/resources/creators.d.mts.map +1 -1
- package/resources/creators.d.ts +326 -247
- package/resources/creators.d.ts.map +1 -1
- package/resources/creators.js +80 -63
- package/resources/creators.js.map +1 -1
- package/resources/creators.mjs +80 -63
- package/resources/creators.mjs.map +1 -1
- package/resources/health.d.mts +13 -1
- package/resources/health.d.mts.map +1 -1
- package/resources/health.d.ts +13 -1
- package/resources/health.d.ts.map +1 -1
- package/resources/health.js +4 -1
- package/resources/health.js.map +1 -1
- package/resources/health.mjs +4 -1
- package/resources/health.mjs.map +1 -1
- package/resources/index.d.mts +6 -7
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +6 -7
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +5 -7
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -3
- package/resources/index.mjs.map +1 -1
- package/resources/posts.d.mts +82 -202
- package/resources/posts.d.mts.map +1 -1
- package/resources/posts.d.ts +82 -202
- package/resources/posts.d.ts.map +1 -1
- package/resources/posts.js +17 -38
- package/resources/posts.js.map +1 -1
- package/resources/posts.mjs +17 -38
- package/resources/posts.mjs.map +1 -1
- package/resources/profiles.d.mts +208 -58
- package/resources/profiles.d.mts.map +1 -1
- package/resources/profiles.d.ts +208 -58
- package/resources/profiles.d.ts.map +1 -1
- package/resources/profiles.js +37 -41
- package/resources/profiles.js.map +1 -1
- package/resources/profiles.mjs +37 -41
- package/resources/profiles.mjs.map +1 -1
- package/resources/raw/index.d.mts +4 -0
- package/resources/raw/index.d.mts.map +1 -0
- package/resources/raw/index.d.ts +4 -0
- package/resources/raw/index.d.ts.map +1 -0
- package/resources/raw/index.js +11 -0
- package/resources/raw/index.js.map +1 -0
- package/resources/raw/index.mjs +5 -0
- package/resources/raw/index.mjs.map +1 -0
- package/resources/raw/instagram.d.mts +215 -0
- package/resources/raw/instagram.d.mts.map +1 -0
- package/resources/raw/instagram.d.ts +215 -0
- package/resources/raw/instagram.d.ts.map +1 -0
- package/resources/raw/instagram.js +31 -0
- package/resources/raw/instagram.js.map +1 -0
- package/resources/raw/instagram.mjs +27 -0
- package/resources/raw/instagram.mjs.map +1 -0
- package/resources/raw/raw.d.mts +14 -0
- package/resources/raw/raw.d.mts.map +1 -0
- package/resources/raw/raw.d.ts +14 -0
- package/resources/raw/raw.d.ts.map +1 -0
- package/resources/raw/raw.js +21 -0
- package/resources/raw/raw.js.map +1 -0
- package/resources/raw/raw.mjs +16 -0
- package/resources/raw/raw.mjs.map +1 -0
- package/resources/raw/youtube.d.mts +455 -0
- package/resources/raw/youtube.d.mts.map +1 -0
- package/resources/raw/youtube.d.ts +455 -0
- package/resources/raw/youtube.d.ts.map +1 -0
- package/resources/raw/youtube.js +61 -0
- package/resources/raw/youtube.js.map +1 -0
- package/resources/raw/youtube.mjs +57 -0
- package/resources/raw/youtube.mjs.map +1 -0
- package/resources/raw.d.mts +2 -0
- package/resources/raw.d.mts.map +1 -0
- package/resources/raw.d.ts +2 -0
- package/resources/raw.d.ts.map +1 -0
- package/resources/raw.js +6 -0
- package/resources/raw.js.map +1 -0
- package/resources/raw.mjs +3 -0
- package/resources/raw.mjs.map +1 -0
- package/resources/search.d.mts +126 -117
- package/resources/search.d.mts.map +1 -1
- package/resources/search.d.ts +126 -117
- package/resources/search.d.ts.map +1 -1
- package/resources/search.js +46 -13
- package/resources/search.js.map +1 -1
- package/resources/search.mjs +46 -13
- package/resources/search.mjs.map +1 -1
- package/resources/shared.d.mts +55 -0
- package/resources/shared.d.mts.map +1 -0
- package/resources/shared.d.ts +55 -0
- package/resources/shared.d.ts.map +1 -0
- package/resources/shared.js +4 -0
- package/resources/shared.js.map +1 -0
- package/resources/shared.mjs +3 -0
- package/resources/shared.mjs.map +1 -0
- package/src/client.ts +153 -127
- package/src/core/api-promise.ts +4 -4
- package/src/core/error.ts +2 -2
- package/src/core/pagination.ts +232 -0
- package/src/core/resource.ts +3 -3
- package/src/index.ts +4 -3
- package/src/internal/parse.ts +8 -2
- package/src/internal/shims.ts +1 -1
- package/src/internal/uploads.ts +5 -5
- package/src/internal/utils/base64.ts +3 -3
- package/src/internal/utils/log.ts +3 -3
- package/src/internal/utils/path.ts +2 -2
- package/src/internal/utils/query.ts +7 -0
- package/src/internal/utils/values.ts +6 -6
- package/src/internal/utils.ts +1 -0
- package/src/pagination.ts +2 -0
- package/src/resources/creators.ts +369 -271
- package/src/resources/health.ts +13 -1
- package/src/resources/index.ts +22 -41
- package/src/resources/posts.ts +89 -232
- package/src/resources/profiles.ts +252 -59
- package/src/resources/raw/index.ts +16 -0
- package/src/resources/raw/instagram.ts +271 -0
- package/src/resources/raw/raw.ts +47 -0
- package/src/resources/raw/youtube.ts +585 -0
- package/src/resources/raw.ts +3 -0
- package/src/resources/search.ts +145 -131
- package/src/resources/shared.ts +66 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/resources/brand-safety.d.mts +0 -234
- package/resources/brand-safety.d.mts.map +0 -1
- package/resources/brand-safety.d.ts +0 -234
- package/resources/brand-safety.d.ts.map +0 -1
- package/resources/brand-safety.js +0 -75
- package/resources/brand-safety.js.map +0 -1
- package/resources/brand-safety.mjs +0 -71
- package/resources/brand-safety.mjs.map +0 -1
- package/resources/lookalike.d.mts +0 -142
- package/resources/lookalike.d.mts.map +0 -1
- package/resources/lookalike.d.ts +0 -142
- package/resources/lookalike.d.ts.map +0 -1
- package/resources/lookalike.js +0 -28
- package/resources/lookalike.js.map +0 -1
- package/resources/lookalike.mjs +0 -24
- package/resources/lookalike.mjs.map +0 -1
- package/resources/match.d.mts +0 -90
- package/resources/match.d.mts.map +0 -1
- package/resources/match.d.ts +0 -90
- package/resources/match.d.ts.map +0 -1
- package/resources/match.js +0 -22
- package/resources/match.js.map +0 -1
- package/resources/match.mjs +0 -18
- package/resources/match.mjs.map +0 -1
- package/src/resources/brand-safety.ts +0 -304
- package/src/resources/lookalike.ts +0 -186
- package/src/resources/match.ts +0 -115
|
@@ -0,0 +1,455 @@
|
|
|
1
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
2
|
+
import * as YoutubeAPI from "./youtube.mjs";
|
|
3
|
+
import { APIPromise } from "../../core/api-promise.mjs";
|
|
4
|
+
import { RequestOptions } from "../../internal/request-options.mjs";
|
|
5
|
+
/**
|
|
6
|
+
* Fetch fresh data directly from social platforms in real-time. Use when you need the most current information or data for profiles not yet in our database.
|
|
7
|
+
*/
|
|
8
|
+
export declare class Youtube extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Fetch fresh YouTube channel data including subscriber count, video count, and
|
|
11
|
+
* total views.
|
|
12
|
+
*
|
|
13
|
+
* **Pricing**: 0.5 credits per channel scraped ($0.005)
|
|
14
|
+
*/
|
|
15
|
+
getChannel(handle: string, query?: YoutubeGetChannelParams | null | undefined, options?: RequestOptions): APIPromise<YoutubeGetChannelResponse>;
|
|
16
|
+
/**
|
|
17
|
+
* Fetch transcripts for multiple videos from a YouTube channel. Videos can be
|
|
18
|
+
* sorted by popularity, newest, or oldest before selection.
|
|
19
|
+
*
|
|
20
|
+
* **Features:**
|
|
21
|
+
*
|
|
22
|
+
* - Fetches up to 20 video transcripts per request
|
|
23
|
+
* - Sort by popular (most views), newest, or oldest
|
|
24
|
+
* - Partial success — individual video failures don't block the response
|
|
25
|
+
* - Optional timestamped segments for each transcript
|
|
26
|
+
*
|
|
27
|
+
* **Pricing**: 0.5 credits per transcript fetched ($0.005)
|
|
28
|
+
*/
|
|
29
|
+
getChannelTranscripts(handle: string, query?: YoutubeGetChannelTranscriptsParams | null | undefined, options?: RequestOptions): APIPromise<YoutubeGetChannelTranscriptsResponse>;
|
|
30
|
+
/**
|
|
31
|
+
* Fetch YouTube video transcript/captions. Returns timestamped segments and full
|
|
32
|
+
* text. Useful for content analysis.
|
|
33
|
+
*
|
|
34
|
+
* **Supported sources:**
|
|
35
|
+
*
|
|
36
|
+
* - Manual captions (highest quality)
|
|
37
|
+
* - Auto-generated captions
|
|
38
|
+
* - Multiple language tracks
|
|
39
|
+
*
|
|
40
|
+
* **Pricing**: 0.5 credits per transcript ($0.005)
|
|
41
|
+
*/
|
|
42
|
+
getTranscript(videoID: string, query?: YoutubeGetTranscriptParams | null | undefined, options?: RequestOptions): APIPromise<YoutubeGetTranscriptResponse>;
|
|
43
|
+
/**
|
|
44
|
+
* Search YouTube videos and channels.
|
|
45
|
+
*
|
|
46
|
+
* **Pricing**: 0.5 credits per result returned ($0.005)
|
|
47
|
+
*/
|
|
48
|
+
search(query: YoutubeSearchParams, options?: RequestOptions): APIPromise<YoutubeSearchResponse>;
|
|
49
|
+
}
|
|
50
|
+
export interface TranscriptSegment {
|
|
51
|
+
/**
|
|
52
|
+
* Duration in seconds
|
|
53
|
+
*/
|
|
54
|
+
duration: number;
|
|
55
|
+
/**
|
|
56
|
+
* Start time in seconds
|
|
57
|
+
*/
|
|
58
|
+
start: number;
|
|
59
|
+
/**
|
|
60
|
+
* Segment text
|
|
61
|
+
*/
|
|
62
|
+
text: string;
|
|
63
|
+
}
|
|
64
|
+
export interface YoutubeGetChannelResponse {
|
|
65
|
+
data: YoutubeGetChannelResponse.Data;
|
|
66
|
+
}
|
|
67
|
+
export declare namespace YoutubeGetChannelResponse {
|
|
68
|
+
interface Data {
|
|
69
|
+
/**
|
|
70
|
+
* Channel avatar URL
|
|
71
|
+
*/
|
|
72
|
+
avatar_url: string | null;
|
|
73
|
+
/**
|
|
74
|
+
* Channel description
|
|
75
|
+
*/
|
|
76
|
+
description: string | null;
|
|
77
|
+
/**
|
|
78
|
+
* Channel handle
|
|
79
|
+
*/
|
|
80
|
+
handle: string;
|
|
81
|
+
/**
|
|
82
|
+
* Channel name
|
|
83
|
+
*/
|
|
84
|
+
name: string;
|
|
85
|
+
/**
|
|
86
|
+
* When this data was scraped
|
|
87
|
+
*/
|
|
88
|
+
scraped_at: string;
|
|
89
|
+
/**
|
|
90
|
+
* Subscriber count
|
|
91
|
+
*/
|
|
92
|
+
subscribers: number;
|
|
93
|
+
/**
|
|
94
|
+
* Total video count
|
|
95
|
+
*/
|
|
96
|
+
videos_count: number;
|
|
97
|
+
/**
|
|
98
|
+
* Total view count
|
|
99
|
+
*/
|
|
100
|
+
views_total: number;
|
|
101
|
+
/**
|
|
102
|
+
* Recent videos (only included when include_videos=true)
|
|
103
|
+
*/
|
|
104
|
+
videos?: Array<Data.Video>;
|
|
105
|
+
}
|
|
106
|
+
namespace Data {
|
|
107
|
+
interface Video {
|
|
108
|
+
/**
|
|
109
|
+
* Video ID
|
|
110
|
+
*/
|
|
111
|
+
id: string;
|
|
112
|
+
/**
|
|
113
|
+
* Comment count
|
|
114
|
+
*/
|
|
115
|
+
comments: number | null;
|
|
116
|
+
/**
|
|
117
|
+
* Video duration in seconds
|
|
118
|
+
*/
|
|
119
|
+
duration_seconds: number | null;
|
|
120
|
+
/**
|
|
121
|
+
* Like count
|
|
122
|
+
*/
|
|
123
|
+
likes: number | null;
|
|
124
|
+
/**
|
|
125
|
+
* Publish timestamp
|
|
126
|
+
*/
|
|
127
|
+
published_at: string;
|
|
128
|
+
/**
|
|
129
|
+
* Thumbnail URL
|
|
130
|
+
*/
|
|
131
|
+
thumbnail_url: string | null;
|
|
132
|
+
/**
|
|
133
|
+
* Video title
|
|
134
|
+
*/
|
|
135
|
+
title: string;
|
|
136
|
+
/**
|
|
137
|
+
* Video URL
|
|
138
|
+
*/
|
|
139
|
+
url: string;
|
|
140
|
+
/**
|
|
141
|
+
* View count
|
|
142
|
+
*/
|
|
143
|
+
views: number | null;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
export interface YoutubeGetChannelTranscriptsResponse {
|
|
148
|
+
data: YoutubeGetChannelTranscriptsResponse.Data;
|
|
149
|
+
}
|
|
150
|
+
export declare namespace YoutubeGetChannelTranscriptsResponse {
|
|
151
|
+
interface Data {
|
|
152
|
+
/**
|
|
153
|
+
* YouTube channel ID
|
|
154
|
+
*/
|
|
155
|
+
channel_id: string;
|
|
156
|
+
/**
|
|
157
|
+
* Channel name
|
|
158
|
+
*/
|
|
159
|
+
channel_name: string;
|
|
160
|
+
/**
|
|
161
|
+
* Channel handle
|
|
162
|
+
*/
|
|
163
|
+
handle: string;
|
|
164
|
+
/**
|
|
165
|
+
* Per-video transcript results
|
|
166
|
+
*/
|
|
167
|
+
items: Array<Data.Item>;
|
|
168
|
+
/**
|
|
169
|
+
* When this data was scraped
|
|
170
|
+
*/
|
|
171
|
+
scraped_at: string;
|
|
172
|
+
/**
|
|
173
|
+
* Number of transcripts that failed to fetch
|
|
174
|
+
*/
|
|
175
|
+
transcripts_failed: number;
|
|
176
|
+
/**
|
|
177
|
+
* Number of transcripts successfully fetched
|
|
178
|
+
*/
|
|
179
|
+
transcripts_fetched: number;
|
|
180
|
+
/**
|
|
181
|
+
* Total videos found on channel
|
|
182
|
+
*/
|
|
183
|
+
videos_found: number;
|
|
184
|
+
}
|
|
185
|
+
namespace Data {
|
|
186
|
+
interface Item {
|
|
187
|
+
/**
|
|
188
|
+
* Error message if transcript fetch failed for this video
|
|
189
|
+
*/
|
|
190
|
+
error: string | null;
|
|
191
|
+
/**
|
|
192
|
+
* Full transcript as plain text
|
|
193
|
+
*/
|
|
194
|
+
full_text: string | null;
|
|
195
|
+
/**
|
|
196
|
+
* Transcript language code
|
|
197
|
+
*/
|
|
198
|
+
language: string | null;
|
|
199
|
+
/**
|
|
200
|
+
* Relative publish time
|
|
201
|
+
*/
|
|
202
|
+
published_text: string | null;
|
|
203
|
+
/**
|
|
204
|
+
* Caption source type
|
|
205
|
+
*/
|
|
206
|
+
source: 'manual' | 'auto_generated' | null;
|
|
207
|
+
/**
|
|
208
|
+
* Video title
|
|
209
|
+
*/
|
|
210
|
+
title: string;
|
|
211
|
+
/**
|
|
212
|
+
* Timestamped segments (only if include_segments=true)
|
|
213
|
+
*/
|
|
214
|
+
transcript: Array<YoutubeAPI.TranscriptSegment> | null;
|
|
215
|
+
/**
|
|
216
|
+
* Video URL
|
|
217
|
+
*/
|
|
218
|
+
url: string;
|
|
219
|
+
/**
|
|
220
|
+
* YouTube video ID
|
|
221
|
+
*/
|
|
222
|
+
video_id: string;
|
|
223
|
+
/**
|
|
224
|
+
* View count
|
|
225
|
+
*/
|
|
226
|
+
view_count: number | null;
|
|
227
|
+
/**
|
|
228
|
+
* Word count of transcript
|
|
229
|
+
*/
|
|
230
|
+
word_count: number | null;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
export interface YoutubeGetTranscriptResponse {
|
|
235
|
+
data: YoutubeGetTranscriptResponse.Data;
|
|
236
|
+
}
|
|
237
|
+
export declare namespace YoutubeGetTranscriptResponse {
|
|
238
|
+
interface Data {
|
|
239
|
+
/**
|
|
240
|
+
* Available transcript languages
|
|
241
|
+
*/
|
|
242
|
+
available_languages: Array<string>;
|
|
243
|
+
/**
|
|
244
|
+
* Full transcript as plain text
|
|
245
|
+
*/
|
|
246
|
+
full_text: string;
|
|
247
|
+
/**
|
|
248
|
+
* Transcript language code
|
|
249
|
+
*/
|
|
250
|
+
language: string;
|
|
251
|
+
/**
|
|
252
|
+
* Video title
|
|
253
|
+
*/
|
|
254
|
+
title: string;
|
|
255
|
+
/**
|
|
256
|
+
* Transcript segments
|
|
257
|
+
*/
|
|
258
|
+
transcript: Array<YoutubeAPI.TranscriptSegment>;
|
|
259
|
+
/**
|
|
260
|
+
* Video URL
|
|
261
|
+
*/
|
|
262
|
+
url: string;
|
|
263
|
+
/**
|
|
264
|
+
* Video ID
|
|
265
|
+
*/
|
|
266
|
+
video_id: string;
|
|
267
|
+
/**
|
|
268
|
+
* Total word count
|
|
269
|
+
*/
|
|
270
|
+
word_count: number;
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
export interface YoutubeSearchResponse {
|
|
274
|
+
data: YoutubeSearchResponse.Data;
|
|
275
|
+
}
|
|
276
|
+
export declare namespace YoutubeSearchResponse {
|
|
277
|
+
interface Data {
|
|
278
|
+
/**
|
|
279
|
+
* Estimated total results count
|
|
280
|
+
*/
|
|
281
|
+
estimated_results: number | null;
|
|
282
|
+
/**
|
|
283
|
+
* The search query
|
|
284
|
+
*/
|
|
285
|
+
query: string;
|
|
286
|
+
/**
|
|
287
|
+
* Search results (videos and channels)
|
|
288
|
+
*/
|
|
289
|
+
results: Array<Data.YouTubeSearchVideoResult | Data.YouTubeSearchChannelResult>;
|
|
290
|
+
/**
|
|
291
|
+
* When this search was performed
|
|
292
|
+
*/
|
|
293
|
+
scraped_at: string;
|
|
294
|
+
}
|
|
295
|
+
namespace Data {
|
|
296
|
+
interface YouTubeSearchVideoResult {
|
|
297
|
+
/**
|
|
298
|
+
* Channel handle (e.g., @username)
|
|
299
|
+
*/
|
|
300
|
+
channel_handle: string | null;
|
|
301
|
+
/**
|
|
302
|
+
* Channel ID
|
|
303
|
+
*/
|
|
304
|
+
channel_id: string;
|
|
305
|
+
/**
|
|
306
|
+
* Channel name
|
|
307
|
+
*/
|
|
308
|
+
channel_name: string;
|
|
309
|
+
/**
|
|
310
|
+
* Whether channel is verified
|
|
311
|
+
*/
|
|
312
|
+
channel_verified: boolean;
|
|
313
|
+
/**
|
|
314
|
+
* Video description snippet
|
|
315
|
+
*/
|
|
316
|
+
description: string | null;
|
|
317
|
+
/**
|
|
318
|
+
* Video duration in seconds
|
|
319
|
+
*/
|
|
320
|
+
duration_seconds: number | null;
|
|
321
|
+
/**
|
|
322
|
+
* Video duration text (e.g., "12:34")
|
|
323
|
+
*/
|
|
324
|
+
duration_text: string | null;
|
|
325
|
+
/**
|
|
326
|
+
* Approximate publish timestamp
|
|
327
|
+
*/
|
|
328
|
+
published_at: string | null;
|
|
329
|
+
/**
|
|
330
|
+
* Relative publish time (e.g., "2 days ago")
|
|
331
|
+
*/
|
|
332
|
+
published_text: string | null;
|
|
333
|
+
/**
|
|
334
|
+
* Video thumbnail URL
|
|
335
|
+
*/
|
|
336
|
+
thumbnail_url: string | null;
|
|
337
|
+
/**
|
|
338
|
+
* Video title
|
|
339
|
+
*/
|
|
340
|
+
title: string;
|
|
341
|
+
type: 'video';
|
|
342
|
+
/**
|
|
343
|
+
* Full YouTube video URL
|
|
344
|
+
*/
|
|
345
|
+
url: string;
|
|
346
|
+
/**
|
|
347
|
+
* YouTube video ID
|
|
348
|
+
*/
|
|
349
|
+
video_id: string;
|
|
350
|
+
/**
|
|
351
|
+
* Number of views
|
|
352
|
+
*/
|
|
353
|
+
view_count: number | null;
|
|
354
|
+
/**
|
|
355
|
+
* View count text (e.g., "1.2M views")
|
|
356
|
+
*/
|
|
357
|
+
view_count_text: string | null;
|
|
358
|
+
}
|
|
359
|
+
interface YouTubeSearchChannelResult {
|
|
360
|
+
/**
|
|
361
|
+
* Channel handle (e.g., @username)
|
|
362
|
+
*/
|
|
363
|
+
channel_handle: string | null;
|
|
364
|
+
/**
|
|
365
|
+
* Channel ID
|
|
366
|
+
*/
|
|
367
|
+
channel_id: string;
|
|
368
|
+
/**
|
|
369
|
+
* Channel name
|
|
370
|
+
*/
|
|
371
|
+
channel_name: string;
|
|
372
|
+
/**
|
|
373
|
+
* Whether channel is verified
|
|
374
|
+
*/
|
|
375
|
+
channel_verified: boolean;
|
|
376
|
+
/**
|
|
377
|
+
* Channel description snippet
|
|
378
|
+
*/
|
|
379
|
+
description: string | null;
|
|
380
|
+
/**
|
|
381
|
+
* Subscriber count
|
|
382
|
+
*/
|
|
383
|
+
subscriber_count: number | null;
|
|
384
|
+
/**
|
|
385
|
+
* Channel avatar URL
|
|
386
|
+
*/
|
|
387
|
+
thumbnail_url: string | null;
|
|
388
|
+
type: 'channel';
|
|
389
|
+
/**
|
|
390
|
+
* Full YouTube channel URL
|
|
391
|
+
*/
|
|
392
|
+
url: string;
|
|
393
|
+
/**
|
|
394
|
+
* Number of videos on the channel
|
|
395
|
+
*/
|
|
396
|
+
video_count: number | null;
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
export interface YoutubeGetChannelParams {
|
|
401
|
+
/**
|
|
402
|
+
* Include recent videos in response
|
|
403
|
+
*/
|
|
404
|
+
include_videos?: boolean;
|
|
405
|
+
/**
|
|
406
|
+
* Number of videos to include
|
|
407
|
+
*/
|
|
408
|
+
video_limit?: number;
|
|
409
|
+
}
|
|
410
|
+
export interface YoutubeGetChannelTranscriptsParams {
|
|
411
|
+
/**
|
|
412
|
+
* Include timestamped transcript segments in response
|
|
413
|
+
*/
|
|
414
|
+
include_segments?: boolean;
|
|
415
|
+
/**
|
|
416
|
+
* Language code for transcripts
|
|
417
|
+
*/
|
|
418
|
+
language?: string;
|
|
419
|
+
/**
|
|
420
|
+
* How to sort channel videos before selecting
|
|
421
|
+
*/
|
|
422
|
+
sort_by?: 'popular' | 'newest' | 'oldest';
|
|
423
|
+
/**
|
|
424
|
+
* Number of videos to fetch transcripts for (max 20)
|
|
425
|
+
*/
|
|
426
|
+
video_limit?: number;
|
|
427
|
+
}
|
|
428
|
+
export interface YoutubeGetTranscriptParams {
|
|
429
|
+
/**
|
|
430
|
+
* Language code or "auto" for automatic detection
|
|
431
|
+
*/
|
|
432
|
+
language?: string;
|
|
433
|
+
}
|
|
434
|
+
export interface YoutubeSearchParams {
|
|
435
|
+
/**
|
|
436
|
+
* Search query
|
|
437
|
+
*/
|
|
438
|
+
q: string;
|
|
439
|
+
/**
|
|
440
|
+
* Country code for localized results (ISO 3166-1 alpha-2)
|
|
441
|
+
*/
|
|
442
|
+
country_code?: string;
|
|
443
|
+
/**
|
|
444
|
+
* Language code for results
|
|
445
|
+
*/
|
|
446
|
+
language_code?: string;
|
|
447
|
+
/**
|
|
448
|
+
* Maximum number of results to return
|
|
449
|
+
*/
|
|
450
|
+
limit?: number;
|
|
451
|
+
}
|
|
452
|
+
export declare namespace Youtube {
|
|
453
|
+
export { type TranscriptSegment as TranscriptSegment, type YoutubeGetChannelResponse as YoutubeGetChannelResponse, type YoutubeGetChannelTranscriptsResponse as YoutubeGetChannelTranscriptsResponse, type YoutubeGetTranscriptResponse as YoutubeGetTranscriptResponse, type YoutubeSearchResponse as YoutubeSearchResponse, type YoutubeGetChannelParams as YoutubeGetChannelParams, type YoutubeGetChannelTranscriptsParams as YoutubeGetChannelTranscriptsParams, type YoutubeGetTranscriptParams as YoutubeGetTranscriptParams, type YoutubeSearchParams as YoutubeSearchParams, };
|
|
454
|
+
}
|
|
455
|
+
//# sourceMappingURL=youtube.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"youtube.d.mts","sourceRoot":"","sources":["../../src/resources/raw/youtube.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,UAAU;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB;;GAEG;AACH,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;;;;OAKG;IACH,UAAU,CACR,MAAM,EAAE,MAAM,EACd,KAAK,GAAE,uBAAuB,GAAG,IAAI,GAAG,SAAc,EACtD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,yBAAyB,CAAC;IAIxC;;;;;;;;;;;;OAYG;IACH,qBAAqB,CACnB,MAAM,EAAE,MAAM,EACd,KAAK,GAAE,kCAAkC,GAAG,IAAI,GAAG,SAAc,EACjE,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,oCAAoC,CAAC;IAInD;;;;;;;;;;;OAWG;IACH,aAAa,CACX,OAAO,EAAE,MAAM,EACf,KAAK,GAAE,0BAA0B,GAAG,IAAI,GAAG,SAAc,EACzD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,4BAA4B,CAAC;IAI3C;;;;OAIG;IACH,MAAM,CAAC,KAAK,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,qBAAqB,CAAC;CAGhG;AAED,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,IAAI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