@@ -2,11 +2,16 @@ import type { CreatorCrawl } from '../client'
22import type { JsonRecord , RequestOptions } from '../types'
33
44export 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 }
68export 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
1116export 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}
0 commit comments