scrapebadger 0.14.0 → 0.15.1

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/dist/index.js CHANGED
@@ -4812,6 +4812,854 @@ var TikTokClient = class {
4812
4812
  }
4813
4813
  };
4814
4814
 
4815
+ // src/ebay/search.ts
4816
+ var SearchClient7 = class {
4817
+ client;
4818
+ constructor(client) {
4819
+ this.client = client;
4820
+ }
4821
+ /**
4822
+ * Search an eBay marketplace for active listings.
4823
+ *
4824
+ * @param params - Search parameters including query, filters, and pagination.
4825
+ * @returns Search results with cards, facets, and pagination metadata.
4826
+ * @throws AuthenticationError - If the API key is invalid.
4827
+ * @throws ValidationError - If the parameters are invalid.
4828
+ */
4829
+ async search(params) {
4830
+ return this.client.request("/v1/ebay/search", {
4831
+ params: {
4832
+ query: params.query,
4833
+ domain: params.domain,
4834
+ category_id: params.category_id,
4835
+ page: params.page,
4836
+ per_page: params.per_page,
4837
+ sort_by: params.sort_by,
4838
+ condition: params.condition,
4839
+ buying_format: params.buying_format,
4840
+ min_price: params.min_price,
4841
+ max_price: params.max_price,
4842
+ free_shipping: params.free_shipping
4843
+ }
4844
+ });
4845
+ }
4846
+ /**
4847
+ * Search completed / sold listings — eBay's sold-price history.
4848
+ *
4849
+ * @param params - Search parameters including query, filters, and pagination.
4850
+ * @returns Search results (with `sold: true`), facets, and pagination.
4851
+ */
4852
+ async completed(params) {
4853
+ return this.client.request("/v1/ebay/completed", {
4854
+ params: {
4855
+ query: params.query,
4856
+ domain: params.domain,
4857
+ category_id: params.category_id,
4858
+ page: params.page,
4859
+ per_page: params.per_page,
4860
+ sort_by: params.sort_by,
4861
+ condition: params.condition,
4862
+ min_price: params.min_price,
4863
+ max_price: params.max_price
4864
+ }
4865
+ });
4866
+ }
4867
+ /**
4868
+ * Get eBay keyword autocomplete suggestions.
4869
+ *
4870
+ * @param query - Partial search query prefix.
4871
+ * @param options - Optional parameters (domain).
4872
+ * @returns Autocomplete suggestions.
4873
+ */
4874
+ async autocomplete(query, options = {}) {
4875
+ return this.client.request("/v1/ebay/autocomplete", {
4876
+ params: { query, domain: options.domain }
4877
+ });
4878
+ }
4879
+ };
4880
+
4881
+ // src/ebay/items.ts
4882
+ var ItemsClient2 = class {
4883
+ client;
4884
+ constructor(client) {
4885
+ this.client = client;
4886
+ }
4887
+ /**
4888
+ * Get a single eBay listing's full detail.
4889
+ *
4890
+ * @param itemId - The eBay item id.
4891
+ * @param options - Optional parameters (domain).
4892
+ * @returns Item detail including specifics, shipping, and seller summary.
4893
+ * @throws NotFoundError - If the item doesn't exist.
4894
+ */
4895
+ async get(itemId, options = {}) {
4896
+ return this.client.request(
4897
+ `/v1/ebay/items/${itemId}`,
4898
+ { params: { domain: options.domain } }
4899
+ );
4900
+ }
4901
+ /**
4902
+ * Get the catalog product reviews shown on an eBay listing.
4903
+ *
4904
+ * @param itemId - The eBay item id.
4905
+ * @param options - Optional parameters (domain, page, productId).
4906
+ * @returns Reviews response with reviews, aggregate rating, and histogram.
4907
+ */
4908
+ async reviews(itemId, options = {}) {
4909
+ return this.client.request(
4910
+ `/v1/ebay/items/${itemId}/reviews`,
4911
+ {
4912
+ params: {
4913
+ domain: options.domain,
4914
+ page: options.page,
4915
+ product_id: options.productId
4916
+ }
4917
+ }
4918
+ );
4919
+ }
4920
+ };
4921
+
4922
+ // src/ebay/sellers.ts
4923
+ var SellersClient2 = class {
4924
+ client;
4925
+ constructor(client) {
4926
+ this.client = client;
4927
+ }
4928
+ /**
4929
+ * Get an eBay seller's public profile.
4930
+ *
4931
+ * @param username - The seller username.
4932
+ * @param options - Optional parameters (domain).
4933
+ * @returns Seller profile response.
4934
+ * @throws NotFoundError - If the seller doesn't exist.
4935
+ */
4936
+ async get(username, options = {}) {
4937
+ return this.client.request(
4938
+ `/v1/ebay/sellers/${username}`,
4939
+ { params: { domain: options.domain } }
4940
+ );
4941
+ }
4942
+ /**
4943
+ * List the active listings of a single eBay seller.
4944
+ *
4945
+ * @param username - The seller username.
4946
+ * @param options - Optional parameters (domain, query, page, per_page).
4947
+ * @returns Seller items response with result cards and pagination.
4948
+ */
4949
+ async items(username, options = {}) {
4950
+ return this.client.request(
4951
+ `/v1/ebay/sellers/${username}/items`,
4952
+ {
4953
+ params: {
4954
+ domain: options.domain,
4955
+ query: options.query,
4956
+ page: options.page,
4957
+ per_page: options.per_page
4958
+ }
4959
+ }
4960
+ );
4961
+ }
4962
+ /**
4963
+ * Get a seller's recent feedback comments.
4964
+ *
4965
+ * @param username - The seller username.
4966
+ * @param options - Optional parameters (domain, page).
4967
+ * @returns Seller feedback response with feedback entries and pagination.
4968
+ */
4969
+ async feedback(username, options = {}) {
4970
+ return this.client.request(
4971
+ `/v1/ebay/sellers/${username}/feedback`,
4972
+ { params: { domain: options.domain, page: options.page } }
4973
+ );
4974
+ }
4975
+ };
4976
+
4977
+ // src/ebay/categories.ts
4978
+ var CategoriesClient = class {
4979
+ client;
4980
+ constructor(client) {
4981
+ this.client = client;
4982
+ }
4983
+ /**
4984
+ * List active listings within an eBay category.
4985
+ *
4986
+ * @param categoryId - The eBay category id.
4987
+ * @param options - Optional parameters (domain, page, per_page, sort_by, min_price, max_price).
4988
+ * @returns Category response with result cards, facets, and pagination.
4989
+ */
4990
+ async browse(categoryId, options = {}) {
4991
+ return this.client.request(
4992
+ `/v1/ebay/categories/${categoryId}/items`,
4993
+ {
4994
+ params: {
4995
+ domain: options.domain,
4996
+ page: options.page,
4997
+ per_page: options.per_page,
4998
+ sort_by: options.sort_by,
4999
+ min_price: options.min_price,
5000
+ max_price: options.max_price
5001
+ }
5002
+ }
5003
+ );
5004
+ }
5005
+ /**
5006
+ * List eBay's reference top-level category ids.
5007
+ *
5008
+ * @returns Categories response with all category aliases.
5009
+ */
5010
+ async list() {
5011
+ return this.client.request("/v1/ebay/categories");
5012
+ }
5013
+ };
5014
+
5015
+ // src/ebay/reference.ts
5016
+ var ReferenceClient5 = class {
5017
+ client;
5018
+ constructor(client) {
5019
+ this.client = client;
5020
+ }
5021
+ /**
5022
+ * Get all supported eBay marketplaces.
5023
+ *
5024
+ * @returns Markets response with all supported marketplaces.
5025
+ */
5026
+ async markets() {
5027
+ return this.client.request("/v1/ebay/markets");
5028
+ }
5029
+ };
5030
+
5031
+ // src/ebay/client.ts
5032
+ var EbayClient = class {
5033
+ /** Client for active search, completed/sold search, and autocomplete */
5034
+ search;
5035
+ /** Client for item detail and catalog product reviews */
5036
+ items;
5037
+ /** Client for seller profile, items, and feedback */
5038
+ sellers;
5039
+ /** Client for category browse and the reference category list */
5040
+ categories;
5041
+ /** Client for reference data (markets) */
5042
+ reference;
5043
+ /**
5044
+ * Create a new eBay client.
5045
+ *
5046
+ * @param client - The base HTTP client for making requests.
5047
+ */
5048
+ constructor(client) {
5049
+ this.search = new SearchClient7(client);
5050
+ this.items = new ItemsClient2(client);
5051
+ this.sellers = new SellersClient2(client);
5052
+ this.categories = new CategoriesClient(client);
5053
+ this.reference = new ReferenceClient5(client);
5054
+ }
5055
+ };
5056
+
5057
+ // src/youtube/search.ts
5058
+ var SearchClient8 = class {
5059
+ client;
5060
+ constructor(client) {
5061
+ this.client = client;
5062
+ }
5063
+ /**
5064
+ * Search YouTube videos / channels / playlists with the full filter matrix.
5065
+ *
5066
+ * @param params - Search parameters including query, filters, and continuation.
5067
+ * @returns A page of search results with chips, refinements, and a continuation token.
5068
+ * @throws AuthenticationError - If the API key is invalid.
5069
+ * @throws ValidationError - If the parameters are invalid.
5070
+ */
5071
+ async search(params) {
5072
+ return this.client.request("/v1/youtube/search", {
5073
+ params: {
5074
+ query: params.query,
5075
+ type: params.type,
5076
+ sort_by: params.sort_by,
5077
+ upload_date: params.upload_date,
5078
+ duration: params.duration,
5079
+ features: params.features,
5080
+ gl: params.gl,
5081
+ hl: params.hl,
5082
+ continuation: params.continuation
5083
+ }
5084
+ });
5085
+ }
5086
+ /**
5087
+ * Get YouTube keyword autocomplete suggestions.
5088
+ *
5089
+ * @param query - Partial search query prefix.
5090
+ * @param options - Optional region parameters (gl, hl).
5091
+ * @returns Autocomplete suggestions.
5092
+ */
5093
+ async autocomplete(query, options = {}) {
5094
+ return this.client.request("/v1/youtube/autocomplete", {
5095
+ params: { query, gl: options.gl, hl: options.hl }
5096
+ });
5097
+ }
5098
+ };
5099
+
5100
+ // src/youtube/videos.ts
5101
+ var VideosClient3 = class {
5102
+ client;
5103
+ constructor(client) {
5104
+ this.client = client;
5105
+ }
5106
+ /**
5107
+ * Get a single video's full detail (merged `player` + `next`).
5108
+ *
5109
+ * @param videoId - The YouTube video id.
5110
+ * @param options - Optional region parameters (gl, hl).
5111
+ * @returns Full video detail including engagement, channel, chapters, and heatmap.
5112
+ * @throws NotFoundError - If the video doesn't exist or is unavailable.
5113
+ */
5114
+ async get(videoId, options = {}) {
5115
+ return this.client.request(`/v1/youtube/videos/${videoId}`, {
5116
+ params: { gl: options.gl, hl: options.hl }
5117
+ });
5118
+ }
5119
+ /**
5120
+ * Get related / recommended videos for a video.
5121
+ *
5122
+ * @param videoId - The YouTube video id.
5123
+ * @param options - Optional region parameters and a continuation token.
5124
+ * @returns Related results with a continuation token.
5125
+ */
5126
+ async related(videoId, options = {}) {
5127
+ return this.client.request(
5128
+ `/v1/youtube/videos/${videoId}/related`,
5129
+ { params: { continuation: options.continuation, gl: options.gl, hl: options.hl } }
5130
+ );
5131
+ }
5132
+ /**
5133
+ * Get a page of top-level comments for a video.
5134
+ *
5135
+ * @param videoId - The YouTube video id.
5136
+ * @param options - Optional sort order, continuation token, and region.
5137
+ * @returns A page of comments with sorting tokens and a continuation token.
5138
+ */
5139
+ async comments(videoId, options = {}) {
5140
+ return this.client.request(
5141
+ `/v1/youtube/videos/${videoId}/comments`,
5142
+ {
5143
+ params: {
5144
+ sort_by: options.sort_by,
5145
+ continuation: options.continuation,
5146
+ gl: options.gl,
5147
+ hl: options.hl
5148
+ }
5149
+ }
5150
+ );
5151
+ }
5152
+ /**
5153
+ * Get a page of replies to a single comment.
5154
+ *
5155
+ * @param videoId - The YouTube video id.
5156
+ * @param commentId - The comment id whose replies to fetch.
5157
+ * @param options - The required replies continuation token plus region.
5158
+ * @returns A page of replies with a continuation token.
5159
+ */
5160
+ async replies(videoId, commentId, options) {
5161
+ return this.client.request(
5162
+ `/v1/youtube/videos/${videoId}/comments/${commentId}/replies`,
5163
+ { params: { continuation: options.continuation, gl: options.gl, hl: options.hl } }
5164
+ );
5165
+ }
5166
+ /**
5167
+ * Get a video's transcript in the selected language.
5168
+ *
5169
+ * @param videoId - The YouTube video id.
5170
+ * @param options - Optional language and region parameters.
5171
+ * @returns The transcript with timed segments and full text.
5172
+ */
5173
+ async transcript(videoId, options = {}) {
5174
+ return this.client.request(
5175
+ `/v1/youtube/videos/${videoId}/transcript`,
5176
+ { params: { language: options.language, gl: options.gl, hl: options.hl } }
5177
+ );
5178
+ }
5179
+ /**
5180
+ * List a video's available caption tracks.
5181
+ *
5182
+ * @param videoId - The YouTube video id.
5183
+ * @param options - Optional region parameters.
5184
+ * @returns The available caption tracks and translation languages.
5185
+ */
5186
+ async captions(videoId, options = {}) {
5187
+ return this.client.request(
5188
+ `/v1/youtube/videos/${videoId}/captions`,
5189
+ { params: { gl: options.gl, hl: options.hl } }
5190
+ );
5191
+ }
5192
+ /**
5193
+ * Get a video's stream / format metadata (best-effort; URLs may be PO-token gated).
5194
+ *
5195
+ * @param videoId - The YouTube video id.
5196
+ * @param options - Optional content region and player client.
5197
+ * @returns Streaming metadata with muxed and adaptive formats.
5198
+ */
5199
+ async streams(videoId, options = {}) {
5200
+ return this.client.request(
5201
+ `/v1/youtube/videos/${videoId}/streams`,
5202
+ { params: { gl: options.gl, client: options.client } }
5203
+ );
5204
+ }
5205
+ /**
5206
+ * Get a page of live-chat (or chat-replay) messages for a video.
5207
+ *
5208
+ * @param videoId - The YouTube video id.
5209
+ * @param options - Optional continuation token, replay flag, and region.
5210
+ * @returns A page of live-chat messages with a continuation token.
5211
+ */
5212
+ async liveChat(videoId, options = {}) {
5213
+ return this.client.request(
5214
+ `/v1/youtube/videos/${videoId}/live_chat`,
5215
+ {
5216
+ params: {
5217
+ continuation: options.continuation,
5218
+ replay: options.replay,
5219
+ gl: options.gl,
5220
+ hl: options.hl
5221
+ }
5222
+ }
5223
+ );
5224
+ }
5225
+ /**
5226
+ * Fetch detail for up to 50 videos concurrently.
5227
+ *
5228
+ * @param params - The video ids (≤50) plus optional region parameters.
5229
+ * @returns Successfully fetched videos plus per-id errors.
5230
+ */
5231
+ async batch(params) {
5232
+ return this.client.request("/v1/youtube/videos/batch", {
5233
+ method: "POST",
5234
+ body: { video_ids: params.video_ids, gl: params.gl, hl: params.hl }
5235
+ });
5236
+ }
5237
+ async oembed(arg) {
5238
+ const url = typeof arg === "string" ? arg : arg.url;
5239
+ return this.client.request("/v1/youtube/oembed", { params: { url } });
5240
+ }
5241
+ };
5242
+
5243
+ // src/youtube/channels.ts
5244
+ var ChannelsClient = class {
5245
+ client;
5246
+ constructor(client) {
5247
+ this.client = client;
5248
+ }
5249
+ /**
5250
+ * Get full channel detail (accepts a UC id, @handle, or custom URL).
5251
+ *
5252
+ * @param channelId - The channel id, @handle, or custom URL.
5253
+ * @param options - Optional region parameters.
5254
+ * @returns Full channel detail.
5255
+ * @throws NotFoundError - If the channel doesn't exist.
5256
+ */
5257
+ async get(channelId, options = {}) {
5258
+ return this.client.request(`/v1/youtube/channels/${channelId}`, {
5259
+ params: { gl: options.gl, hl: options.hl }
5260
+ });
5261
+ }
5262
+ /**
5263
+ * Get a page of a channel's long-form videos.
5264
+ *
5265
+ * @param channelId - The channel id, @handle, or custom URL.
5266
+ * @param options - Optional continuation token and region.
5267
+ * @returns A page of video cards with a continuation token.
5268
+ */
5269
+ async videos(channelId, options = {}) {
5270
+ return this.client.request(
5271
+ `/v1/youtube/channels/${channelId}/videos`,
5272
+ { params: { continuation: options.continuation, gl: options.gl, hl: options.hl } }
5273
+ );
5274
+ }
5275
+ /**
5276
+ * Get a page of a channel's Shorts.
5277
+ *
5278
+ * @param channelId - The channel id, @handle, or custom URL.
5279
+ * @param options - Optional continuation token and region.
5280
+ * @returns A page of Shorts cards with a continuation token.
5281
+ */
5282
+ async shorts(channelId, options = {}) {
5283
+ return this.client.request(
5284
+ `/v1/youtube/channels/${channelId}/shorts`,
5285
+ { params: { continuation: options.continuation, gl: options.gl, hl: options.hl } }
5286
+ );
5287
+ }
5288
+ /**
5289
+ * Get a page of a channel's live streams.
5290
+ *
5291
+ * @param channelId - The channel id, @handle, or custom URL.
5292
+ * @param options - Optional continuation token and region.
5293
+ * @returns A page of stream cards with a continuation token.
5294
+ */
5295
+ async streams(channelId, options = {}) {
5296
+ return this.client.request(
5297
+ `/v1/youtube/channels/${channelId}/streams`,
5298
+ { params: { continuation: options.continuation, gl: options.gl, hl: options.hl } }
5299
+ );
5300
+ }
5301
+ /**
5302
+ * Get a page of a channel's playlists.
5303
+ *
5304
+ * @param channelId - The channel id, @handle, or custom URL.
5305
+ * @param options - Optional continuation token and region.
5306
+ * @returns A page of playlist cards with a continuation token.
5307
+ */
5308
+ async playlists(channelId, options = {}) {
5309
+ return this.client.request(
5310
+ `/v1/youtube/channels/${channelId}/playlists`,
5311
+ { params: { continuation: options.continuation, gl: options.gl, hl: options.hl } }
5312
+ );
5313
+ }
5314
+ /**
5315
+ * Get a page of a channel's community posts.
5316
+ *
5317
+ * @param channelId - The channel id, @handle, or custom URL.
5318
+ * @param options - Optional continuation token and region.
5319
+ * @returns A page of community posts with a continuation token.
5320
+ */
5321
+ async community(channelId, options = {}) {
5322
+ return this.client.request(
5323
+ `/v1/youtube/channels/${channelId}/community`,
5324
+ { params: { continuation: options.continuation, gl: options.gl, hl: options.hl } }
5325
+ );
5326
+ }
5327
+ /**
5328
+ * Get a channel's lightweight about payload.
5329
+ *
5330
+ * @param channelId - The channel id, @handle, or custom URL.
5331
+ * @param options - Optional region parameters.
5332
+ * @returns The channel about payload.
5333
+ */
5334
+ async about(channelId, options = {}) {
5335
+ return this.client.request(
5336
+ `/v1/youtube/channels/${channelId}/about`,
5337
+ { params: { gl: options.gl, hl: options.hl } }
5338
+ );
5339
+ }
5340
+ /**
5341
+ * Get a channel's subscriber count (fast).
5342
+ *
5343
+ * @param channelId - The channel id, @handle, or custom URL.
5344
+ * @param options - Optional region parameters.
5345
+ * @returns The subscriber count.
5346
+ */
5347
+ async subscriberCount(channelId, options = {}) {
5348
+ return this.client.request(
5349
+ `/v1/youtube/channels/${channelId}/subscriber_count`,
5350
+ { params: { gl: options.gl, hl: options.hl } }
5351
+ );
5352
+ }
5353
+ /**
5354
+ * Search within a single channel.
5355
+ *
5356
+ * @param channelId - The channel id, @handle, or custom URL.
5357
+ * @param options - The required query plus optional continuation and region.
5358
+ * @returns A page of search results scoped to the channel.
5359
+ */
5360
+ async search(channelId, options) {
5361
+ return this.client.request(
5362
+ `/v1/youtube/channels/${channelId}/search`,
5363
+ {
5364
+ params: {
5365
+ query: options.query,
5366
+ continuation: options.continuation,
5367
+ gl: options.gl,
5368
+ hl: options.hl
5369
+ }
5370
+ }
5371
+ );
5372
+ }
5373
+ /**
5374
+ * Resolve a @handle or URL to canonical YouTube ids.
5375
+ *
5376
+ * @param options - A `handle` or `url` (one is required) plus optional region.
5377
+ * @returns The resolved channel / video / playlist ids.
5378
+ */
5379
+ async resolve(options = {}) {
5380
+ return this.client.request("/v1/youtube/channels/resolve", {
5381
+ params: { handle: options.handle, url: options.url, gl: options.gl, hl: options.hl }
5382
+ });
5383
+ }
5384
+ };
5385
+
5386
+ // src/youtube/playlists.ts
5387
+ var PlaylistsClient = class {
5388
+ client;
5389
+ constructor(client) {
5390
+ this.client = client;
5391
+ }
5392
+ /**
5393
+ * Get full playlist detail plus the first page of items.
5394
+ *
5395
+ * @param playlistId - The playlist id.
5396
+ * @param options - Optional region parameters.
5397
+ * @returns Full playlist detail with a continuation token.
5398
+ * @throws NotFoundError - If the playlist doesn't exist.
5399
+ */
5400
+ async get(playlistId, options = {}) {
5401
+ return this.client.request(`/v1/youtube/playlists/${playlistId}`, {
5402
+ params: { gl: options.gl, hl: options.hl }
5403
+ });
5404
+ }
5405
+ /**
5406
+ * Get a continuation page of a playlist's items.
5407
+ *
5408
+ * @param playlistId - The playlist id.
5409
+ * @param options - Optional continuation token and region.
5410
+ * @returns A page of playlist items with a continuation token.
5411
+ */
5412
+ async items(playlistId, options = {}) {
5413
+ return this.client.request(
5414
+ `/v1/youtube/playlists/${playlistId}/items`,
5415
+ { params: { continuation: options.continuation, gl: options.gl, hl: options.hl } }
5416
+ );
5417
+ }
5418
+ /**
5419
+ * Resolve an auto-generated mix / radio (RD…) queue.
5420
+ *
5421
+ * @param mixId - The mix / radio playlist id.
5422
+ * @param options - Optional region parameters.
5423
+ * @returns The mix as a playlist queue.
5424
+ */
5425
+ async mix(mixId, options = {}) {
5426
+ return this.client.request(`/v1/youtube/mixes/${mixId}`, {
5427
+ params: { gl: options.gl, hl: options.hl }
5428
+ });
5429
+ }
5430
+ };
5431
+
5432
+ // src/youtube/community.ts
5433
+ var CommunityClient = class {
5434
+ client;
5435
+ constructor(client) {
5436
+ this.client = client;
5437
+ }
5438
+ /**
5439
+ * Get a single community post's detail.
5440
+ *
5441
+ * @param postId - The community post id.
5442
+ * @param options - Optional region parameters.
5443
+ * @returns The community post.
5444
+ * @throws NotFoundError - If the post doesn't exist.
5445
+ */
5446
+ async get(postId, options = {}) {
5447
+ return this.client.request(`/v1/youtube/posts/${postId}`, {
5448
+ params: { gl: options.gl, hl: options.hl }
5449
+ });
5450
+ }
5451
+ /**
5452
+ * Get a page of comments on a community post.
5453
+ *
5454
+ * @param postId - The community post id.
5455
+ * @param options - Optional continuation token and region.
5456
+ * @returns A page of comments with a continuation token.
5457
+ */
5458
+ async comments(postId, options = {}) {
5459
+ return this.client.request(
5460
+ `/v1/youtube/posts/${postId}/comments`,
5461
+ { params: { continuation: options.continuation, gl: options.gl, hl: options.hl } }
5462
+ );
5463
+ }
5464
+ };
5465
+
5466
+ // src/youtube/shorts.ts
5467
+ var ShortsClient2 = class {
5468
+ client;
5469
+ constructor(client) {
5470
+ this.client = client;
5471
+ }
5472
+ /**
5473
+ * Get a single Short's detail.
5474
+ *
5475
+ * @param videoId - The Short's video id.
5476
+ * @param options - Optional region parameters.
5477
+ * @returns The Short detail.
5478
+ * @throws NotFoundError - If the Short doesn't exist or is unavailable.
5479
+ */
5480
+ async get(videoId, options = {}) {
5481
+ return this.client.request(`/v1/youtube/shorts/${videoId}`, {
5482
+ params: { gl: options.gl, hl: options.hl }
5483
+ });
5484
+ }
5485
+ /**
5486
+ * Get a page of Shorts attributed to a given sound / music id (best-effort).
5487
+ *
5488
+ * @param soundId - The sound / music id.
5489
+ * @param options - Optional continuation token and region.
5490
+ * @returns A page of Shorts cards with a continuation token.
5491
+ */
5492
+ async bySound(soundId, options = {}) {
5493
+ return this.client.request(
5494
+ `/v1/youtube/shorts/by_sound/${soundId}`,
5495
+ { params: { continuation: options.continuation, gl: options.gl, hl: options.hl } }
5496
+ );
5497
+ }
5498
+ };
5499
+
5500
+ // src/youtube/trending.ts
5501
+ var TrendingClient2 = class {
5502
+ client;
5503
+ constructor(client) {
5504
+ this.client = client;
5505
+ }
5506
+ /**
5507
+ * Get a page of the trending feed.
5508
+ *
5509
+ * @param options - Optional feed type, continuation token, and region.
5510
+ * @returns A page of trending items with a continuation token.
5511
+ */
5512
+ async get(options = {}) {
5513
+ return this.client.request("/v1/youtube/trending", {
5514
+ params: {
5515
+ type: options.type,
5516
+ continuation: options.continuation,
5517
+ gl: options.gl,
5518
+ hl: options.hl
5519
+ }
5520
+ });
5521
+ }
5522
+ /**
5523
+ * Get a page of trending Shorts.
5524
+ *
5525
+ * @param options - Optional continuation token and region.
5526
+ * @returns A page of trending Shorts with a continuation token.
5527
+ */
5528
+ async shorts(options = {}) {
5529
+ return this.client.request("/v1/youtube/trending/shorts", {
5530
+ params: { continuation: options.continuation, gl: options.gl, hl: options.hl }
5531
+ });
5532
+ }
5533
+ /**
5534
+ * Get a page of videos under a hashtag.
5535
+ *
5536
+ * @param tag - The hashtag (with or without a leading `#`).
5537
+ * @param options - Optional continuation token and region.
5538
+ * @returns A page of hashtag results with a continuation token.
5539
+ */
5540
+ async hashtag(tag, options = {}) {
5541
+ return this.client.request(`/v1/youtube/hashtags/${tag}`, {
5542
+ params: { continuation: options.continuation, gl: options.gl, hl: options.hl }
5543
+ });
5544
+ }
5545
+ /**
5546
+ * Get a page of the guest home / recommendations feed (best-effort).
5547
+ *
5548
+ * @param options - Optional continuation token and region.
5549
+ * @returns A page of home-feed results with a continuation token.
5550
+ */
5551
+ async home(options = {}) {
5552
+ return this.client.request("/v1/youtube/home", {
5553
+ params: { continuation: options.continuation, gl: options.gl, hl: options.hl }
5554
+ });
5555
+ }
5556
+ };
5557
+
5558
+ // src/youtube/music.ts
5559
+ var MusicClient2 = class {
5560
+ client;
5561
+ constructor(client) {
5562
+ this.client = client;
5563
+ }
5564
+ /**
5565
+ * Search YouTube Music (songs / albums / artists / playlists).
5566
+ *
5567
+ * @param params - The required query plus optional continuation and region.
5568
+ * @returns A page of search results with a continuation token.
5569
+ */
5570
+ async search(params) {
5571
+ return this.client.request("/v1/youtube/music/search", {
5572
+ params: {
5573
+ query: params.query,
5574
+ continuation: params.continuation,
5575
+ gl: params.gl,
5576
+ hl: params.hl
5577
+ }
5578
+ });
5579
+ }
5580
+ };
5581
+
5582
+ // src/youtube/reference.ts
5583
+ var ReferenceClient6 = class {
5584
+ client;
5585
+ constructor(client) {
5586
+ this.client = client;
5587
+ }
5588
+ /**
5589
+ * List YouTube video categories (Data-API parity).
5590
+ *
5591
+ * @param options - Optional content region (default: "US").
5592
+ * @returns The categories for the region.
5593
+ */
5594
+ async categories(options = {}) {
5595
+ return this.client.request("/v1/youtube/categories", {
5596
+ params: { gl: options.gl }
5597
+ });
5598
+ }
5599
+ /**
5600
+ * List supported UI languages (hl codes).
5601
+ *
5602
+ * @returns The supported UI languages.
5603
+ */
5604
+ async languages() {
5605
+ return this.client.request("/v1/youtube/languages");
5606
+ }
5607
+ /**
5608
+ * List supported content regions (gl codes).
5609
+ *
5610
+ * @returns The supported content regions.
5611
+ */
5612
+ async regions() {
5613
+ return this.client.request("/v1/youtube/regions");
5614
+ }
5615
+ /**
5616
+ * List the regions the scraper explicitly geo-targets (proxy-pinned).
5617
+ *
5618
+ * @returns The supported scraper markets.
5619
+ */
5620
+ async markets() {
5621
+ return this.client.request("/v1/youtube/markets");
5622
+ }
5623
+ };
5624
+
5625
+ // src/youtube/client.ts
5626
+ var YoutubeClient = class {
5627
+ /** Client for full-matrix search and keyword autocomplete */
5628
+ search;
5629
+ /** Client for video detail, comments, transcript, captions, streams, live chat, batch, and oEmbed */
5630
+ videos;
5631
+ /** Client for channel detail, tab feeds, about, subscriber count, search, and resolve */
5632
+ channels;
5633
+ /** Client for playlist detail, items pagination, and mixes */
5634
+ playlists;
5635
+ /** Client for community post detail and post comments */
5636
+ community;
5637
+ /** Client for single-Short detail and Shorts by sound */
5638
+ shorts;
5639
+ /** Client for the trending feed, trending shorts, hashtag feed, and home feed */
5640
+ trending;
5641
+ /** Client for YouTube Music search */
5642
+ music;
5643
+ /** Client for reference data (categories, languages, regions, markets) */
5644
+ reference;
5645
+ /**
5646
+ * Create a new YouTube client.
5647
+ *
5648
+ * @param client - The base HTTP client for making requests.
5649
+ */
5650
+ constructor(client) {
5651
+ this.search = new SearchClient8(client);
5652
+ this.videos = new VideosClient3(client);
5653
+ this.channels = new ChannelsClient(client);
5654
+ this.playlists = new PlaylistsClient(client);
5655
+ this.community = new CommunityClient(client);
5656
+ this.shorts = new ShortsClient2(client);
5657
+ this.trending = new TrendingClient2(client);
5658
+ this.music = new MusicClient2(client);
5659
+ this.reference = new ReferenceClient6(client);
5660
+ }
5661
+ };
5662
+
4815
5663
  // src/client.ts
4816
5664
  var ScrapeBadger = class {
4817
5665
  baseClient;
@@ -4831,6 +5679,10 @@ var ScrapeBadger = class {
4831
5679
  shopee;
4832
5680
  /** TikTok scraper API client — 26 endpoints */
4833
5681
  tiktok;
5682
+ /** eBay scraper API client — 12 endpoints across 18 markets */
5683
+ ebay;
5684
+ /** YouTube scraper API client — 39 endpoints */
5685
+ youtube;
4834
5686
  /**
4835
5687
  * Create a new ScrapeBadger client.
4836
5688
  *
@@ -4873,6 +5725,8 @@ var ScrapeBadger = class {
4873
5725
  this.amazon = new AmazonClient(this.baseClient);
4874
5726
  this.shopee = new ShopeeClient(this.baseClient);
4875
5727
  this.tiktok = new TikTokClient(this.baseClient);
5728
+ this.ebay = new EbayClient(this.baseClient);
5729
+ this.youtube = new YoutubeClient(this.baseClient);
4876
5730
  }
4877
5731
  };
4878
5732
 
@@ -4886,6 +5740,12 @@ exports.AmazonSellersClient = SellersClient;
4886
5740
  exports.AuthenticationError = AuthenticationError;
4887
5741
  exports.CommunitiesClient = CommunitiesClient;
4888
5742
  exports.ConflictError = ConflictError;
5743
+ exports.EbayCategoriesClient = CategoriesClient;
5744
+ exports.EbayClient = EbayClient;
5745
+ exports.EbayItemsClient = ItemsClient2;
5746
+ exports.EbayReferenceClient = ReferenceClient5;
5747
+ exports.EbaySearchClient = SearchClient7;
5748
+ exports.EbaySellersClient = SellersClient2;
4889
5749
  exports.GeoClient = GeoClient;
4890
5750
  exports.GoogleAiModeClient = AiModeClient;
4891
5751
  exports.GoogleAutocompleteClient = AutocompleteClient;
@@ -4947,6 +5807,16 @@ exports.VintedSearchClient = SearchClient;
4947
5807
  exports.VintedUsersClient = UsersClient2;
4948
5808
  exports.WebClient = WebClient;
4949
5809
  exports.WebSocketStreamError = WebSocketStreamError;
5810
+ exports.YoutubeChannelsClient = ChannelsClient;
5811
+ exports.YoutubeClient = YoutubeClient;
5812
+ exports.YoutubeCommunityClient = CommunityClient;
5813
+ exports.YoutubeMusicClient = MusicClient2;
5814
+ exports.YoutubePlaylistsClient = PlaylistsClient;
5815
+ exports.YoutubeReferenceClient = ReferenceClient6;
5816
+ exports.YoutubeSearchClient = SearchClient8;
5817
+ exports.YoutubeShortsClient = ShortsClient2;
5818
+ exports.YoutubeTrendingClient = TrendingClient2;
5819
+ exports.YoutubeVideosClient = VideosClient3;
4950
5820
  exports.collectAll = collectAll;
4951
5821
  exports.verifyWebhookSignature = verifyWebhookSignature;
4952
5822
  //# sourceMappingURL=index.js.map