@captapi/sdk 0.2.0 → 0.3.0
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/README.md +73 -73
- package/dist/core.js +26 -14
- package/dist/generated.d.ts +400 -362
- package/dist/generated.js +85 -65
- package/package.json +51 -51
package/dist/generated.js
CHANGED
|
@@ -13,7 +13,7 @@ export class YoutubeApi {
|
|
|
13
13
|
audioTranscript(params) {
|
|
14
14
|
return this.core.get("/v1/youtube/audio-transcript", params);
|
|
15
15
|
}
|
|
16
|
-
/** YouTube Summarizer —
|
|
16
|
+
/** YouTube Summarizer — AI summary from YouTube's published captions — same source as /transcript. Flat 3 credits; caption-miss 404 is free. (3 credits) */
|
|
17
17
|
summarize(params) {
|
|
18
18
|
return this.core.get("/v1/youtube/summarize", params);
|
|
19
19
|
}
|
|
@@ -21,7 +21,7 @@ export class YoutubeApi {
|
|
|
21
21
|
videoDetails(params) {
|
|
22
22
|
return this.core.get("/v1/youtube/video-details", params);
|
|
23
23
|
}
|
|
24
|
-
/** YouTube Comments — Get comments on any YouTube video — text, author, likes, and truncated publishedTimeApprox from the relative label, with cursor pagination (nextCursor + hasMore). Flat 2 credits per call. (2 credits) */
|
|
24
|
+
/** YouTube Comments — Get comments on any YouTube video — text, author, likes, and truncated publishedTimeApprox from the relative label, with cursor pagination (nextCursor + hasMore). Flat 2 credits per call; 0 when the video has comments turned off (commentsDisabled: true). (2 credits) */
|
|
25
25
|
comments(params) {
|
|
26
26
|
return this.core.get("/v1/youtube/comments", params);
|
|
27
27
|
}
|
|
@@ -29,7 +29,7 @@ export class YoutubeApi {
|
|
|
29
29
|
channelDetails(params) {
|
|
30
30
|
return this.core.get("/v1/youtube/channel-details", params);
|
|
31
31
|
}
|
|
32
|
-
/** YouTube Search — YouTube search with cursor pagination — typed hits, ids, canonical URLs, filters (2 credits/page). (2 credits) */
|
|
32
|
+
/** YouTube Search — YouTube search with cursor pagination — typed hits, ids, canonical URLs, filters (2 credits/page, 0 when a page finds nothing). (2 credits) */
|
|
33
33
|
search(params) {
|
|
34
34
|
return this.core.get("/v1/youtube/search", params);
|
|
35
35
|
}
|
|
@@ -73,7 +73,7 @@ export class YoutubeApi {
|
|
|
73
73
|
channelStreams(params) {
|
|
74
74
|
return this.core.get("/v1/youtube/channel-streams", params);
|
|
75
75
|
}
|
|
76
|
-
/** YouTube Hashtag Search — Videos from youtube.com/hashtag/{name} — nested channel{}, viewCountIsApproximate. Not keyword search. (~
|
|
76
|
+
/** YouTube Hashtag Search — Videos from youtube.com/hashtag/{name} — nested channel{}, viewCountIsApproximate. Not keyword search. (~10 credits (1/result)) */
|
|
77
77
|
hashtagSearch(params) {
|
|
78
78
|
return this.core.get("/v1/youtube/hashtag-search", params);
|
|
79
79
|
}
|
|
@@ -135,7 +135,7 @@ export class TiktokApi {
|
|
|
135
135
|
searchSuggestions(params) {
|
|
136
136
|
return this.core.get("/v1/tiktok/search-suggestions", params);
|
|
137
137
|
}
|
|
138
|
-
/** TikTok Channel Posts — Latest videos from a TikTok profile
|
|
138
|
+
/** TikTok Channel Posts — Latest videos from a TikTok profile, cursor-paginated, with isPinned, caption mention text and brand signals (promoCodes, brandMentions). Flat 2 credits; failures are 0 credits. (2 credits) */
|
|
139
139
|
channelPosts(params) {
|
|
140
140
|
return this.core.get("/v1/tiktok/channel-posts", params);
|
|
141
141
|
}
|
|
@@ -159,15 +159,15 @@ export class TiktokApi {
|
|
|
159
159
|
topSearch(params) {
|
|
160
160
|
return this.core.get("/v1/tiktok/top-search", params);
|
|
161
161
|
}
|
|
162
|
-
/** TikTok Search by Hashtag — Videos from TikTok's /tag/{name} challenge feed — not keyword or username search. Cursor + hasMore. (~
|
|
162
|
+
/** TikTok Search by Hashtag — Videos from TikTok's /tag/{name} challenge feed — not keyword or username search. Cursor + hasMore. (~7 credits (0.7/result)) */
|
|
163
163
|
searchByHashtag(params) {
|
|
164
164
|
return this.core.get("/v1/tiktok/search/hashtag", params);
|
|
165
165
|
}
|
|
166
|
-
/** TikTok Search Users —
|
|
166
|
+
/** TikTok Search Users — Find TikTok creators by keyword — distinct authors ranking for the query, id + secUid, per-counter isApproximate flags, cursor pagination. (1 credit) */
|
|
167
167
|
searchUsers(params) {
|
|
168
168
|
return this.core.get("/v1/tiktok/search/users", params);
|
|
169
169
|
}
|
|
170
|
-
/** TikTok Song Details — TikTok sound metadata — usageCount, artists[{id,secUid,handle}], audio{bpm,loudness,beats}, commerce rights (1 credit
|
|
170
|
+
/** TikTok Song Details — TikTok sound metadata — usageCount, artists[{id,secUid,handle}], audio{bpm,loudness,beats}, commerce rights (1 credit; 2 via the fallback path). (1 credit (2 via fallback path)) */
|
|
171
171
|
songDetails(params) {
|
|
172
172
|
return this.core.get("/v1/tiktok/song-details", params);
|
|
173
173
|
}
|
|
@@ -175,19 +175,15 @@ export class TiktokApi {
|
|
|
175
175
|
trendingFeed(params = {}) {
|
|
176
176
|
return this.core.get("/v1/tiktok/trending-feed", params);
|
|
177
177
|
}
|
|
178
|
-
/** TikTok Popular Hashtags — TikTok Creative Center
|
|
178
|
+
/** TikTok Popular Hashtags — Related TikTok hashtags — Creative Center chart when it answers (asOf = the chart's data date, stale when over 3 days old), otherwise a disclosed niche fallback. Flat 2 credits. (2 credits) */
|
|
179
179
|
popularHashtags(params = {}) {
|
|
180
180
|
return this.core.get("/v1/tiktok/popular-hashtags", params);
|
|
181
181
|
}
|
|
182
|
-
/** TikTok
|
|
183
|
-
popularSongs(params = {}) {
|
|
184
|
-
return this.core.get("/v1/tiktok/popular-songs", params);
|
|
185
|
-
}
|
|
186
|
-
/** TikTok Live — Is this TikTok creator live — isLive/status, creator.id/secUid, room, streamQualities with flv/hls/cmaf/dash. (1 credit) */
|
|
182
|
+
/** TikTok Live — Check whether a TikTok creator is live right now and get the stream URLs (CMAF/DASH + FLV, HLS when TikTok exposes it) — one GET with an @handle, 1 credit. (1 credit) */
|
|
187
183
|
live(params) {
|
|
188
184
|
return this.core.get("/v1/tiktok/live", params);
|
|
189
185
|
}
|
|
190
|
-
/** TikTok Live Info — Identical to TikTok Live (isLive, creator.id/secUid, streamQualities hls/cmaf). (
|
|
186
|
+
/** TikTok Live Info — Identical to TikTok Live (isLive, creator.id/secUid, streamQualities hls/cmaf). (1 credit) */
|
|
191
187
|
liveInfo(params) {
|
|
192
188
|
return this.core.get("/v1/tiktok/live-info", params);
|
|
193
189
|
}
|
|
@@ -209,11 +205,11 @@ export class InstagramApi {
|
|
|
209
205
|
summarize(params) {
|
|
210
206
|
return this.core.get("/v1/instagram/summarize", params);
|
|
211
207
|
}
|
|
212
|
-
/** Instagram Post Details — Get an Instagram post, Reel or carousel — caption, likes, comments, views, media URLs, author,
|
|
208
|
+
/** Instagram Post & Reel Details — Get an Instagram post, Reel or carousel — caption, publish date, likes, comments, views, media URLs, author, per-slide children, and promo codes / disclosure words from the caption. (1 credit) */
|
|
213
209
|
details(params) {
|
|
214
210
|
return this.core.get("/v1/instagram/details", params);
|
|
215
211
|
}
|
|
216
|
-
/** Instagram Post Comments —
|
|
212
|
+
/** Instagram Post Comments — Session-paged Instagram comments — a logged-out 2-row preview of a larger thread is 503 SESSION_UNAVAILABLE at 0 credits. (~9 credits (0.9/result)) */
|
|
217
213
|
comments(params) {
|
|
218
214
|
return this.core.get("/v1/instagram/comments", params);
|
|
219
215
|
}
|
|
@@ -221,19 +217,19 @@ export class InstagramApi {
|
|
|
221
217
|
channelDetails(params) {
|
|
222
218
|
return this.core.get("/v1/instagram/channel-details", params);
|
|
223
219
|
}
|
|
224
|
-
/** Instagram Channel Posts — Latest posts from a public Instagram profile — carousel children[], mediaCount, user{} in one call. (~
|
|
220
|
+
/** Instagram Channel Posts — Latest posts from a public Instagram profile — carousel children[], mediaCount, isPinned, caption promo codes, user{} in one call. (~3 credits (0.3/result)) */
|
|
225
221
|
channelPosts(params) {
|
|
226
222
|
return this.core.get("/v1/instagram/channel-posts", params);
|
|
227
223
|
}
|
|
228
|
-
/** Instagram Channel Reels — Latest Reels from a public Instagram profile — pass userId to skip resolve; ceil(n×0.3) credits; nextCursor + hasMore. (~
|
|
224
|
+
/** Instagram Channel Reels — Latest Reels from a public Instagram profile — isPinned, optional since date filter, pass userId to skip resolve; ceil(n×0.3) credits; nextCursor + hasMore. (~3 credits (0.3/result)) */
|
|
229
225
|
channelReels(params = {}) {
|
|
230
226
|
return this.core.get("/v1/instagram/channel-reels", params);
|
|
231
227
|
}
|
|
232
|
-
/** Instagram Reels Search — Native
|
|
228
|
+
/** Instagram Reels Search — Native tag feed first, slower fallback paths on a miss. Max 50. Flat 2 credits. (2 credits) */
|
|
233
229
|
reelsSearch(params) {
|
|
234
230
|
return this.core.get("/v1/instagram/reels-search", params);
|
|
235
231
|
}
|
|
236
|
-
/** Instagram Trending Reels — Cache-first trending Reels
|
|
232
|
+
/** Instagram Trending Reels — Cache-first trending Reels. Feed outage → labelled country hashtag-clips stand-in (listing field), never a silent swap. Max 50. Flat 2 credits. (2 credits) */
|
|
237
233
|
trendingReels(params = {}) {
|
|
238
234
|
return this.core.get("/v1/instagram/trending-reels", params);
|
|
239
235
|
}
|
|
@@ -241,15 +237,15 @@ export class InstagramApi {
|
|
|
241
237
|
taggedPosts(params) {
|
|
242
238
|
return this.core.get("/v1/instagram/tagged-posts", params);
|
|
243
239
|
}
|
|
244
|
-
/** Instagram Reels By Audio ID — Is this Instagram sound trending? Reels that use it + isTrendingInClips / trendRank / rich music{}. (~
|
|
240
|
+
/** Instagram Reels By Audio ID — Is this Instagram sound trending? Reels that use it + isTrendingInClips / trendRank / rich music{}. (~14 credits (1.4/result)) */
|
|
245
241
|
reelsByAudioId(params) {
|
|
246
242
|
return this.core.get("/v1/instagram/reels-by-audio-id", params);
|
|
247
243
|
}
|
|
248
|
-
/** Instagram Hashtag Search —
|
|
244
|
+
/** Instagram Hashtag Search — Hashtag Explore: native grid first, fallback path only on miss. Max 50. Flat 2 credits. (2 credits) */
|
|
249
245
|
hashtagSearch(params) {
|
|
250
246
|
return this.core.get("/v1/instagram/hashtag-search", params);
|
|
251
247
|
}
|
|
252
|
-
/** Instagram Profile Search — Resolve a brand or @handle to one public Instagram profile —
|
|
248
|
+
/** Instagram Profile Search — Resolve a brand or @handle to one public Instagram profile — or search accounts by free text (mode=search). (1 credit) */
|
|
253
249
|
profileSearch(params) {
|
|
254
250
|
return this.core.get("/v1/instagram/profile-search", params);
|
|
255
251
|
}
|
|
@@ -275,7 +271,7 @@ export class FacebookApi {
|
|
|
275
271
|
constructor(core) {
|
|
276
272
|
this.core = core;
|
|
277
273
|
}
|
|
278
|
-
/** Facebook Details — Facebook post or Reel — caption, engagement, author id, video{} playback, and music when Facebook exposes them. (2 credits) */
|
|
274
|
+
/** Facebook Post & Reel Details — Facebook post or Reel — caption, engagement, author id, video{} playback, and music when Facebook exposes them. (2 credits) */
|
|
279
275
|
details(params) {
|
|
280
276
|
return this.core.get("/v1/facebook/details", params);
|
|
281
277
|
}
|
|
@@ -299,7 +295,7 @@ export class FacebookApi {
|
|
|
299
295
|
profileReels(params) {
|
|
300
296
|
return this.core.get("/v1/facebook/profile-reels", params);
|
|
301
297
|
}
|
|
302
|
-
/** Facebook Group Posts —
|
|
298
|
+
/** Facebook Group Posts — Newest posts from a public Facebook group — caption, author, engagement, sortBy; 1 credit per post. (~10 credits (1/result)) */
|
|
303
299
|
groupPosts(params) {
|
|
304
300
|
return this.core.get("/v1/facebook/group-posts", params);
|
|
305
301
|
}
|
|
@@ -321,7 +317,7 @@ export class TwitterApi {
|
|
|
321
317
|
tweetDetails(params) {
|
|
322
318
|
return this.core.get("/v1/twitter/tweet-details", params);
|
|
323
319
|
}
|
|
324
|
-
/** Twitter/X Transcript — Tweet text as a transcript — timingSource none (not
|
|
320
|
+
/** Twitter/X Transcript — Tweet text as a transcript — timingSource none (not speech-to-text). Flat 1 credit. (1 credit) */
|
|
325
321
|
transcript(params) {
|
|
326
322
|
return this.core.get("/v1/twitter/transcript", params);
|
|
327
323
|
}
|
|
@@ -355,7 +351,7 @@ export class RedditApi {
|
|
|
355
351
|
postDetails(params) {
|
|
356
352
|
return this.core.get("/v1/reddit/post-details", params);
|
|
357
353
|
}
|
|
358
|
-
/** Reddit Post Comments — Flat Reddit comment threads with depth/parentId
|
|
354
|
+
/** Reddit Post Comments — Flat Reddit comment threads with depth/parentId and the parent post in one call. (2 credits) */
|
|
359
355
|
postComments(params) {
|
|
360
356
|
return this.core.get("/v1/reddit/post-comments", params);
|
|
361
357
|
}
|
|
@@ -367,7 +363,7 @@ export class RedditApi {
|
|
|
367
363
|
search(params) {
|
|
368
364
|
return this.core.get("/v1/reddit/search", params);
|
|
369
365
|
}
|
|
370
|
-
/** Reddit Subreddit Details — Subreddit card — id (t5_…),
|
|
366
|
+
/** Reddit Subreddit Details — Subreddit card — id (t5_…), weekly visitors and contributions, rules[], ISO createdAt. Flat 1 credit. (1 credit) */
|
|
371
367
|
subredditDetails(params) {
|
|
372
368
|
return this.core.get("/v1/reddit/subreddit-details", params);
|
|
373
369
|
}
|
|
@@ -381,19 +377,19 @@ export class ThreadsApi {
|
|
|
381
377
|
constructor(core) {
|
|
382
378
|
this.core = core;
|
|
383
379
|
}
|
|
384
|
-
/** Threads Profile — Threads profile — displayName,
|
|
380
|
+
/** Threads Profile — Threads profile — displayName, isPrivate, bioLinks (Meta verified), isThreadsOnlyUser, transparencyLabel, bioFragments, HD avatars (1 credit). (1 credit) */
|
|
385
381
|
profile(params) {
|
|
386
382
|
return this.core.get("/v1/threads/profile", params);
|
|
387
383
|
}
|
|
388
|
-
/** Threads User Posts — Recent Threads posts — engagement{views,likes,replies,reposts,quotes}, threadId/isReply. Flat 2 credits. (2 credits) */
|
|
384
|
+
/** Threads User Posts — Recent Threads posts — engagement{views,likes,replies,reposts,quotes}, threadId/isReply. Flat 2 credits. source + timings. (2 credits) */
|
|
389
385
|
userPosts(params) {
|
|
390
386
|
return this.core.get("/v1/threads/user-posts", params);
|
|
391
387
|
}
|
|
392
|
-
/** Threads Post Details — Threads post — engagement (views when exposed), comments[],
|
|
388
|
+
/** Threads Post Details — Threads post — engagement (views when exposed), comments[], suggestedPosts[], threadId/isReply. Flat 1 credit. (1 credit) */
|
|
393
389
|
postDetails(params) {
|
|
394
390
|
return this.core.get("/v1/threads/post-details", params);
|
|
395
391
|
}
|
|
396
|
-
/** Threads Post Search — Threads keyword search — posts with engagement + media. Flat 2 credits. (2 credits) */
|
|
392
|
+
/** Threads Post Search — Threads keyword search — posts with engagement + media. orderBy relevant | post_dated | engagement. Flat 2 credits. (2 credits) */
|
|
397
393
|
search(params) {
|
|
398
394
|
return this.core.get("/v1/threads/search", params);
|
|
399
395
|
}
|
|
@@ -411,7 +407,7 @@ export class BlueskyApi {
|
|
|
411
407
|
profile(params) {
|
|
412
408
|
return this.core.get("/v1/bluesky/profile", params);
|
|
413
409
|
}
|
|
414
|
-
/** Bluesky User Posts — Author feed — posts and reposts (isRepost marked), quote/external/images embeds, opaque cursor. (~
|
|
410
|
+
/** Bluesky User Posts — Author feed — posts and reposts (isRepost marked), quote/external/images embeds, opaque cursor. (~1 credits (0.1/result)) */
|
|
415
411
|
userPosts(params) {
|
|
416
412
|
return this.core.get("/v1/bluesky/user-posts", params);
|
|
417
413
|
}
|
|
@@ -429,19 +425,19 @@ export class PinterestApi {
|
|
|
429
425
|
pinDetails(params) {
|
|
430
426
|
return this.core.get("/v1/pinterest/pin-details", params);
|
|
431
427
|
}
|
|
432
|
-
/** Pinterest User Pins — Pins from a Pinterest profile — offset cursor, pidgets window ~100. (~
|
|
428
|
+
/** Pinterest User Pins — Pins from a Pinterest profile — offset cursor, pidgets window ~100. (~5 credits (0.5/result)) */
|
|
433
429
|
userPins(params) {
|
|
434
430
|
return this.core.get("/v1/pinterest/user-pins", params);
|
|
435
431
|
}
|
|
436
|
-
/** Pinterest Search — Keyword pin search — offset cursor,
|
|
432
|
+
/** Pinterest Search — Keyword pin search — offset cursor, search window 40, flat 2 credits. (2 credits) */
|
|
437
433
|
search(params) {
|
|
438
434
|
return this.core.get("/v1/pinterest/search", params);
|
|
439
435
|
}
|
|
440
|
-
/** Pinterest Board — Pins on a Pinterest board — saves, imageOriginal, destinationUrl, top-level author. ~0.5 credits/pin. (~
|
|
436
|
+
/** Pinterest Board — Pins on a Pinterest board — saves, imageOriginal, destinationUrl, top-level author. ~0.5 credits/pin. (~5 credits (0.5/result)) */
|
|
441
437
|
board(params) {
|
|
442
438
|
return this.core.get("/v1/pinterest/board", params);
|
|
443
439
|
}
|
|
444
|
-
/** Pinterest User Boards — Boards on a Pinterest profile — pinCount, coverImage (474x), privacy, sections. Board followers when scoped. (~
|
|
440
|
+
/** Pinterest User Boards — Boards on a Pinterest profile — pinCount, coverImage (474x), privacy, sections. Board followers when scoped. (~5 credits (0.5/result)) */
|
|
445
441
|
userBoards(params) {
|
|
446
442
|
return this.core.get("/v1/pinterest/user-boards", params);
|
|
447
443
|
}
|
|
@@ -451,15 +447,15 @@ export class LinkedinApi {
|
|
|
451
447
|
constructor(core) {
|
|
452
448
|
this.core = core;
|
|
453
449
|
}
|
|
454
|
-
/** LinkedIn Profile — LinkedIn person profile
|
|
450
|
+
/** LinkedIn Profile — Public LinkedIn person profile — what a logged-out visitor sees: name, headline, location, about. Flat 1 credit. (1 credit) */
|
|
455
451
|
profile(params) {
|
|
456
452
|
return this.core.get("/v1/linkedin/profile", params);
|
|
457
453
|
}
|
|
458
|
-
/** LinkedIn Company — Company page for B2B intel — specialties, similarPages, employeeCount, founded, slogan, cover.
|
|
454
|
+
/** LinkedIn Company — Company page for B2B intel — specialties, similarPages, employeeCount, founded, slogan, cover. Flat 2 credits. (2 credits) */
|
|
459
455
|
company(params) {
|
|
460
456
|
return this.core.get("/v1/linkedin/company", params);
|
|
461
457
|
}
|
|
462
|
-
/** LinkedIn Post Details — Get a LinkedIn post — text, author, reactions, and comments count as structured JSON. (1 credit) */
|
|
458
|
+
/** LinkedIn Post Details — Get a LinkedIn post — text, author, reactions, and comments count as structured JSON. When LinkedIn hides the post behind its sign-in prompt the call fails with 502 at 0 credits. (1 credit) */
|
|
463
459
|
postDetails(params) {
|
|
464
460
|
return this.core.get("/v1/linkedin/post-details", params);
|
|
465
461
|
}
|
|
@@ -467,11 +463,11 @@ export class LinkedinApi {
|
|
|
467
463
|
postTranscript(params) {
|
|
468
464
|
return this.core.get("/v1/linkedin/post-transcript", params);
|
|
469
465
|
}
|
|
470
|
-
/** LinkedIn Company Posts —
|
|
466
|
+
/** LinkedIn Company Posts — The recent posts a company page shows logged-out visitors (about 10), with engagement{likes,comments}. Flat 1 credit. (1 credit) */
|
|
471
467
|
companyPosts(params) {
|
|
472
468
|
return this.core.get("/v1/linkedin/company-posts", params);
|
|
473
469
|
}
|
|
474
|
-
/** LinkedIn Search Posts — Keyword search of public LinkedIn posts — offset cursor, ceiling 50. (~
|
|
470
|
+
/** LinkedIn Search Posts — Keyword search of public LinkedIn posts — offset cursor, ceiling 50. (~8 credits (0.8/result)) */
|
|
475
471
|
searchPosts(params) {
|
|
476
472
|
return this.core.get("/v1/linkedin/search-posts", params);
|
|
477
473
|
}
|
|
@@ -489,11 +485,11 @@ export class RumbleApi {
|
|
|
489
485
|
videoTranscript(params) {
|
|
490
486
|
return this.core.get("/v1/rumble/video/transcript", params);
|
|
491
487
|
}
|
|
492
|
-
/** Rumble Channel Videos — Rumble channel uploads — lean streams[{url,type}]; call video-details for rendition meta. (~
|
|
488
|
+
/** Rumble Channel Videos — Rumble channel uploads — lean streams[{url,type}]; call video-details for rendition meta. (~6 credits (0.6/result)) */
|
|
493
489
|
channelVideos(params) {
|
|
494
490
|
return this.core.get("/v1/rumble/channel-videos", params);
|
|
495
491
|
}
|
|
496
|
-
/** Rumble Search — Rumble keyword search — same video card shape as channel-videos (type, durationSeconds + durationText, UTC publishedAt). (~
|
|
492
|
+
/** Rumble Search — Rumble keyword search — same video card shape as channel-videos (type, durationSeconds + durationText, UTC publishedAt). (~6 credits (0.6/result)) */
|
|
497
493
|
search(params) {
|
|
498
494
|
return this.core.get("/v1/rumble/search", params);
|
|
499
495
|
}
|
|
@@ -507,15 +503,15 @@ export class TiktokShopApi {
|
|
|
507
503
|
constructor(core) {
|
|
508
504
|
this.core = core;
|
|
509
505
|
}
|
|
510
|
-
/** TikTok Shop Search — TikTok Shop keyword search — priced products with
|
|
506
|
+
/** TikTok Shop Search — TikTok Shop keyword search — priced products with rating/reviews, typed discount, seller id. (2 credits) */
|
|
511
507
|
search(params) {
|
|
512
508
|
return this.core.get("/v1/tiktok-shop/shop-search", params);
|
|
513
509
|
}
|
|
514
|
-
/** TikTok Shop Products — Store catalog with shopInfo (sold/followers/rating) + products priced with sold, rating, typed discount. (2 credits) */
|
|
510
|
+
/** TikTok Shop Products — Store catalog with shopInfo (sold/followers/rating) + products priced with sold, rating, typed discount. (2 credits (fallback: 2.8/product, min 2)) */
|
|
515
511
|
products(params) {
|
|
516
512
|
return this.core.get("/v1/tiktok-shop/shop-products", params);
|
|
517
513
|
}
|
|
518
|
-
/** TikTok Shop Product Details — PDP — price
|
|
514
|
+
/** TikTok Shop Product Details — PDP — price (sku_min when guest min is *), sold vs stock, seller id/url, images[]. Unresolved URL is 404 at 0 credits. (2 credits) */
|
|
519
515
|
productDetails(params) {
|
|
520
516
|
return this.core.get("/v1/tiktok-shop/product-details", params);
|
|
521
517
|
}
|
|
@@ -523,7 +519,7 @@ export class TiktokShopApi {
|
|
|
523
519
|
productReviews(params) {
|
|
524
520
|
return this.core.get("/v1/tiktok-shop/product-reviews", params);
|
|
525
521
|
}
|
|
526
|
-
/** TikTok Shop User Showcase — Creator Shop showcase — affiliate shelf products with per-product sold, rating, typed discount, and seller name/url. (~
|
|
522
|
+
/** TikTok Shop User Showcase — Creator Shop showcase — affiliate shelf products with per-product sold, rating, typed discount, and seller name/url. (~23 credits (2.25/result)) */
|
|
527
523
|
userShowcase(params) {
|
|
528
524
|
return this.core.get("/v1/tiktok-shop/user-showcase", params);
|
|
529
525
|
}
|
|
@@ -573,7 +569,7 @@ export class FacebookAdLibraryApi {
|
|
|
573
569
|
search(params) {
|
|
574
570
|
return this.core.get("/v1/ad-library/facebook/search", params);
|
|
575
571
|
}
|
|
576
|
-
/** Facebook Company Ads —
|
|
572
|
+
/** Facebook Company Ads — Ads for one Meta page — active by default, Meta's top-by-impressions order, sort_by and date window, same envelope as /facebook/search. (2 credits) */
|
|
577
573
|
companyAds(params) {
|
|
578
574
|
return this.core.get("/v1/ad-library/facebook/company-ads", params);
|
|
579
575
|
}
|
|
@@ -581,11 +577,11 @@ export class FacebookAdLibraryApi {
|
|
|
581
577
|
searchCompanies(params) {
|
|
582
578
|
return this.core.get("/v1/ad-library/facebook/search-companies", params);
|
|
583
579
|
}
|
|
584
|
-
/** Facebook Ad Details — One Meta ad by ID — same creative as search, plus
|
|
580
|
+
/** Facebook Ad Details — One Meta ad by ID — same creative as search, plus EU transparency data for EU-delivered ads. Flat 2 credits. (2 credits) */
|
|
585
581
|
adDetails(params) {
|
|
586
582
|
return this.core.get("/v1/ad-library/facebook/ad-details", params);
|
|
587
583
|
}
|
|
588
|
-
/** Facebook Ad
|
|
584
|
+
/** Facebook Ad Transcript — Spoken transcript of a Meta video ad with timed segments — written copy as fallback. (2 credits) */
|
|
589
585
|
adTranscript(params) {
|
|
590
586
|
return this.core.get("/v1/ad-library/facebook/ad-transcript", params);
|
|
591
587
|
}
|
|
@@ -595,11 +591,11 @@ export class TiktokAdLibraryApi {
|
|
|
595
591
|
constructor(core) {
|
|
596
592
|
this.core = core;
|
|
597
593
|
}
|
|
598
|
-
/** TikTok Ad Library Search — Search TikTok Commercial Content Library — relevance-filtered, uniform null schema (2 credits). (2 credits) */
|
|
594
|
+
/** TikTok Ad Library Search — Search TikTok Commercial Content Library — relevance-filtered, uniform null schema (2 credits native, 5 via fallback). (2 credits (5 via fallback path)) */
|
|
599
595
|
search(params) {
|
|
600
596
|
return this.core.get("/v1/ad-library/tiktok/search", params);
|
|
601
597
|
}
|
|
602
|
-
/** TikTok Creative Center Top Ads — TikTok Creative Center Top Ads — one ~20-row leaderboard page, not a library search (flat 2
|
|
598
|
+
/** TikTok Creative Center Top Ads — TikTok Creative Center Top Ads — one ~20-row leaderboard page, not a library search (flat 2; ~1/ad on the fallback path). (2 credits) */
|
|
603
599
|
topAds(params = {}) {
|
|
604
600
|
return this.core.get("/v1/ad-library/tiktok/top-ads", params);
|
|
605
601
|
}
|
|
@@ -631,7 +627,7 @@ export class LinkedinAdLibraryApi {
|
|
|
631
627
|
constructor(core) {
|
|
632
628
|
this.core = core;
|
|
633
629
|
}
|
|
634
|
-
/** LinkedIn Ad Library Search — LinkedIn publishes run dates, impressions and targeting only on a subset of creatives. Search is the SERP card; source is native
|
|
630
|
+
/** LinkedIn Ad Library Search — LinkedIn publishes run dates, impressions and targeting only on a subset of creatives. Search is the SERP card; source is native. (2 credits) */
|
|
635
631
|
searchAds(params = {}) {
|
|
636
632
|
return this.core.get("/v1/ad-library/linkedin/search-ads", params);
|
|
637
633
|
}
|
|
@@ -645,7 +641,7 @@ export class AmazonShopApi {
|
|
|
645
641
|
constructor(core) {
|
|
646
642
|
this.core = core;
|
|
647
643
|
}
|
|
648
|
-
/** Amazon Seller Storefront — Third-party seller storefronts (/sp?seller= / /s?me=) — ASIN + canonical /dp URLs, price, badges. Not influencer /shop/{handle}. (1 credit) */
|
|
644
|
+
/** Amazon Seller Storefront — Third-party seller storefronts (/sp?seller= / /s?me=) — ASIN + canonical /dp URLs, price, badges. Not influencer /shop/{handle}. (1 credit per 16 products (default limit 20 = 2)) */
|
|
649
645
|
page(params) {
|
|
650
646
|
return this.core.get("/v1/amazon-shop/page", params);
|
|
651
647
|
}
|
|
@@ -659,15 +655,15 @@ export class GithubApi {
|
|
|
659
655
|
user(params) {
|
|
660
656
|
return this.core.get("/v1/github/user", params);
|
|
661
657
|
}
|
|
662
|
-
/** GitHub Repositories — List a user's repos with sort/direction/type — opaque Link cursor (~0.4/repo). (~
|
|
658
|
+
/** GitHub Repositories — List a user's repos with sort/direction/type — opaque Link cursor (~0.4/repo). (~4 credits (0.4/result)) */
|
|
663
659
|
repositories(params) {
|
|
664
660
|
return this.core.get("/v1/github/repositories", params);
|
|
665
661
|
}
|
|
666
|
-
/** GitHub Pull Requests — List repo PRs — draft, labels, author{}, head/base, opaque Link cursor (state echoed). (~
|
|
662
|
+
/** GitHub Pull Requests — List repo PRs — draft, labels, author{}, head/base, opaque Link cursor (state echoed). (~4 credits (0.4/result)) */
|
|
667
663
|
pullRequests(params) {
|
|
668
664
|
return this.core.get("/v1/github/pull-requests", params);
|
|
669
665
|
}
|
|
670
|
-
/** GitHub Activity — Public events with typed payload (Push commits/ref, PR/issue action) — 90-event ceiling. (~
|
|
666
|
+
/** GitHub Activity — Public events with typed payload (Push commits/ref, PR/issue action) — 90-event ceiling. (~4 credits (0.4/result)) */
|
|
671
667
|
activity(params) {
|
|
672
668
|
return this.core.get("/v1/github/activity", params);
|
|
673
669
|
}
|
|
@@ -781,7 +777,7 @@ export class SnapchatApi {
|
|
|
781
777
|
constructor(core) {
|
|
782
778
|
this.core = core;
|
|
783
779
|
}
|
|
784
|
-
/** Snapchat User Profile — Snapchat profile —
|
|
780
|
+
/** Snapchat User Profile — Snapchat profile — stable identity card, millisecond timestamps, mediaType image/video (1 credit). (1 credit) */
|
|
785
781
|
userProfile(params) {
|
|
786
782
|
return this.core.get("/v1/snapchat/user-profile", params);
|
|
787
783
|
}
|
|
@@ -791,7 +787,7 @@ export class TruthSocialApi {
|
|
|
791
787
|
constructor(core) {
|
|
792
788
|
this.core = core;
|
|
793
789
|
}
|
|
794
|
-
/** Truth Social Profile — Prominent public Truth Social profiles — isPrivate/bot/group,
|
|
790
|
+
/** Truth Social Profile — Prominent public Truth Social profiles — isPrivate/bot/group, CP-F counts, avatar/banner. Flat 1 credit. (1 credit) */
|
|
795
791
|
profile(params) {
|
|
796
792
|
return this.core.get("/v1/truth-social/profile", params);
|
|
797
793
|
}
|
|
@@ -809,7 +805,7 @@ export class KickApi {
|
|
|
809
805
|
constructor(core) {
|
|
810
806
|
this.core = core;
|
|
811
807
|
}
|
|
812
|
-
/** Kick Clip — Get a Kick clip
|
|
808
|
+
/** Kick Clip — Get a Kick clip, or a channel's recent clips — 7d clip cache. Flat 1 credit. (1 credit) */
|
|
813
809
|
clip(params) {
|
|
814
810
|
return this.core.get("/v1/kick/clip", params);
|
|
815
811
|
}
|
|
@@ -849,11 +845,11 @@ export class UtilitiesApi {
|
|
|
849
845
|
analyticsCompare(params) {
|
|
850
846
|
return this.core.get("/v1/analytics/compare", params);
|
|
851
847
|
}
|
|
852
|
-
/** Video File Transcript —
|
|
848
|
+
/** Video File Transcript — AI transcription of an uploaded file — 1 credit/min; noSpeech=true and 0 credits when there is no speech. (1 credit/min) */
|
|
853
849
|
videoTranscript(params) {
|
|
854
850
|
return this.core.postMultipart("/v1/video/transcript", params);
|
|
855
851
|
}
|
|
856
|
-
/** Video File Summarizer —
|
|
852
|
+
/** Video File Summarizer — AI transcription + summary of an uploaded file — transcript included; 1 credit/min + 1. (1 credit/min +1) */
|
|
857
853
|
videoSummarize(params) {
|
|
858
854
|
return this.core.postMultipart("/v1/video/summarize", params);
|
|
859
855
|
}
|
|
@@ -867,7 +863,7 @@ export class KwaiApi {
|
|
|
867
863
|
profile(params) {
|
|
868
864
|
return this.core.get("/v1/kwai/profile", params);
|
|
869
865
|
}
|
|
870
|
-
/** Kwai User Posts — Kwai profile posts — caption ("" when none), engagement, mp4 + transcript (~1 credit/post). (~
|
|
866
|
+
/** Kwai User Posts — Kwai profile posts — caption ("" when none), engagement, mp4 + transcript (~1 credit/post). (~10 credits (1/result)) */
|
|
871
867
|
userPosts(params) {
|
|
872
868
|
return this.core.get("/v1/kwai/user-posts", params);
|
|
873
869
|
}
|
|
@@ -916,6 +912,26 @@ export class LinkmeApi {
|
|
|
916
912
|
return this.core.get("/v1/linkme/profile", params);
|
|
917
913
|
}
|
|
918
914
|
}
|
|
915
|
+
export class GoogleMapsApi {
|
|
916
|
+
core;
|
|
917
|
+
constructor(core) {
|
|
918
|
+
this.core = core;
|
|
919
|
+
}
|
|
920
|
+
/** Google Maps Business Search — Local businesses from a Maps search — name, address, phone, website, rating, hours, place id. Flat 2 credits. No emails. (2 credits) */
|
|
921
|
+
businessSearch(params) {
|
|
922
|
+
return this.core.get("/v1/google/business-search", params);
|
|
923
|
+
}
|
|
924
|
+
}
|
|
925
|
+
export class WebsiteApi {
|
|
926
|
+
core;
|
|
927
|
+
constructor(core) {
|
|
928
|
+
this.core = core;
|
|
929
|
+
}
|
|
930
|
+
/** Website Contacts — Business website → role emails, E.164 phones, social profiles. 1 credit when something is found, 0 when not. (1 credit) */
|
|
931
|
+
contacts(params) {
|
|
932
|
+
return this.core.get("/v1/website/contacts", params);
|
|
933
|
+
}
|
|
934
|
+
}
|
|
919
935
|
/** Captapi API client. Get your key at https://captapi.com/dashboard/api-keys */
|
|
920
936
|
export class Captapi {
|
|
921
937
|
youtube;
|
|
@@ -952,6 +968,8 @@ export class Captapi {
|
|
|
952
968
|
pillar;
|
|
953
969
|
linkbio;
|
|
954
970
|
linkme;
|
|
971
|
+
googleMaps;
|
|
972
|
+
website;
|
|
955
973
|
constructor(options = {}) {
|
|
956
974
|
const core = new HttpCore(options);
|
|
957
975
|
this.youtube = new YoutubeApi(core);
|
|
@@ -988,5 +1006,7 @@ export class Captapi {
|
|
|
988
1006
|
this.pillar = new PillarApi(core);
|
|
989
1007
|
this.linkbio = new LinkbioApi(core);
|
|
990
1008
|
this.linkme = new LinkmeApi(core);
|
|
1009
|
+
this.googleMaps = new GoogleMapsApi(core);
|
|
1010
|
+
this.website = new WebsiteApi(core);
|
|
991
1011
|
}
|
|
992
1012
|
}
|
package/package.json
CHANGED
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@captapi/sdk",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Official typed TypeScript SDK for the Captapi social media API — 178 endpoints across 32 platforms (YouTube, TikTok, Instagram, Facebook, X, Reddit, Threads, Bluesky, Pinterest, LinkedIn, Twitch, Spotify, and more). Zero dependencies, built on fetch.",
|
|
5
|
-
"license": "MIT",
|
|
6
|
-
"type": "module",
|
|
7
|
-
"main": "dist/index.js",
|
|
8
|
-
"types": "dist/index.d.ts",
|
|
9
|
-
"exports": {
|
|
10
|
-
".": {
|
|
11
|
-
"types": "./dist/index.d.ts",
|
|
12
|
-
"default": "./dist/index.js"
|
|
13
|
-
}
|
|
14
|
-
},
|
|
15
|
-
"files": [
|
|
16
|
-
"dist",
|
|
17
|
-
"README.md"
|
|
18
|
-
],
|
|
19
|
-
"engines": {
|
|
20
|
-
"node": ">=18"
|
|
21
|
-
},
|
|
22
|
-
"sideEffects": false,
|
|
23
|
-
"keywords": [
|
|
24
|
-
"captapi",
|
|
25
|
-
"sdk",
|
|
26
|
-
"typescript",
|
|
27
|
-
"social-media",
|
|
28
|
-
"scraping",
|
|
29
|
-
"api-client",
|
|
30
|
-
"youtube",
|
|
31
|
-
"tiktok",
|
|
32
|
-
"instagram",
|
|
33
|
-
"reddit",
|
|
34
|
-
"twitter",
|
|
35
|
-
"transcript"
|
|
36
|
-
],
|
|
37
|
-
"homepage": "https://captapi.com",
|
|
38
|
-
"repository": {
|
|
39
|
-
"type": "git",
|
|
40
|
-
"url": "https://github.com/CDCStream/captapi.git",
|
|
41
|
-
"directory": "packages/captapi-sdk"
|
|
42
|
-
},
|
|
43
|
-
"scripts": {
|
|
44
|
-
"build": "tsc",
|
|
45
|
-
"prepublishOnly": "npm run build"
|
|
46
|
-
},
|
|
47
|
-
"devDependencies": {
|
|
48
|
-
"@types/node": "^22.0.0",
|
|
49
|
-
"typescript": "^5.6.0"
|
|
50
|
-
}
|
|
51
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@captapi/sdk",
|
|
3
|
+
"version": "0.3.0",
|
|
4
|
+
"description": "Official typed TypeScript SDK for the Captapi social media API — 178 endpoints across 32 platforms (YouTube, TikTok, Instagram, Facebook, X, Reddit, Threads, Bluesky, Pinterest, LinkedIn, Twitch, Spotify, and more). Zero dependencies, built on fetch.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"main": "dist/index.js",
|
|
8
|
+
"types": "dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"default": "./dist/index.js"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"dist",
|
|
17
|
+
"README.md"
|
|
18
|
+
],
|
|
19
|
+
"engines": {
|
|
20
|
+
"node": ">=18"
|
|
21
|
+
},
|
|
22
|
+
"sideEffects": false,
|
|
23
|
+
"keywords": [
|
|
24
|
+
"captapi",
|
|
25
|
+
"sdk",
|
|
26
|
+
"typescript",
|
|
27
|
+
"social-media",
|
|
28
|
+
"scraping",
|
|
29
|
+
"api-client",
|
|
30
|
+
"youtube",
|
|
31
|
+
"tiktok",
|
|
32
|
+
"instagram",
|
|
33
|
+
"reddit",
|
|
34
|
+
"twitter",
|
|
35
|
+
"transcript"
|
|
36
|
+
],
|
|
37
|
+
"homepage": "https://captapi.com",
|
|
38
|
+
"repository": {
|
|
39
|
+
"type": "git",
|
|
40
|
+
"url": "https://github.com/CDCStream/captapi.git",
|
|
41
|
+
"directory": "packages/captapi-sdk"
|
|
42
|
+
},
|
|
43
|
+
"scripts": {
|
|
44
|
+
"build": "tsc",
|
|
45
|
+
"prepublishOnly": "npm run build"
|
|
46
|
+
},
|
|
47
|
+
"devDependencies": {
|
|
48
|
+
"@types/node": "^22.0.0",
|
|
49
|
+
"typescript": "^5.6.0"
|
|
50
|
+
}
|
|
51
|
+
}
|