Skip to content

Commit 3d82561

Browse files
simonbalfeclaude
andcommitted
v0.2.0: full 1:1 parity with API (58 endpoints)
Fixes wrong URL paths in v0.1.0 (e.g. /tiktok/profile-videos was incorrect — real path is /tiktok/profile/videos). Adds all missing endpoints to reach parity with the API surface. TikTok: 7 -> 20 endpoints (added creator-transcripts, followers, following, live, song-details, song-videos, search-top, search-hashtag, popular-creators, popular-hashtags, popular-songs, popular-videos, trending-feed) Instagram: 6 -> 11 endpoints (added basic-profile, story-highlights, highlights-details, search-reels, embed) YouTube: 8 -> 10 endpoints (added search-hashtag, trending-shorts) LinkedIn / Twitter / Reddit: already at parity, query param types corrected (e.g. linkedin.adsSearch now accepts the real company/keyword/companyId/etc params instead of a generic 'query'). BREAKING from v0.1.0: - All TikTok paths changed (hyphen -> slash). v0.1.0 was non-functional. - Param renames: profileVideos.maxCursor -> max_cursor, etc. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent e3683b3 commit 3d82561

8 files changed

Lines changed: 291 additions & 57 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@creatorcrawl/sdk",
3-
"version": "0.1.1",
3+
"version": "0.2.0",
44
"description": "Official TypeScript SDK for the CreatorCrawl social media data API. Scrape TikTok, Instagram, YouTube, LinkedIn, Twitter/X, and Reddit profiles, posts, comments, transcripts, and ads.",
55
"license": "MIT",
66
"author": "CreatorCrawl <support@creatorcrawl.com>",

src/index.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,37 @@ export {
99
export type { CreatorCrawlOptions, JsonRecord, RequestOptions } from './types'
1010
export type {
1111
TikTokCommentsParams,
12+
TikTokCreatorTranscriptsParams,
13+
TikTokFollowersParams,
14+
TikTokFollowingParams,
15+
TikTokLiveParams,
16+
TikTokPopularCreatorsParams,
17+
TikTokPopularHashtagsParams,
18+
TikTokPopularSongsParams,
19+
TikTokPopularVideosParams,
1220
TikTokProfileParams,
1321
TikTokProfileVideosParams,
22+
TikTokSearchHashtagParams,
1423
TikTokSearchKeywordParams,
24+
TikTokSearchTopParams,
1525
TikTokSearchUsersParams,
26+
TikTokSongDetailsParams,
27+
TikTokSongVideosParams,
1628
TikTokTranscriptParams,
29+
TikTokTrendingFeedParams,
1730
TikTokVideoInfoParams,
1831
} from './resources/tiktok'
1932
export type {
33+
InstagramBasicProfileParams,
2034
InstagramCommentsParams,
35+
InstagramEmbedParams,
36+
InstagramHighlightsDetailsParams,
2137
InstagramPostInfoParams,
2238
InstagramPostsParams,
2339
InstagramProfileParams,
2440
InstagramReelsParams,
41+
InstagramSearchReelsParams,
42+
InstagramStoryHighlightsParams,
2543
InstagramTranscriptParams,
2644
} from './resources/instagram'
2745
export type {
@@ -30,8 +48,10 @@ export type {
3048
YouTubeChannelVideosParams,
3149
YouTubeCommentsParams,
3250
YouTubePlaylistParams,
51+
YouTubeSearchHashtagParams,
3352
YouTubeSearchParams,
3453
YouTubeTranscriptParams,
54+
YouTubeTrendingShortsParams,
3555
YouTubeVideoParams,
3656
} from './resources/youtube'
3757
export type {

src/resources/instagram.ts

Lines changed: 36 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,16 @@ import type { CreatorCrawl } from '../client'
22
import type { JsonRecord, RequestOptions } from '../types'
33

44
export type InstagramProfileParams = { handle: string }
5-
export type InstagramPostsParams = { handle: string; cursor?: string }
5+
export type InstagramBasicProfileParams = { userId: string }
6+
export type InstagramPostsParams = { handle: string; next_max_id?: string }
7+
export type InstagramReelsParams = { user_id?: string; handle?: string; max_id?: string }
68
export type InstagramPostInfoParams = { url: string }
7-
export type InstagramReelsParams = { handle: string }
8-
export type InstagramCommentsParams = { url: string }
9-
export type InstagramTranscriptParams = { url: string; language?: string }
9+
export type InstagramCommentsParams = { url: string; cursor?: string }
10+
export type InstagramTranscriptParams = { url: string }
11+
export type InstagramStoryHighlightsParams = { user_id?: string; handle?: string }
12+
export type InstagramHighlightsDetailsParams = { id: string }
13+
export type InstagramSearchReelsParams = { query: string }
14+
export type InstagramEmbedParams = { handle: string }
1015

1116
export class Instagram {
1217
constructor(private readonly client: CreatorCrawl) {}
@@ -15,23 +20,43 @@ export class Instagram {
1520
return this.client.get<JsonRecord>('/instagram/profile', params, options)
1621
}
1722

18-
posts(params: InstagramPostsParams, options?: RequestOptions) {
19-
return this.client.get<JsonRecord>('/instagram/posts', params, options)
23+
basicProfile(params: InstagramBasicProfileParams, options?: RequestOptions) {
24+
return this.client.get<JsonRecord>('/instagram/basic-profile', params, options)
2025
}
2126

22-
postInfo(params: InstagramPostInfoParams, options?: RequestOptions) {
23-
return this.client.get<JsonRecord>('/instagram/post-info', params, options)
27+
posts(params: InstagramPostsParams, options?: RequestOptions) {
28+
return this.client.get<JsonRecord>('/instagram/user/posts', params, options)
2429
}
2530

2631
reels(params: InstagramReelsParams, options?: RequestOptions) {
27-
return this.client.get<JsonRecord>('/instagram/reels', params, options)
32+
return this.client.get<JsonRecord>('/instagram/user/reels', params, options)
33+
}
34+
35+
postInfo(params: InstagramPostInfoParams, options?: RequestOptions) {
36+
return this.client.get<JsonRecord>('/instagram/post', params, options)
2837
}
2938

3039
comments(params: InstagramCommentsParams, options?: RequestOptions) {
31-
return this.client.get<JsonRecord>('/instagram/comments', params, options)
40+
return this.client.get<JsonRecord>('/instagram/post/comments', params, options)
3241
}
3342

3443
transcript(params: InstagramTranscriptParams, options?: RequestOptions) {
35-
return this.client.get<JsonRecord>('/instagram/transcript', params, options)
44+
return this.client.get<JsonRecord>('/instagram/media/transcript', params, options)
45+
}
46+
47+
storyHighlights(params: InstagramStoryHighlightsParams = {}, options?: RequestOptions) {
48+
return this.client.get<JsonRecord>('/instagram/user/highlights', params, options)
49+
}
50+
51+
highlightsDetails(params: InstagramHighlightsDetailsParams, options?: RequestOptions) {
52+
return this.client.get<JsonRecord>('/instagram/user/highlight/detail', params, options)
53+
}
54+
55+
searchReels(params: InstagramSearchReelsParams, options?: RequestOptions) {
56+
return this.client.get<JsonRecord>('/instagram/reels/search', params, options)
57+
}
58+
59+
embed(params: InstagramEmbedParams, options?: RequestOptions) {
60+
return this.client.get<JsonRecord>('/instagram/user/embed', params, options)
3661
}
3762
}

src/resources/linkedin.ts

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,17 @@ import type { JsonRecord, RequestOptions } from '../types'
33

44
export type LinkedInProfileParams = { url: string }
55
export type LinkedInCompanyParams = { url: string }
6-
export type LinkedInCompanyPostsParams = { url: string; cursor?: string }
6+
export type LinkedInCompanyPostsParams = { url: string; page?: number | string }
77
export type LinkedInPostParams = { url: string }
8-
export type LinkedInAdsSearchParams = { query: string; cursor?: string }
8+
export type LinkedInAdsSearchParams = {
9+
company?: string
10+
keyword?: string
11+
companyId?: string
12+
countries?: string
13+
startDate?: string
14+
endDate?: string
15+
paginationToken?: string
16+
}
917
export type LinkedInAdParams = { url: string }
1018

1119
export class LinkedIn {
@@ -27,7 +35,7 @@ export class LinkedIn {
2735
return this.client.get<JsonRecord>('/linkedin/post', params, options)
2836
}
2937

30-
adsSearch(params: LinkedInAdsSearchParams, options?: RequestOptions) {
38+
adsSearch(params: LinkedInAdsSearchParams = {}, options?: RequestOptions) {
3139
return this.client.get<JsonRecord>('/linkedin/ads/search', params, options)
3240
}
3341

src/resources/reddit.ts

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,33 @@
11
import type { CreatorCrawl } from '../client'
22
import type { JsonRecord, RequestOptions } from '../types'
33

4-
export type RedditSearchParams = { query: string; sort?: string; cursor?: string }
5-
export type RedditSubredditDetailsParams = { subreddit: string }
4+
export type RedditSearchParams = {
5+
query: string
6+
sort?: string
7+
timeframe?: string
8+
after?: string
9+
trim?: boolean | string
10+
}
11+
export type RedditSubredditDetailsParams = { subreddit?: string; url?: string }
612
export type RedditSubredditPostsParams = {
713
subreddit: string
14+
timeframe?: string
15+
sort?: string
16+
after?: string
17+
trim?: boolean | string
18+
}
19+
export type RedditSubredditSearchParams = {
20+
subreddit: string
21+
query: string
822
sort?: string
923
timeframe?: string
1024
cursor?: string
1125
}
12-
export type RedditSubredditSearchParams = { subreddit: string; query: string; cursor?: string }
13-
export type RedditPostCommentsParams = { url: string; cursor?: string }
26+
export type RedditPostCommentsParams = {
27+
url: string
28+
cursor?: string
29+
trim?: boolean | string
30+
}
1431

1532
export class Reddit {
1633
constructor(private readonly client: CreatorCrawl) {}
@@ -20,18 +37,18 @@ export class Reddit {
2037
}
2138

2239
subredditDetails(params: RedditSubredditDetailsParams, options?: RequestOptions) {
23-
return this.client.get<JsonRecord>('/reddit/subreddit-details', params, options)
40+
return this.client.get<JsonRecord>('/reddit/subreddit/details', params, options)
2441
}
2542

2643
subredditPosts(params: RedditSubredditPostsParams, options?: RequestOptions) {
27-
return this.client.get<JsonRecord>('/reddit/subreddit-posts', params, options)
44+
return this.client.get<JsonRecord>('/reddit/subreddit/posts', params, options)
2845
}
2946

3047
subredditSearch(params: RedditSubredditSearchParams, options?: RequestOptions) {
31-
return this.client.get<JsonRecord>('/reddit/subreddit-search', params, options)
48+
return this.client.get<JsonRecord>('/reddit/subreddit/search', params, options)
3249
}
3350

3451
postComments(params: RedditPostCommentsParams, options?: RequestOptions) {
35-
return this.client.get<JsonRecord>('/reddit/post-comments', params, options)
52+
return this.client.get<JsonRecord>('/reddit/post/comments', params, options)
3653
}
3754
}

0 commit comments

Comments
 (0)