Constructors

  • 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

  • get media urls from highlight id

    Parameters

    • ids: string

      of highlight

    Returns Promise<HMedia>

  • 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>

  • 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>

  • fetches user posts, with pagination

    Parameters

    • userId: string
    • next_max_id: string = ''

      get next_max_id by fetchUserPostsV2 first

    • num_posts: number = 12

      number of posts to fetch (default 12)

    Returns Promise<IPaginatedPosts>

  • fetches user posts, with pagination

    Parameters

    • username: string
    • end_cursor: string = ''

      get end_cursor by fetch user posts first

    Returns Promise<IPaginatedPosts>

    Deprecated

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

  • fetches user posts, with pagination

    Parameters

    • username: string
    • next_max_id: string = ''

      get next_max_id by fetchUserPostsV2 first

    • num_posts: number = 12

      number of posts to fetch (default 12)

    Returns Promise<IPaginatedPosts>

  • fetch user reel same as reel tab on app

    Parameters

    • username: string

      username ig

    • end_cursor: undefined | null | string = ''
    • count: number = 12

    Returns Promise<ProfileReel>

  • get user id by username

    Parameters

    • username: string

    Returns Promise<string>

  • Parameters

    • code: string

    Returns Promise<any>

  • simple method to check is user follow me

    Parameters

    • username: string

    Returns Promise<undefined | boolean>

    true if user is follow me