Search packages, repositories and app categories

Package detailsv0.2.3

instagram_public_api

Flutter package to get Instagram user details and download posts.

AndroidiOSWebmacOSWindowsLinux
30-day downloads
30
Likes
66
Pub points
140

Install package

flutter pub add instagram_public_api

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

A Flutter package that enables developers to fetch public Instagram user details and download media posts directly from Instagram's public API. It supports multiple platforms including Android, iOS, Web, macOS, Windows, and Linux, making it ideal for cross-platform social media applications. The package simplifies integration with Instagram's public data without requiring authentication, allowing access to profile information and image/video content. It is particularly useful for apps focused on social media aggregation, content discovery, or analytics.

Use cases

  • Social media content aggregation
  • User profile information retrieval
  • Media post downloading
  • Content discovery tools
  • Analytics dashboards

Key features

  • Cross-platform support
  • Public data access
  • Profile and post retrieval
  • No authentication required
  • Easy integration with Flutter

Suitable for

  • Flutter developers building social apps
  • Apps needing public Instagram data
  • Content scrapers for public posts
  • Cross-platform social media tools

Considerations

  • Limited to public data only
  • No access to private accounts
  • Rate limiting may apply
  • Depends on Instagram's public API stability

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

instagram_public_api

Flutter package to get Instagram user details and download posts.

How to Use

To use instagram_public_api, first start by importing the package.

import 'package:instagram_public_api/instagram_public_api.dart';

Get profile details

  FlutterInsta insta = FlutterInsta();
  //Get Profile Details(must be public)
  InstaProfileData user = await insta.getProfileData("thefluttercommunity");
  print(user.username);
  print(user.profilePicURL);
  print(user.bio);
  print(user.externalURL);
  print(user.followers);
  print(user.following);
  print(user.isVerified);
  print(user.isPrivate);
  print(user.username);

Get Pots details

//Get Post Details (Post with nested images and video and details) (must be public)
  final List<InstaPost> post = await FlutterInsta().getPostData(
      "https://www.instagram.com/p/CLXXql8gwpo/?utm_source=ig_web_copy_link");
  for (int i = 0; i < post.length; i++) {
    print(post[i].dimensions);
    print(post[i].displayURL); //post download url
    print(post[i].postType);
    print(post[i].thumbnailDimensions);
    print(post[i].thumbnailUrl);
    print(post[i].user.followers);
    print(post[i].user.isPrivate);
    print(post[i].user.isVerified);
    print(post[i].user.posts);
    print(post[i].user.profilePicURL);
    print(post[i]..user.username);
    print(post[i].videoDuration);
  }

Project Created & Maintained By

Gunanithi

Passionate #Flutter, #Android Developer. #UI Designer.

Currently Available Methods

  • InstaProfileData getProfileData() returns user details

  • List<InstaPost> getPostData() returns Post Details (Post with nested images and video and details)

The limitations or problems you may bump into using this package.

Rate limiting:

Instagram allows a maximum of around 200–300 request hits per hour. After reaching the limit, you’ll start getting the server error.

No Insight Data:

You cannot get Instagram insight data using this API. Look into FB Instagram Insight API.

No Private Account Data:

Since this works on publically available API’s, you cannot get private account data.

Inspired from this article

Getting Started

This project is a starting point for a Dart package, a library module containing code that can be shared easily across multiple Flutter or Dart projects.

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

Categories

Dependencies

Dependency list 1 items

Source repository

Projects using this package

No data available yet.