### Install Instagram Private API package Source: https://github.com/dilame/instagram-private-api/blob/master/README.md Commands to install the `instagram-private-api` package using npm, either from the npm registry or directly from GitHub. It's highly recommended to install `re2` to mitigate a known vulnerability. ```Shell npm install instagram-private-api ``` ```Shell npm install github:dilame/instagram-private-api ``` -------------------------------- ### Start Live Broadcast API Method Source: https://github.com/dilame/instagram-private-api/blob/master/docs/classes/repositories/LiveRepository.md Initiates a new live broadcast. The `sendNotifications` parameter controls whether followers are notified about the start of the stream. ```APIDOC start(broadcastId: string, sendNotifications?: boolean): Promise Parameters: broadcastId: string sendNotifications: boolean (Default: true) Returns: Promise ``` -------------------------------- ### Start Segmented Video Upload Source: https://github.com/dilame/instagram-private-api/blob/master/docs/classes/repositories/UploadRepository.md Begins the segmented video upload process, providing initial upload parameters for the video. ```APIDOC startSegmentedVideo(ruploadParams: any): Promise Parameters: ruploadParams: any - Parameters for starting the segmented video upload. Returns: Promise - A promise that resolves with an object containing initial upload details. ``` -------------------------------- ### Get Comment Method (TypeScript API) Source: https://github.com/dilame/instagram-private-api/blob/master/docs/classes/repositories/LiveRepository.md Retrieves comments for a live broadcast, allowing specification of the number of comments and a starting timestamp. ```APIDOC getComment(__namedParameters: Object): Promise __namedParameters: An object containing parameters for fetching comments. broadcastId: The unique identifier of the live broadcast. commentsRequested?: Optional. The number of comments to request. lastCommentTs?: Optional. The timestamp of the last comment received, used for pagination. ``` -------------------------------- ### DiscoverRepository Constructor Source: https://github.com/dilame/instagram-private-api/blob/master/docs/classes/repositories/DiscoverRepository.md Initializes a new instance of the DiscoverRepository class, requiring an IgApiClient instance. ```APIDOC constructor(client: IgApiClient) Parameters: client: IgApiClient ``` -------------------------------- ### UserRepository Class API Reference Source: https://github.com/dilame/instagram-private-api/blob/master/docs/classes/repositories/UserRepository.md Detailed API documentation for the `UserRepository` class, including its constructor and methods for interacting with user-related data on Instagram. This class provides functionalities such as retrieving account details, searching for users, and getting user information by ID or username. ```APIDOC Class: UserRepository Hierarchy: - Repository Constructor: - new UserRepository(client: IgApiClient) Parameters: - client: IgApiClient Methods: - accountDetails(id?: string | number): Promise Parameters: - id?: string | number Returns: Promise - arlinkDownloadInfo(): Promise Returns: Promise - flagUser(id: string | number): Promise Parameters: - id: string | number Returns: Promise - formerUsernames(id?: string | number): Promise Parameters: - id?: string | number Returns: Promise - getIdByUsername(username: string): Promise Parameters: - username: string Returns: Promise - info(id: string | number): Promise Parameters: - id: string | number Returns: Promise - lookup(options: UserLookupOptions): Promise Parameters: - options: UserLookupOptions Returns: Promise - search(username: string): Promise Parameters: - username: string Returns: Promise - searchExact(username: string): Promise Parameters: - username: string Returns: Promise ``` -------------------------------- ### PublishService Constructor Source: https://github.com/dilame/instagram-private-api/blob/master/docs/classes/services/PublishService.md Initializes a new instance of the `PublishService` class with the provided API client. ```APIDOC constructor(client: IgApiClient) client: IgApiClient ``` -------------------------------- ### SimulateService Class API Reference Source: https://github.com/dilame/instagram-private-api/blob/master/docs/classes/services/SimulateService.md Detailed API documentation for the `SimulateService` class, including its constructor and methods for handling Instagram login flows. ```APIDOC Class: SimulateService Description: Handles simulation services related to Instagram login flows. Hierarchy: - Repository Constructor: new SimulateService(client: IgApiClient) Parameters: - client: IgApiClient - The Instagram API client instance. Methods: postLoginFlow(concurrency?: number, toShuffle?: boolean): Promise Description: Initiates the post-login flow simulation. Parameters: - concurrency?: number - Optional concurrency limit for the flow. - toShuffle?: boolean - Optional flag to shuffle operations. Returns: Promise preLoginFlow(concurrency?: number, toShuffle?: boolean): Promise Description: Initiates the pre-login flow simulation. Parameters: - concurrency?: number - Optional concurrency limit for the flow. - toShuffle?: boolean - Optional flag to shuffle operations. Returns: Promise ``` -------------------------------- ### Get key (PollSticker API) Source: https://github.com/dilame/instagram-private-api/blob/master/docs/classes/sticker_builder/PollSticker.md Retrieves the key associated with the poll sticker. ```APIDOC Property: key Type: Getter Returns: string ``` -------------------------------- ### QpRepository Class API Reference Source: https://github.com/dilame/instagram-private-api/blob/master/docs/classes/repositories/QpRepository.md Detailed API documentation for the `QpRepository` class, outlining its inheritance, constructor, properties, and methods with their respective parameters and return types. ```APIDOC Class: QpRepository Hierarchy: Repository -> QpRepository Constructors: constructor(client: IgApiClient) Parameters: client: IgApiClient - The Instagram API client instance. Properties: surfacesToQueries: string surfacesToTriggers: string Methods: batchFetch(): Promise> Returns: Promise> getCooldowns(): Promise> Returns: Promise> ``` -------------------------------- ### msisdnHeaderBootstrap Method (APIDOC) Source: https://github.com/dilame/instagram-private-api/blob/master/docs/classes/repositories/AccountRepository.md Performs MSISDN header bootstrapping, optionally with a specified usage. ```APIDOC msisdnHeaderBootstrap(usage?: string = 'default'): Promise Parameters: usage: string (default: 'default') Returns: Promise ``` -------------------------------- ### Get id (PollSticker API) Source: https://github.com/dilame/instagram-private-api/blob/master/docs/classes/sticker_builder/PollSticker.md Retrieves the unique identifier of the poll sticker. ```APIDOC Property: id Type: Getter Returns: string ``` -------------------------------- ### DiscoverRepository topicalExplore Method Source: https://github.com/dilame/instagram-private-api/blob/master/docs/classes/repositories/DiscoverRepository.md Initiates a topical exploration, returning a promise. ```APIDOC topicalExplore(): Promise ``` -------------------------------- ### Get MentionSticker Key Source: https://github.com/dilame/instagram-private-api/blob/master/docs/classes/sticker_builder/MentionSticker.md Retrieves the unique key identifier for the mention sticker. ```APIDOC Property: key Type: string Description: Retrieves the unique key identifier for the mention sticker. ``` -------------------------------- ### Authenticate and Interact with Instagram API (TypeScript) Source: https://github.com/dilame/instagram-private-api/blob/master/README.md This TypeScript example demonstrates the basic flow for authenticating a user with the Instagram private API. It covers initializing the client, generating device IDs, performing pre-login and post-login simulations, logging in, fetching user posts, and liking a media item. ```TypeScript import { IgApiClient } from 'instagram-private-api'; import { sample } from 'lodash'; const ig = new IgApiClient(); // You must generate device id's before login. // Id's generated based on seed // So if you pass the same value as first argument - the same id's are generated every time ig.state.generateDevice(process.env.IG_USERNAME); // Optionally you can setup proxy url ig.state.proxyUrl = process.env.IG_PROXY; (async () => { // Execute all requests prior to authorization in the real Android application // Not required but recommended await ig.simulate.preLoginFlow(); const loggedInUser = await ig.account.login(process.env.IG_USERNAME, process.env.IG_PASSWORD); // The same as preLoginFlow() // Optionally wrap it to process.nextTick so we dont need to wait ending of this bunch of requests process.nextTick(async () => await ig.simulate.postLoginFlow()); // Create UserFeed instance to get loggedInUser's posts const userFeed = ig.feed.user(loggedInUser.pk); const myPostsFirstPage = await userFeed.items(); // All the feeds are auto-paginated, so you just need to call .items() sequentially to get next page const myPostsSecondPage = await userFeed.items(); await ig.media.like({ // Like our first post from first page or first post from second page randomly mediaId: sample([myPostsFirstPage[0].id, myPostsSecondPage[0].id]), moduleInfo: { module_name: 'profile', user_id: loggedInUser.pk, username: loggedInUser.username }, d: sample([0, 1]) }); })(); ``` -------------------------------- ### MediaRepository Constructor Source: https://github.com/dilame/instagram-private-api/blob/master/docs/classes/repositories/MediaRepository.md Initializes a new instance of the MediaRepository class, requiring an IgApiClient instance for its operations. ```APIDOC MediaRepository: constructor(client: IgApiClient) client: IgApiClient ``` -------------------------------- ### Get Media Likers API Documentation Source: https://github.com/dilame/instagram-private-api/blob/master/docs/classes/repositories/MediaRepository.md Retrieves a list of users who have liked a specific media item. ```APIDOC likers(id: string): Promise Parameters: id: string - The unique identifier of the media item. Returns: Promise - A promise that resolves with the list of likers. ``` -------------------------------- ### QeRepository Class API Reference Source: https://github.com/dilame/instagram-private-api/blob/master/docs/classes/repositories/QeRepository.md Comprehensive API documentation for the `QeRepository` class, including its constructor, inherited properties, and methods. This class is responsible for handling experiment synchronization operations within the Instagram private API. ```APIDOC class QeRepository Hierarchy: Repository ↳ QeRepository Constructors: constructor(client: IgApiClient) Parameters: client: IgApiClient - An instance of the Instagram API client. Methods: sync(experiments: any): Promise Description: Synchronizes a set of experiments. Parameters: experiments: any - The experiments data to synchronize. Returns: Promise - A promise that resolves with the synchronization result. syncExperiments(): Promise Description: Synchronizes general experiments. Returns: Promise - A promise that resolves with the synchronization result. syncLoginExperiments(): Promise Description: Synchronizes login-related experiments. Returns: Promise - A promise that resolves with the synchronization result. ``` -------------------------------- ### Get Live Questions Method (TypeScript API) Source: https://github.com/dilame/instagram-private-api/blob/master/docs/classes/repositories/LiveRepository.md Retrieves all active questions for a specified live broadcast. ```APIDOC getLiveQuestions(broadcastId: string): Promise broadcastId: The unique identifier of the live broadcast. ``` -------------------------------- ### API Reference for MediaRepositoryConfigureSidecarResponseInItem Interface Source: https://github.com/dilame/instagram-private-api/blob/master/docs/interfaces/responses/MediaRepositoryConfigureSidecarResponseInItem.md Defines the structure of an item within the response for configuring sidecar media, detailing properties like video duration, position, start time, and associated user information. ```APIDOC Interface: MediaRepositoryConfigureSidecarResponseInItem Properties: duration_in_video_in_sec: null position: number[] start_time_in_video_in_sec: null user: MediaRepositoryConfigureSidecarResponseUser ``` -------------------------------- ### Client Property: qe Source: https://github.com/dilame/instagram-private-api/blob/master/docs/classes/index/IgApiClient.md Accesses the QE (Quick Experiments) repository, likely related to A/B testing or feature flagging. This property is part of the main client object. ```APIDOC qe: QeRepository ``` -------------------------------- ### Get Live Presence Method (TypeScript API) Source: https://github.com/dilame/instagram-private-api/blob/master/docs/classes/repositories/LiveRepository.md Shows all online users who are ready to watch your stream. ```APIDOC getLivePresence(): Promise ``` -------------------------------- ### IgConfigureVideoError Class API Reference Source: https://github.com/dilame/instagram-private-api/blob/master/docs/classes/errors/IgConfigureVideoError.md Detailed API documentation for the `IgConfigureVideoError` class, including its inheritance, constructor parameters, instance properties, static properties, and static methods. This error is typically thrown during video configuration processes. ```APIDOC Class: IgConfigureVideoError Hierarchy: - IgUploadVideoError ↳ IgConfigureVideoError Constructors: constructor(response: IgResponse, videoInfo: any) Properties: message: string (Inherited from IgUploadVideoError) name: string (Inherited from IgUploadVideoError) response: IgResponse (Inherited from IgUploadVideoError) stack?: string (Optional, Inherited from IgUploadVideoError) text: string (Inherited from IgUploadVideoError) videoInfo: any (Inherited from IgUploadVideoError) static stackTraceLimit: number (Inherited from IgUploadVideoError) Methods: static captureStackTrace(targetObject: Object, constructorOpt?: Function): void Description: Create .stack property on a target object Parameters: targetObject: Object constructorOpt?: Function Returns: void static optional prepareStackTrace(err: Error, stackTraces: CallSite[]): any Description: Optional override for formatting stack traces Parameters: err: Error stackTraces: CallSite[] Returns: any ``` -------------------------------- ### Get Media Information API Documentation Source: https://github.com/dilame/instagram-private-api/blob/master/docs/classes/repositories/MediaRepository.md Retrieves detailed information about a specific media item using its ID. ```APIDOC info(mediaId: string): Promise Parameters: mediaId: string - The unique identifier of the media item. Returns: Promise - A promise that resolves with the media information object. ``` -------------------------------- ### Get Post Live Thumbnails Method (TypeScript API) Source: https://github.com/dilame/instagram-private-api/blob/master/docs/classes/repositories/LiveRepository.md Retrieves thumbnails generated after a live broadcast has ended. ```APIDOC getPostLiveThumbnails(broadcastId: string): Promise broadcastId: The unique identifier of the live broadcast. ``` -------------------------------- ### LauncherRepository Class API Reference Source: https://github.com/dilame/instagram-private-api/blob/master/docs/classes/repositories/LauncherRepository.md Defines the `LauncherRepository` class, a core component for managing synchronization processes before and after user login within the Instagram Private API. It provides methods for pre-login, post-login, and general data synchronization. ```APIDOC Class: LauncherRepository Hierarchy: Repository -> LauncherRepository Constructors: constructor(client: IgApiClient) client: IgApiClient - The Instagram API client instance. Methods: postLoginSync(): Promise Returns: Promise - A promise that resolves with synchronization data. preLoginSync(): Promise Returns: Promise - A promise that resolves with synchronization data. sync(data: Object): Promise data: Object - The data object to synchronize. Returns: Promise - A promise that resolves with synchronization data. ``` -------------------------------- ### Get Final Viewer List Method (TypeScript API) Source: https://github.com/dilame/instagram-private-api/blob/master/docs/classes/repositories/LiveRepository.md Retrieves the final list of viewers for a completed live broadcast. ```APIDOC getFinalViewerList(broadcastId: string): Promise broadcastId: The unique identifier of the live broadcast. ``` -------------------------------- ### HighlightsRepository Class API Reference Source: https://github.com/dilame/instagram-private-api/blob/master/docs/classes/repositories/HighlightsRepository.md API documentation for the `HighlightsRepository` class, detailing its constructor and methods for interacting with Instagram highlights. ```APIDOC Class: HighlightsRepository Hierarchy: Repository Constructor: constructor(client: IgApiClient) Parameters: client: IgApiClient Methods: createReel(options: CreateHighlightsReelOptions) Parameters: options: CreateHighlightsReelOptions Returns: Promise deleteReel(highlightId: string) Parameters: highlightId: string Returns: Promise editReel(options: EditHighlightsReelOptions) Parameters: options: EditHighlightsReelOptions Returns: Promise highlightsTray(userId: string | number) Parameters: userId: string | number Returns: Promise ``` -------------------------------- ### Get tallies (PollSticker API) Source: https://github.com/dilame/instagram-private-api/blob/master/docs/classes/sticker_builder/PollSticker.md Retrieves the tallies object for the poll sticker, containing poll results or current state. ```APIDOC Property: tallies Type: Getter Returns: Tallies ``` -------------------------------- ### configureVideo Method Source: https://github.com/dilame/instagram-private-api/blob/master/docs/classes/repositories/MediaRepository.md Configures a video upload for the main timeline. ```APIDOC configureVideo(options: MediaConfigureTimelineVideoOptions): Promise Parameters: options: MediaConfigureTimelineVideoOptions - Options for configuring the video for the timeline. Returns: Promise ``` -------------------------------- ### Get Like Count Method (TypeScript API) Source: https://github.com/dilame/instagram-private-api/blob/master/docs/classes/repositories/LiveRepository.md Retrieves the current like count for a live broadcast, optionally from a specific timestamp. ```APIDOC getLikeCount(broadcastId: string, likeTs?: string | number): Promise broadcastId: The unique identifier of the live broadcast. likeTs?: Optional. The timestamp from which to retrieve like counts. Defaults to 0. ``` -------------------------------- ### Initialize Video Upload Source: https://github.com/dilame/instagram-private-api/blob/master/docs/classes/repositories/UploadRepository.md Initiates the video upload process, preparing for the video data transfer. ```APIDOC initVideo(__namedParameters: Object): Promise Parameters: __namedParameters: Object - Parameters required to initialize the video upload. Returns: Promise - A promise that resolves with an object containing initialization details. ``` -------------------------------- ### LiveEntity Constructor (`new LiveEntity`) Source: https://github.com/dilame/instagram-private-api/blob/master/docs/classes/entities/LiveEntity.md Initializes a new instance of the `LiveEntity` class. It requires an `IgApiClient` instance to facilitate API interactions for live broadcast management. ```APIDOC constructor(client: IgApiClient) Parameters: client: IgApiClient Inherited from: Entity.constructor Defined in: src/core/repository.ts ``` -------------------------------- ### Get Tag Feed API Source: https://github.com/dilame/instagram-private-api/blob/master/docs/classes/index/FeedFactory.md Retrieves a feed for a specific tag. This method allows fetching content associated with a particular hashtag. ```APIDOC tag: Signature: tag(tag: string): TagFeed Parameters: tag: string Returns: TagFeed ``` -------------------------------- ### ConsentRepository Constructor Source: https://github.com/dilame/instagram-private-api/blob/master/docs/classes/repositories/ConsentRepository.md Initializes a new instance of the `ConsentRepository` class. It requires an `IgApiClient` instance to interact with the Instagram API. ```APIDOC constructor(client: IgApiClient) Parameters: client: IgApiClient - The Instagram API client instance. ``` -------------------------------- ### Get cookieUsername property (APIDOC) Source: https://github.com/dilame/instagram-private-api/blob/master/docs/classes/index/State.md Retrieves the username from the cookies. This property provides the username associated with the current session. ```APIDOC get cookieUsername(): string ``` -------------------------------- ### Get cookieUserId property (APIDOC) Source: https://github.com/dilame/instagram-private-api/blob/master/docs/classes/index/State.md Retrieves the user ID from the cookies. This ID uniquely identifies the logged-in user. ```APIDOC get cookieUserId(): string ``` -------------------------------- ### IgtvRepository Class API Reference Source: https://github.com/dilame/instagram-private-api/blob/master/docs/classes/repositories/IgtvRepository.md Detailed API documentation for the `IgtvRepository` class, including its constructor and methods for managing IGTV content like series creation, episode management, and search functionality. ```APIDOC Class: IgtvRepository Hierarchy: Repository -> IgtvRepository Constructors: constructor(client: IgApiClient) client: IgApiClient - The client instance for the Instagram API. Methods: allUserSeries(user: string | number, data?: object): Promise user: string | number - The user identifier. data?: object - Optional data for the request. createSeries(title: string, description?: string = ''): Promise title: string - The title of the IGTV series. description?: string - The description of the IGTV series (defaults to empty string). search(query?: string = ''): Promise query?: string - The search query string (defaults to empty string). seriesAddEpisode(series: string | number, mediaId: string): Promise series: string | number - The series identifier. mediaId: string - The media ID to add as an episode. writeSeenState(options: IgtvWriteSeenStateOptions): Promise options: IgtvWriteSeenStateOptions - Options for writing the seen state. ``` -------------------------------- ### Initialize UploadRepository with IgApiClient Source: https://github.com/dilame/instagram-private-api/blob/master/docs/classes/repositories/UploadRepository.md Initializes a new instance of the `UploadRepository` class, requiring an `IgApiClient` instance for API interactions. ```APIDOC new UploadRepository(client: IgApiClient) Parameters: client: IgApiClient - The Instagram API client instance. ``` -------------------------------- ### API Reference for DirectThreadRepositoryAddUserResponseBoldItem Interface Source: https://github.com/dilame/instagram-private-api/blob/master/docs/interfaces/responses/DirectThreadRepositoryAddUserResponseBoldItem.md Defines the structure of a bold item within the DirectThreadRepositoryAddUserResponse, typically indicating a text range with start and end positions. ```APIDOC Interface: DirectThreadRepositoryAddUserResponseBoldItem Properties: end: number start: number ``` -------------------------------- ### Get Live Questions API Method Source: https://github.com/dilame/instagram-private-api/blob/master/docs/classes/repositories/LiveRepository.md Retrieves a list of questions submitted during a live broadcast. This can be used by broadcasters to see and address audience questions. ```APIDOC getQuestions(): Promise Parameters: None Returns: Promise ``` -------------------------------- ### create method Source: https://github.com/dilame/instagram-private-api/blob/master/docs/classes/repositories/LiveRepository.md Creates a new live broadcast, with optional parameters for a message and desired preview dimensions (width and height). ```APIDOC create(options: { message?: string, previewHeight?: string | number, previewWidth?: string | number }): Promise ``` -------------------------------- ### IgApiClient Class API Reference Source: https://github.com/dilame/instagram-private-api/blob/master/docs/classes/index/IgApiClient.md Detailed API reference for the IgApiClient class, including its constructor, properties, and methods. Each property represents a specific repository for interacting with different parts of the Instagram API. ```APIDOC Class: IgApiClient Constructors: new IgApiClient() Properties: account: AccountRepository addressBook: AddressBookRepository ads: AdsRepository attribution: AttributionRepository challenge: ChallengeRepository consent: ConsentRepository creatives: CreativesRepository direct: DirectRepository directThread: DirectThreadRepository discover: DiscoverRepository entity: EntityFactory fbsearch: FbsearchRepository feed: FeedFactory friendship: FriendshipRepository highlights: HighlightsRepository igtv: IgtvRepository insights: InsightsRepository launcher: LauncherRepository linkedAccount: LinkedAccountRepository live: LiveRepository location: LocationRepository locationSearch: LocationSearchRepository loom: LoomRepository media: MediaRepository music: MusicRepository news: NewsRepository publish: PublishRepository qe: QeRepository qp: QpRepository request: Request restrictAction: RestrictActionRepository search: SearchRepository simulate: SimulateRepository state: State status: StatusRepository story: StoryRepository tag: TagRepository upload: UploadRepository user: UserRepository zr: ZrRepository Methods: destroy() ``` -------------------------------- ### Get Join Request Counts Method (TypeScript API) Source: https://github.com/dilame/instagram-private-api/blob/master/docs/classes/repositories/LiveRepository.md Retrieves counts of join requests for a live broadcast, based on various timestamps and counts. ```APIDOC getJoinRequestCounts(__namedParameters: Object): Promise __namedParameters: An object containing parameters for fetching join request counts. broadcastId: The unique identifier of the live broadcast. lastFetchTs: The timestamp of the last fetch. lastSeenTs: The timestamp of the last seen request. lastTotalCount: The last known total count of requests. ``` -------------------------------- ### Get Usertags Feed API Source: https://github.com/dilame/instagram-private-api/blob/master/docs/classes/index/FeedFactory.md Retrieves a feed of media tagged with a specific user ID. This method fetches content where a particular user has been tagged. ```APIDOC usertags: Signature: usertags(id: string | number): UsertagsFeed Parameters: id: string | number Returns: UsertagsFeed ``` -------------------------------- ### AdsRepository Constructor Source: https://github.com/dilame/instagram-private-api/blob/master/docs/classes/repositories/AdsRepository.md Initializes a new instance of the AdsRepository class. It requires an IgApiClient instance for making API requests. ```APIDOC constructor(client: IgApiClient) Parameters: client: IgApiClient Inherited from: Repository.constructor Defined in: src/core/repository.ts:7 ``` -------------------------------- ### StatusRepository Constructor Source: https://github.com/dilame/instagram-private-api/blob/master/docs/classes/repositories/StatusRepository.md Initializes a new instance of the StatusRepository class, requiring an IgApiClient instance for API interactions. ```APIDOC constructor(client: IgApiClient) Parameters: client: IgApiClient - The Instagram API client instance. ``` -------------------------------- ### Get User Feed API Source: https://github.com/dilame/instagram-private-api/blob/master/docs/classes/index/FeedFactory.md Retrieves a feed for a specific user by ID. This method fetches the main content feed for a given user profile. ```APIDOC user: Signature: user(id: string | number): UserFeed Parameters: id: string | number Returns: UserFeed ``` -------------------------------- ### APIDOC: MusicTrendingFeed Constructor Source: https://github.com/dilame/instagram-private-api/blob/master/docs/classes/feeds/MusicTrendingFeed.md Initializes a new instance of the `MusicTrendingFeed` class. It requires an `IgApiClient` instance to interact with the Instagram API. ```APIDOC constructor(client: IgApiClient) Parameters: - client: IgApiClient Inherited from: Feed.constructor ``` -------------------------------- ### Get Account Followers Feed Items Source: https://github.com/dilame/instagram-private-api/blob/master/docs/classes/feeds/AccountFollowersFeed.md Retrieves a list of account followers feed items. This method overrides the base Feed.items method. ```APIDOC items(): Promise Overrides: Feed.items Defined in: src/feeds/account-followers.feed.ts:38 ``` -------------------------------- ### LiveStartBroadcastResponseRootObject Interface Definition Source: https://github.com/dilame/instagram-private-api/blob/master/docs/interfaces/responses/LiveStartBroadcastResponseRootObject.md Defines the structure of the response object returned after successfully starting a live broadcast on Instagram. This interface specifies the expected properties and their types. ```APIDOC Interface: LiveStartBroadcastResponseRootObject Properties: media_id: string status: string ``` -------------------------------- ### Client Property: launcher Source: https://github.com/dilame/instagram-private-api/blob/master/docs/classes/index/IgApiClient.md Accesses the Launcher repository, likely related to application launch or initialization functionalities. This property is part of the main client object. ```APIDOC launcher: LauncherRepository ``` -------------------------------- ### DirectThreadRepositoryUpdateTitleResponseBoldItem Interface Definition Source: https://github.com/dilame/instagram-private-api/blob/master/docs/interfaces/responses/DirectThreadRepositoryUpdateTitleResponseBoldItem.md Defines the structure of the DirectThreadRepositoryUpdateTitleResponseBoldItem interface, which contains numerical properties 'end' and 'start'. This interface is part of the Instagram Private API responses. ```APIDOC Interface: DirectThreadRepositoryUpdateTitleResponseBoldItem Properties: end: number start: number ``` -------------------------------- ### MusicRepository Class API Documentation Source: https://github.com/dilame/instagram-private-api/blob/master/docs/classes/repositories/MusicRepository.md Detailed API specification for the `MusicRepository` class, including its constructor, parameters, and available methods with their respective parameters and return types. ```APIDOC Class: MusicRepository Hierarchy: - Repository - MusicRepository Constructors: constructor(client: IgApiClient) Parameters: client: IgApiClient Methods: genres(product?: string): Promise Description: Retrieves a list of music genres. Parameters: product?: string - Optional product identifier. Returns: Promise lyrics(trackId: string | number): Promise Description: Fetches lyrics for a specific music track. Parameters: trackId: string | number - The ID of the music track. Returns: Promise moods(product?: string): Promise Description: Retrieves a list of music moods. Parameters: product?: string - Optional product identifier. Returns: Promise ``` -------------------------------- ### IgClientError Static Methods Source: https://github.com/dilame/instagram-private-api/blob/master/docs/classes/errors/IgClientError.md Documents the static methods available on the `IgClientError` class, inherited from `CustomError`. These methods, `captureStackTrace` and `prepareStackTrace`, are used for advanced stack trace manipulation and formatting. ```APIDOC Methods: static captureStackTrace(targetObject: Object, constructorOpt?: Function): void Description: Create .stack property on a target object Parameters: targetObject: Object constructorOpt?: Function Returns: void Inherited from: CustomError.captureStackTrace Defined in: node_modules/@types/node/globals.d.ts:133 static prepareStackTrace(err: Error, stackTraces: CallSite[]): any Description: Optional override for formatting stack traces See: https://github.com/v8/v8/wiki/Stack%20Trace%20API#customizing-stack-traces Parameters: err: Error stackTraces: CallSite[] Returns: any Inherited from: CustomError.prepareStackTrace Defined in: node_modules/@types/node/globals.d.ts:140 ``` -------------------------------- ### Get additionalConfigureProperties (InstaSticker API) Source: https://github.com/dilame/instagram-private-api/blob/master/docs/classes/sticker_builder/PollSticker.md Retrieves additional configuration properties. This getter is specifically used to set the media ID when attaching media to a sticker. ```APIDOC Property: additionalConfigureProperties Type: Getter Returns: any ``` -------------------------------- ### ChallengeRepository Class API Reference Source: https://github.com/dilame/instagram-private-api/blob/master/docs/classes/repositories/ChallengeRepository.md Comprehensive API documentation for the ChallengeRepository class, including its constructor and methods for managing Instagram challenge states such as auto-handling, login review, replaying codes, resetting challenges, selecting verification methods, and sending phone numbers for verification. ```APIDOC Class: ChallengeRepository Description: All methods expects State.checkpoint to be filled with CheckpointResponse. It is filled in automatically when IgCheckpointError occurs. Hierarchy: Repository -> ChallengeRepository Constructor: new ChallengeRepository(client: IgApiClient) Methods: auto(reset?: boolean = false): Promise Parameters: reset: boolean (Default: false) deltaLoginReview(choice: "1" | "0"): Promise Description: «We detected an unusual login attempt» Parameters: choice: "1" | "0" (Description: It was me = 0, It wasn't me = 1) replay(choice: string): Promise Description: «Didn't receive your code? Get a new one» Parameters: choice: string (Description: Verification method. Phone number = 0, email = 1) reset(): Promise Description: Go back to "select_verify_method" selectVerifyMethod(choice: string, isReplay?: boolean = false): Promise Description: Select verification method. Parameters: choice: string (Description: Verification method. Phone number = 0, email = 1) isReplay: boolean (Default: false, Description: resend code) sendPhoneNumber(phoneNumber: string): Promise Parameters: phoneNumber: string ``` -------------------------------- ### Get Live Broadcast Info API Method Source: https://github.com/dilame/instagram-private-api/blob/master/docs/classes/repositories/LiveRepository.md Retrieves detailed information about a specific live broadcast. This includes metadata and status updates for the live stream. ```APIDOC info(broadcastId: string): Promise Parameters: broadcastId: string Returns: Promise ``` -------------------------------- ### Get User Story Feed API Source: https://github.com/dilame/instagram-private-api/blob/master/docs/classes/index/FeedFactory.md Retrieves the story feed for a specific user by ID. This method fetches the active stories for a given user profile. ```APIDOC userStory: Signature: userStory(userId: string | number): UserStoryFeed Parameters: userId: string | number Returns: UserStoryFeed ``` -------------------------------- ### configureToStory Method Source: https://github.com/dilame/instagram-private-api/blob/master/docs/classes/repositories/MediaRepository.md Configures a photo media item to be posted as an Instagram Story. ```APIDOC configureToStory(options: MediaConfigureStoryPhotoOptions): Promise Parameters: options: MediaConfigureStoryPhotoOptions - Options for configuring the photo for a story. Returns: Promise ``` -------------------------------- ### Get Tags Feed API Source: https://github.com/dilame/instagram-private-api/blob/master/docs/classes/index/FeedFactory.md Retrieves a feed for multiple tags, with an optional tab filter. This method provides more granular control over tag-based content retrieval. ```APIDOC tags: Signature: tags(tag: string, tab?: "top" | "recent" | "places"): TagsFeed Parameters: tag: string tab: "top" | "recent" | "places" (default: 'top') Returns: TagsFeed ``` -------------------------------- ### Property: show_one_tap_fb_share_tooltip Source: https://github.com/dilame/instagram-private-api/blob/master/docs/interfaces/responses/ListReelMediaViewerFeedResponseUpdated_media.md A boolean flag indicating whether a one-tap Facebook share tooltip should be displayed for the reel media. This helps in guiding users to share content. ```APIDOC show_one_tap_fb_share_tooltip: boolean ``` -------------------------------- ### configureToStoryVideo Method Source: https://github.com/dilame/instagram-private-api/blob/master/docs/classes/repositories/MediaRepository.md Configures a video media item to be posted as an Instagram Story. ```APIDOC configureToStoryVideo(options: MediaConfigureStoryVideoOptions): Promise Parameters: options: MediaConfigureStoryVideoOptions - Options for configuring the video for a story. Returns: Promise ``` -------------------------------- ### SearchService Class API Reference Source: https://github.com/dilame/instagram-private-api/blob/master/docs/classes/services/SearchService.md Comprehensive API reference for the `SearchService` class, detailing its initialization and all available search methods with their parameters and return types. ```APIDOC Class: SearchService Hierarchy: Repository Constructors: constructor(client: IgApiClient) client: IgApiClient - The Instagram API client instance. Methods: blended(query: string): Promise query: string - The search query string. Returns: Promise - A promise that resolves to an array of blended search results. blendedItems(query: string): Promise<(FbsearchRepositoryTopsearchFlatResponseUser | FbsearchRepositoryTopsearchFlatResponseHashtag | FbsearchRepositoryTopsearchFlatResponsePlace)[]> query: string - The search query string. Returns: Promise<(FbsearchRepositoryTopsearchFlatResponseUser | FbsearchRepositoryTopsearchFlatResponseHashtag | FbsearchRepositoryTopsearchFlatResponsePlace)[]> - A promise that resolves to an array of blended search items (users, hashtags, or places). location(latitude: number, longitude: number, query?: string): Promise latitude: number - The latitude for location search. longitude: number - The longitude for location search. query?: string - Optional search query string for locations. Returns: Promise - A promise that resolves to an array of location search results (venues). places(query: string): Promise query: string - The search query string. Returns: Promise - A promise that resolves to an array of place search results. tags(query: string): Promise query: string - The search query string. Returns: Promise - A promise that resolves to an array of tag search results. users(query: string): Promise query: string - The search query string. Returns: Promise - A promise that resolves to an array of user search results. ``` -------------------------------- ### Get Live Viewer List API Method Source: https://github.com/dilame/instagram-private-api/blob/master/docs/classes/repositories/LiveRepository.md Fetches the list of viewers currently watching a specific live broadcast. This provides real-time audience information for the broadcaster. ```APIDOC getViewerList(broadcastId: string): Promise Parameters: broadcastId: string Returns: Promise ``` -------------------------------- ### Get signatureVersion property (APIDOC) Source: https://github.com/dilame/instagram-private-api/blob/master/docs/classes/index/State.md Retrieves the version of the signature algorithm or scheme in use. This helps in managing compatibility and updates for security protocols. ```APIDOC get signatureVersion(): string ``` -------------------------------- ### ProfileEntity Class API Documentation Source: https://github.com/dilame/instagram-private-api/blob/master/docs/classes/entities/ProfileEntity.md Comprehensive API documentation for the `ProfileEntity` class, including its inheritance hierarchy, constructor parameters, properties, and available methods with their return types. ```APIDOC Class: ProfileEntity Hierarchy: - Entity - ProfileEntity - AccountFollowersFeedResponseUsersItem - DiscoverFeedResponseUser - PendingFriendshipsFeedResponseUsersItem - BestiesFeedResponseUsersItem - AccountFollowingFeedResponseUsersItem Constructors: - constructor(client: IgApiClient) Properties: - pk: string | number Methods: - checkFollow(): Promise - checkUnfollow(): Promise ``` -------------------------------- ### Get signatureKey property (APIDOC) Source: https://github.com/dilame/instagram-private-api/blob/master/docs/classes/index/State.md Retrieves the signature key used for cryptographic operations. This key is crucial for ensuring data integrity and authenticity. ```APIDOC get signatureKey(): string ``` -------------------------------- ### Client Property: qp Source: https://github.com/dilame/instagram-private-api/blob/master/docs/classes/index/IgApiClient.md Accesses the QP (Questionnaire Platform) repository, likely related to surveys or interactive questions. This property is part of the main client object. ```APIDOC qp: QpRepository ``` -------------------------------- ### DiscoverRepository markSuSeen Method Source: https://github.com/dilame/instagram-private-api/blob/master/docs/classes/repositories/DiscoverRepository.md Marks a suggestion as seen, returning a promise that resolves upon completion. ```APIDOC markSuSeen(): Promise ``` -------------------------------- ### Get fbAnalyticsApplicationId property (APIDOC) Source: https://github.com/dilame/instagram-private-api/blob/master/docs/classes/index/State.md Retrieves the Facebook Analytics Application ID. This ID is used for tracking and analytics related to Facebook integrations. ```APIDOC get fbAnalyticsApplicationId(): string ``` -------------------------------- ### configureToIgtv Method Source: https://github.com/dilame/instagram-private-api/blob/master/docs/classes/repositories/MediaRepository.md Configures a video media item specifically for IGTV (Instagram TV). ```APIDOC configureToIgtv(options: MediaConfigureToIgtvOptions): Promise Parameters: options: MediaConfigureToIgtvOptions - Options for configuring the video for IGTV. Returns: Promise ``` -------------------------------- ### Get Timeline Feed API Source: https://github.com/dilame/instagram-private-api/blob/master/docs/classes/index/FeedFactory.md Retrieves the user's timeline feed, optionally with a specified reason. This method fetches the main feed content for the authenticated user. ```APIDOC timeline: Signature: timeline(reason?: TimelineFeedReason): TimelineFeed Parameters: reason: TimelineFeedReason (optional) Returns: TimelineFeed ``` -------------------------------- ### Get StoriesInsightsFeed items$ observable (TypeScript API) Source: https://github.com/dilame/instagram-private-api/blob/master/docs/classes/feeds/StoriesInsightsFeed.md Provides an observable stream of items, typically used for reactive programming. It returns an `Observable` emitting arrays of `Item`. ```APIDOC get items$(): Observable Returns: Observable - An observable stream of item arrays. Defined in: src/core/feed.ts:18 ``` -------------------------------- ### Static Method: question (Instagram Private API) Source: https://github.com/dilame/instagram-private-api/blob/master/docs/classes/sticker_builder/StickerBuilder.md API reference for the `question` static method, designed to create a question sticker for Instagram stories. It takes sticker options tailored for question-and-answer interactions. ```APIDOC Static question(options: StickerOptions): QuestionSticker Parameters: options: StickerOptions Returns: QuestionSticker ``` -------------------------------- ### Get userBreadcrumbKey property (APIDOC) Source: https://github.com/dilame/instagram-private-api/blob/master/docs/classes/index/State.md Retrieves a key used for user breadcrumbs or tracking user activity. This can be used for debugging, analytics, or crash reporting. ```APIDOC get userBreadcrumbKey(): string ``` -------------------------------- ### LiveRepository constructor Source: https://github.com/dilame/instagram-private-api/blob/master/docs/classes/repositories/LiveRepository.md Initializes a new instance of the LiveRepository class, requiring an IgApiClient instance to interact with the Instagram API. ```APIDOC new LiveRepository(client: IgApiClient) ``` -------------------------------- ### Get pigeonSessionId property (APIDOC) Source: https://github.com/dilame/instagram-private-api/blob/master/docs/classes/index/State.md Retrieves the Pigeon session ID. This ID is likely associated with a specific messaging or communication protocol used by the application. ```APIDOC get pigeonSessionId(): string ``` -------------------------------- ### AttributionRepository Class API Reference Source: https://github.com/dilame/instagram-private-api/blob/master/docs/classes/repositories/AttributionRepository.md Detailed API documentation for the `AttributionRepository` class, including its constructor and methods for logging attribution. ```APIDOC Class: AttributionRepository Hierarchy: Repository -> AttributionRepository Constructors: constructor(client: IgApiClient) Parameters: client: IgApiClient Inherited from: Repository.constructor Methods: logAttribution(): Promise logResurrectAttribution(): Promise ``` -------------------------------- ### Get fbOrcaApplicationId property (APIDOC) Source: https://github.com/dilame/instagram-private-api/blob/master/docs/classes/index/State.md Retrieves the Facebook Orca Application ID. This ID is likely related to specific Facebook internal applications or services. ```APIDOC get fbOrcaApplicationId(): string ``` -------------------------------- ### AttachmentSticker Class API Reference Source: https://github.com/dilame/instagram-private-api/blob/master/docs/classes/sticker_builder/AttachmentSticker.md Detailed API documentation for the `AttachmentSticker` class, including its hierarchy, constructor, properties, accessors, and methods. ```APIDOC Class: AttachmentSticker Extends: InstaSticker Constructors: constructor(): void Inherited from InstaSticker.constructor Properties: height: number = 0.67 (Overrides InstaSticker.height) isSticker: boolean = true (Inherited from InstaSticker.isSticker) mediaId: string mediaOwnerId: string rotation: number = 0.0 (Inherited from InstaSticker.rotation) width: number = 0.8 (Overrides InstaSticker.width) x: number = 0.0 (Inherited from InstaSticker.x) y: number = 0.0 (Inherited from InstaSticker.y) z: number = 0 (Inherited from InstaSticker.z) Accessors: get additionalConfigureProperties(): any get id(): string get key(): string Methods: bottom(): void center(): void left(): void moveBackwards(): void moveForward(): void right(): void rotateDeg(): void scale(): void toJSON(): any top(): void ``` -------------------------------- ### Get devicePayload property (APIDOC) Source: https://github.com/dilame/instagram-private-api/blob/master/docs/classes/index/State.md Retrieves an object containing various device-specific information. This payload is often used for authentication or device identification purposes. ```APIDOC get devicePayload(): Object Properties: android_release: string android_version: string manufacturer: string model: string ``` -------------------------------- ### Create Question Method (TypeScript API) Source: https://github.com/dilame/instagram-private-api/blob/master/docs/classes/repositories/LiveRepository.md Creates a new question for a specified live broadcast. ```APIDOC createQuestion(broadcastId: string, question: string): Promise broadcastId: The unique identifier of the live broadcast. question: The text content of the question to be created. ``` -------------------------------- ### Get cookieCsrfToken property (APIDOC) Source: https://github.com/dilame/instagram-private-api/blob/master/docs/classes/index/State.md Retrieves the CSRF token from the cookies. This token is essential for protecting against cross-site request forgery attacks in web applications. ```APIDOC get cookieCsrfToken(): string ``` -------------------------------- ### Get challengeUrl property (APIDOC) Source: https://github.com/dilame/instagram-private-api/blob/master/docs/classes/index/State.md Retrieves the challenge URL string from the state. This property is typically used for handling security challenges or verification flows. ```APIDOC get challengeUrl(): string ```