Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • igApi

Index

Constructors

  • new igApi(IgCookie?: string, AxiosOpts?: AxiosRequestConfig<any>): igApi
  • Recommended to set cookie for most all IG Request

    Parameters

    • IgCookie: string = ''

      cookie you can get it by using getSessionId function, see README.md or example file

    • AxiosOpts: AxiosRequestConfig<any> = {}

    Returns igApi

Properties

AxiosOpts: AxiosRequestConfig<any> = {}

Methods

  • _getReels(ids: string): Promise<HMedia>
  • get media urls from highlight id

    Parameters

    • ids: string

      of highlight

    Returns Promise<HMedia>

  • _getReelsIds(username: string): Promise<ReelsIds[]>
  • Fetch all reels/highlight id

    Parameters

    • username: string

    Returns Promise<ReelsIds[]>

  • fetches highlight metadata

    Parameters

    • username: string

      username target to fetch the highlights, also work with private profile if you use cookie \w your account that follows target account

    Returns Promise<IHighlightsMetadata>

  • fetchPostByMediaId(mediaId: string | number): Promise<IRawBody>
  • fetchPostByShortcode(shortcode: string): Promise<PostGraphQL>
  • fetches stories metadata

    Parameters

    • username: string

      username target to fetch the stories, also work with private profile if you use cookie \w your account that follows target account

    Returns Promise<IGStoriesMetadata>

  • fetch profile by username. including email, phone number

    Parameters

    • username: string

    Returns Promise<IGUserMetadata>

  • fetchUserPosts(username: string, end_cursor?: string): Promise<IPaginatedPosts>
  • fetches user posts, with pagination

    deprecated

    Does not return all information about a post, use fetchUserPostsV2()

    Parameters

    • username: string
    • end_cursor: string = ''

      get end_cursor by fetch user posts first

    Returns Promise<IPaginatedPosts>

  • fetchUserPostsV2(username: string, end_cursor?: string): Promise<IPaginatedPosts>
  • fetches user posts, with pagination

    Parameters

    • username: string
    • end_cursor: string = ''

      get end_cursor by fetchUserPostsV2 first

    Returns Promise<IPaginatedPosts>

  • getIdByUsername(username: string): Promise<string>
  • get user id by username

    Parameters

    • username: string

    Returns Promise<string>

  • isFollowMe(username: string): Promise<undefined | boolean>
  • simple method to check is user follow me

    Parameters

    • username: string

    Returns Promise<undefined | boolean>

    true if user is follow me

  • searchFollower(userId: string, seachTerm: string): Promise<ISearchFollow>
  • searchFollowing(userId: string, seachTerm: string): Promise<ISearchFollow>

Generated using TypeDoc