Package to get details of the Instagram user and download reels video.

Overview

Flutter package to get Instagram user details and download reels videos.

How to Use

To use flutter_insta, first start by importing the package.

import 'package:flutter_insta/flutter_insta.dart';

Get profile details

FlutterInsta flutterInsta = new FlutterInsta();
await flutterInsta.getProfileData("coding_boy_); //instagram username

Print Details

print("Username : ${flutterInsta.username}");
print("Followers : ${flutterInsta.followers}");
print("Folowing : ${flutterInsta.following}");
print("Bio : ${flutterInsta.bio}");
print("Website : ${flutterInsta.website}");
print("Profile Image : ${flutterInsta.imgurl}");
print("Feed images":${flutterInsta.feedImagesUrl}");

Download Reels video

String downloadLink =  await flutterInsta.downloadReels("https://www.instagram.com/reel/CDlGkdZgB2y/"); //URL

Example

Click here for more Example

Created by Viral Vaghela

Comments
  • FormatException: Unexpected character (at character 1)

    FormatException: Unexpected character (at character 1)

    Still getting an error after the pull requests its a very important project for me I can make you a collaborator on my GitHub repository there you can solve it, please!

    [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: FormatException: Unexpected character (at character 1) E/flutter (24926): <!DOCTYPE html> E/flutter (24926): ^ E/flutter (24926): E/flutter (24926): #0 _ChunkedJsonParser.fail (dart:convert-patch/convert_patch.dart:1394:5) E/flutter (24926): #1 _ChunkedJsonParser.parseNumber (dart:convert-patch/convert_patch.dart:1261:9) E/flutter (24926): #2 _ChunkedJsonParser.parse (dart:convert-patch/convert_patch.dart:926:22) E/flutter (24926): #3 _parseJson (dart:convert-patch/convert_patch.dart:31:10) E/flutter (24926): #4 JsonDecoder.convert (dart:convert/json.dart:505:36) E/flutter (24926): #5 JsonCodec.decode (dart:convert/json.dart:153:41) E/flutter (24926): #6 FlutterInsta.getProfileData package:flutter_insta/flutter_insta.dart:25 E/flutter (24926): <asynchronous suspension> E/flutter (24926): #7 _HomePageState.printDetails package:flutter_insta_example/main.dart:85 E/flutter (24926): #8 _HomePageState.homePage.<anonymous closure> package:flutter_insta_example/main.dart:111 E/flutter (24926): #9 _InkResponseState._handleTap package:flutter/…/material/ink_well.dart:779 E/flutter (24926): #10 _InkResponseState.build.<anonymous closure> package:flutter/…/material/ink_well.dart:862 E/flutter (24926): #11 GestureRecognizer.invokeCallback package:flutter/…/gestures/recognizer.dart:182 E/flutter (24926): #12 TapGestureRecognizer.handleTapUp package:flutter/…/gestures/tap.dart:504 E/flutter (24926): #13 BaseTapGestureRecognizer._checkUp package:flutter/…/gestures/tap.dart:282 E/flutter (24926): #14 BaseTapGestureRecognizer.acceptGesture package:flutter/…/gestures/tap.dart:254 E/flutter (24926): #15 GestureArenaManager.sweep package:flutter/…/gestures/arena.dart:156 E/flutter (24926): #16 GestureBinding.handleEvent package:flutter/…/gestures/binding.dart:222 E/flutter (24926): #17 GestureBinding.dispatchEvent package:flutter/…/gestures/binding.dart:198 E/flutter (24926): #18 GestureBinding._handlePointerEvent

    Hacktoberfest 
    opened by deveshgarg-max 26
  • Getting exception while downloading video

    Getting exception while downloading video

    Version: flutter_insta 0.1.0

    I have checkout master branch and run example module for test, while trying to download video then getting exception Unhandled FormatException.

    More details on the stack trace below:

    E/flutter (23433): [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: FormatException: Unexpected character (at character 1)
    E/flutter (23433): <!DOCTYPE html>
    E/flutter (23433): ^
    E/flutter (23433): 
    E/flutter (23433): #0      _ChunkedJsonParser.fail (dart:convert-patch/convert_patch.dart:1394:5)
    E/flutter (23433): #1      _ChunkedJsonParser.parseNumber (dart:convert-patch/convert_patch.dart:1261:9)
    E/flutter (23433): #2      _ChunkedJsonParser.parse (dart:convert-patch/convert_patch.dart:926:22)
    E/flutter (23433): #3      _parseJson (dart:convert-patch/convert_patch.dart:31:10)
    E/flutter (23433): #4      JsonDecoder.convert (dart:convert/json.dart:505:36)
    E/flutter (23433): #5      JsonCodec.decode (dart:convert/json.dart:153:41)
    E/flutter (23433): #6      FlutterInsta.downloadReels (package:flutter_insta/flutter_insta.dart:12:21)
    E/flutter (23433): <asynchronous suspension>
    E/flutter (23433): #7      _HomePageState.download (package:flutter_insta_example/main.dart:223:41)
    E/flutter (23433): #8      _HomePageState.ReelPage.<anonymous closure> (package:flutter_insta_example/main.dart:207:13)
    E/flutter (23433): #9      _InkResponseState._handleTap (package:flutter/src/material/ink_well.dart:779:19)
    E/flutter (23433): #10     _InkResponseState.build.<anonymous closure> (package:flutter/src/material/ink_well.dart:862:36)
    E/flutter (23433): #11     GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:182:24)
    E/flutter (23433): #12     TapGestureRecognizer.handleTapUp (package:flutter/src/gestures/tap.dart:504:11)
    E/flutter (23433): #13     BaseTapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:282:5)
    E/flutter (23433): #14     BaseTapGestureRecognizer.acceptGesture (package:flutter/src/gestures/tap.dart:254:7)
    E/flutter (23433): #15     GestureArenaManager.sweep (package:flutter/src/gestures/arena.dart:156:27)
    E/flutter (23433): #16     GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:222:20)
    E/flutter (23433): #17     GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:198:22)
    E/flutter (23433): #18     GestureBinding._handlePointerEvent (package:flutter/src/gestures/binding.dart:156:7)
    E/flutter (23433): #19     GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:102:7)
    E/flutter (23433): #20     GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:86:7)
    E/flutter (23433): #21     _rootRunUnary (dart:async/zone.dart:1196:13)
    E/flutter (23433): #22     _CustomZone.runUnary (dart:async/zone.dart:1085:19)
    E/flutter (23433): #23     _CustomZone.runUnaryGuarded (dart:async/zone.dart:987:7)
    E/flutter (23433): #24     _invoke1 (dart:ui/hooks.dart:275:10)
    E/flutter (23433): #25     _dispatchPointerDataPacket (dart:ui/hooks.dart:184:5)
    E/flutter (23433): 
    
    
    bug 
    opened by RajKateshiya 5
  • Need To Login Problem

    Need To Login Problem

    Ich have problem after anumber of calling this API, that I need to login, can you help me to solve this problem? Here is the response of calling await flutterInsta.getProfileData("my_account"); I/flutter (17374): <!DOCTYPE html> I/flutter (17374): <html lang="en" class="no-js not-logged-in client-root"> I/flutter (17374): <head> I/flutter (17374): <meta charset="utf-8"> I/flutter (17374): <meta http-equiv="X-UA-Compatible" content="IE=edge"> I/flutter (17374): I/flutter (17374): <title> I/flutter (17374): Login • Instagram I/flutter (17374): </title> I/flutter (17374): I/flutter (17374): I/flutter (17374): <meta name="robots" content="noimageindex, noarchive"> I/flutter (17374): <meta name="apple-mobile-web-app-status-bar-style" content="default"> I/flutter (17374): <meta name="mobile-web-app-capable" content="yes"> I/flutter (17374): <meta name="theme-color" content="#ffffff"> I/flutter (17374): <meta id="viewport" name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, viewport-fit=cover"> I/flutter (17374): <link rel="manifest" href="/data/manifest.json"> I/flutter (17374): I/flutter (17374): <link rel="preload" href="/static/bundles/metro/ConsumerUICommons.css/491667cd4d19.css" as="style" type="text/css" crossorigin="anonymous" /> I/flutter (17374): <link rel="preload" href="/static/bundles/metro/Consumer.css/cda6a893226a.css" as="style" type="text/css" crossorigin="anonymous" /> I/flutter (17374): <link rel="preload" href="/static/bundles/metro/FBSi E/flutter (17374): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: FormatException: Unexpected character (at character 1) E/flutter (17374): <!DOCTYPE html>

    fixed 
    opened by OS-Sado 4
  • Unhandled Exception: FormatException: Unexpected character

    Unhandled Exception: FormatException: Unexpected character

    Hi, I got these errors.

    [ERROR:flutter/lib/ui/ui_dart_state.cc(199)] Unhandled Exception: FormatException: Unexpected character (at character 1) E/flutter (13105): E/flutter (13105): ^ E/flutter (13105): E/flutter (13105): #0 _ChunkedJsonParser.fail (dart:convert-patch/convert_patch.dart:1404:5) E/flutter (13105): #1 _ChunkedJsonParser.parseNumber (dart:convert-patch/convert_patch.dart:1271:9) E/flutter (13105): #2 _ChunkedJsonParser.parse (dart:convert-patch/convert_patch.dart:936:22) E/flutter (13105): #3 _parseJson (dart:convert-patch/convert_patch.dart:40:10) E/flutter (13105): #4 JsonDecoder.convert (dart:convert/json.dart:506:36) E/flutter (13105): #5 JsonCodec.decode (dart:convert/json.dart:157:41) E/flutter (13105): #6 FlutterInsta.getProfileData (package:flutter_insta/flutter_insta.dart:25:21) E/flutter (13105): E/flutter (13105): #7 _InstaDetailsState.setInstaDetails (package:linkish/ui/widgets/insta_detail.dart:24:5) E/flutter (13105): E/flutter (13105):

    opened by alirezabhr 2
  • It does not return JSON obeject

    It does not return JSON obeject

    I/flutter (18403): I/flutter (18403): I/flutter (18403): I/flutter (18403): I/flutter (18403): I/flutter (18403): I/flutter (18403): Login • Instagram I/flutter (18403): I/flutter (18403): I/flutter (18403):
    I/flutter (18403): I/flutter (18403): I/flutter (18403): I/flutter (18403): I/flutter (18403): I/flutter (18403): I/flutter (18403): I/flutter (18403): I/flutter (18403): I/flutter (18403): <link rel="preload" href="/static/bundles/metro/FBSi E/flutter (18403): [ERROR:flutter/lib/ui/ui_dart_state.cc(186)] Unhandled Exception: FormatException: Unexpected character (at character 1) E/flutter (18403):

    opened by osamasado 1
  • Unhandled Exception: FormatException: Unexpected character (at character 1)

    Unhandled Exception: FormatException: Unexpected character (at character 1)

    [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: FormatException: Unexpected character (at character 1) E/flutter (14133): E/flutter (14133): ^ E/flutter (14133): E/flutter (14133): #0 _ChunkedJsonParser.fail (dart:convert-patch/convert_patch.dart:1394:5) E/flutter (14133): #1 _ChunkedJsonParser.parseNumber (dart:convert-patch/convert_patch.dart:1261:9) E/flutter (14133): #2 _ChunkedJsonParser.parse (dart:convert-patch/convert_patch.dart:926:22) E/flutter (14133): #3 _parseJson (dart:convert-patch/convert_patch.dart:31:10) E/flutter (14133): #4 JsonDecoder.convert (dart:convert/json.dart:505:36) E/flutter (14133): #5 JsonCodec.decode (dart:convert/json.dart:153:41) E/flutter (14133): #6 FlutterInsta.getProfileData package:flutter_insta/flutter_insta.dart:24 E/flutter (14133): E/flutter (14133): #7 UserProvider.getData package:instaInfluence/Provider/user.dart:210 E/flutter (14133): #8 _MainHomeState.completingVerification package:instaInfluence/Screens/MainHome.dart:84 E/flutter (14133): #9 _MainHomeState.didChangeDependencies. package:instaInfluence/Screens/MainHome.dart:55 E/flutter (14133): #10 _rootRunUnary (dart:async/zone.dart:1192:38) E/flutter (14133): #11 _CustomZone.runUnary (dart:async/zone.dart:1085:19) E/flutter (14133): #12 _FutureListener.handleValue (dart:async/future_impl.dart:141:18) Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:682:45) E/flutter (14133): #14 Future._propagateToListeners (dart:async/future_impl.dart:711:32) E/flutter (14133): #15 Future._completeWithValue (dart:async/future_impl.dart:526:5) E/flutter (14133): #16 _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:36:15) E/flutter (14133): #17 _completeOnAsyncReturn (dart:async-patch/async_patch.dart:298:13) E/flutter (14133): #18 _MainHomeState.getAllInfluecers (package:instaInfluence/Screens/MainHome.dart) E/flutter (14133): E/flutter (14133): #19 _MainHomeState.didChangeDependencies. package:instaInfluence/Screens/MainHome.dart:54 E/flutter (14133): #20 _rootRunUnary (dart:async/zone.dart:1192:38) E/flutter (14133): #21 _CustomZone.runUnary (dart:async/zone.dart:1085:19) E/flutter (14133): #22 _FutureListener.handleValue (dart:async/future_impl.dart:141:18) E/flutter (14133): #23 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:682:45) E/flutter (14133): #24 Future._propagateToListeners (dart:async/future_impl.dart:711:32) E/flutter (14133): #25 Future._completeWithValue (dart:async/future_impl.dart:526:5) E/flutter (14133): #26 _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:36:15) E/flutter (14133): #27 _completeOnAsyncReturn (dart:async-patch/async_patch.dart:298:13) E/flutter (14133): #28 _MainHomeState.getRequstStatus (package:instaInfluence/Screens/MainHome.dart) E/flutter (14133): E/flutter (14133): #29 _MainHomeState.didChangeDependencies package:instaInfluence/Screens/MainHome.dart:54 E/flutter (14133): #30 StatefulElement._firstBuild package:flutter/…/widgets/framework.dart:4661 E/flutter (14133): #31 ComponentElement.mount package:flutter/…/widgets/framework.dart:4476 E/flutter (14133): #32 Element.inflateWidget package:flutter/…/widgets/framework.dart:3446 E/flutter (14133): #33 Element.updateChild package:flutter/…/widgets/framework.dart:3214 E/flutter (14133): #34 ComponentElement.performRebuild package:flutter/…/widgets/framework.dart:4527

    opened by deveshgarg-max 1
  • Update: Add contributing guidelines

    Update: Add contributing guidelines

    The following project does not have any contribution guidelines for beginners to contribute to this project, So I would like to ask @viralvaghela if should I work on this issue and add the contribution guidelines in the readme.MD file

    opened by hasnainmakada-99 0
  • fixed FormatException: Unexpected character (at character 1) bug

    fixed FormatException: Unexpected character (at character 1) bug

    Many users are getting this type error

    E/flutter (32170): [ERROR:flutter/lib/ui/ui_dart_state.cc(166)] Unhandled Exception: FormatException: Unexpected character (at character 1) E/flutter (32170):

    Now I fixed this error let me know thats working or not!

    opened by codingstark-dev 0
  • Possible issue of getting rate limited

    Possible issue of getting rate limited

    There can be possibility that the device gets rate limited, when you make multiple requests on the same URL final res = await http.get(Uri.parse(Uri.encodeFull(url + "arteevraina" +"/?__a=1&__d=dis")));

    I wanted to make sure that if anybody has been rate limited while getting the user data. Because if we get rate limited using this approach we might have to rebuild this feature again using some other alternative.

    enhancement 
    opened by arteevraina 6
  • Still working ? Works on Chrome, Not postman/package

    Still working ? Works on Chrome, Not postman/package

    Is the package still working ?

    I did the request using the package, I got http instead of JSON. Also tried to do it in Postman, still got HTTP error. The only way to make the request work is via Chrome. Is Instagram detecting that the request is done programmatically and then blocks it ?

    enhancement fixed 
    opened by EskAere 5
  • [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: FormatException: Unexpected character (at character 1)

    [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: FormatException: Unexpected character (at character 1)

    I'm getting this error, using version 1.0.4 of the package. I managed to fix it locally, but from what I saw it looks like it has already been fixed. I would like to clear that doubt.

    If it hasn't been fixed, I would like to help.

    help wanted Hacktoberfest 
    opened by DheCastro 24
  • can u try implementing getting more than 12 profile images if they exist..

    can u try implementing getting more than 12 profile images if they exist..

    i found this article maybe u can read it and implemen it https://medium.com/@vasu.pal/crawl-instagram-profiles-and-posts-the-most-efficient-way-possible-without-fb-graph-api-7ea270b11e74

    basically i just have to check if next page exists and and if yes then u get a end cursor code , by editing the query u can get more 50 posts

    please give it a try would be amazing thanks in advance

    Hacktoberfest 
    opened by thevishvajeet 2
Releases(Release)
  • Release(Aug 24, 2022)

    Instagram changed their API endpoint from /?__a=1" to /?__a=1&__d=dis so the previous version of flutter insta stopped working, but now it's working fine, Also added note for API limit reach error in the readme and Improved doc.

    What's Changed

    • fixed FormatException: Unexpected character (at character 1) bug by @codingstark-dev in https://github.com/viralvaghela/flutter_insta/pull/5
    • pub.dev scores increased by 10 points and small space bug fixed by @codingstark-dev in https://github.com/viralvaghela/flutter_insta/pull/6
    • Get user feed images by @Lima21 in https://github.com/viralvaghela/flutter_insta/pull/11
    • enable null safety by @Prashant4900 in https://github.com/viralvaghela/flutter_insta/pull/18
    • Fix #25 by @viralvaghela in https://github.com/viralvaghela/flutter_insta/pull/26

    New Contributors

    • @codingstark-dev made their first contribution in https://github.com/viralvaghela/flutter_insta/pull/5
    • @Lima21 made their first contribution in https://github.com/viralvaghela/flutter_insta/pull/11
    • @Prashant4900 made their first contribution in https://github.com/viralvaghela/flutter_insta/pull/18

    Full Changelog: https://github.com/viralvaghela/flutter_insta/commits/Release

    Source code(tar.gz)
    Source code(zip)
Owner
Viral Vaghela
Self-learner | Flutter dev | Java | App developer | Content Creator
Viral Vaghela
Flutter video compress - Generate a new file by compressed video, and provide metadata. Get video thumbnail from a video path, supports JPEG/GIF. To reduce app size not using FFmpeg in IOS.

flutter_video_compress Generate a new path by compressed video, Choose to keep the source video or delete it by a parameter. Get video thumbnail from

天海るり 179 Dec 8, 2022
dos downloader app is developed for downloading video. You can download video from YouTube and Facebook. You can also play video on background

dosdownloader Dos downloader app is developed for downloading video. You can download video from YouTube and Facebook. You can also play video on back

Md Abir Ahsan Tahmim 1 Dec 8, 2021
Flutter ticket pass - A Flutter Widget to display the details of a ticket/pass purchased by customers and display the details of the purchase

ticket_pass_package A Flutter package to display the purchase of a ticket/pass along with additional details such as list of buyers. The source code i

null 40 Aug 13, 2022
Download files from Firebase Storage with Flutter. List all images, videos, or other files from Firebase and download them.

Flutter Tutorial - Download Files From Firebase Storage Download files from Firebase Storage with Flutter. List all images, videos, or other files fro

Johannes Milke 28 Dec 4, 2022
Flutter Download Manager is a Cross-Platform file downloader with Parallel and Batch Download support

Flutter Download Manager is a Cross-Platform file downloader with Parallel and Batch Download support. Manage download tasks by url and be notified of status and their progress. Pause, Cancel, Queue and Resume Downloads.

Nabil Mosharraf 11 Dec 17, 2022
A flutter App to get details of any Movie

Movie Zone Flutter Application to get movie details Features Poster of Movie Released Date Country IMDB Rating Runtime Director Screenshots API used h

Viral Vaghela 9 Dec 4, 2021
Stories like in Instagram, each story can include multiple images and videos. Package supports video, titles, preliminary caching.

flutter_instagram_stories A Flutter package for displaying stories just like Whatsapp & Instagram. Built-in groups (multiple stories with one icon), c

Alex Awaik 125 Dec 9, 2022
Flutter youtube downloader - A Windows App made in Flutter to download mp3 or mp4 from a Youtube video

youtube_downloader A Windows App made in Flutter to download mp3 or mp4 from a Y

Sakshham Bhagat 3 Nov 30, 2022
Instagram-clone - Instagram clone built using flutter and Firebase

Instagram-clone statistics of Firebase usage User Authentication for Instagram l

null 5 Jul 18, 2022
Extract pubspec details (such as package version, author and description) into Dart code.

build_pubspec This package helps you convert fields from your pubspec.yaml file into Dart code. Based on the fields in your pubspec, this package will

dartside.dev 9 Jul 15, 2021
A Video Player For Vimeo Videos in Flutter. This plugin allows us to play video from Vimeo and it supports Android and iOS platforms.

vimeo_video_player A Video Player For Vimeo Videos in Flutter. This plugin allow us to play video from vimeo and it's supports Android and iOS platfor

MindInventory 26 Dec 8, 2022
A Flutter plugin that provides assets abstraction management APIs without UI integration, you can get assets (image/video/audio) on Android, iOS and macOS.

photo_manager Photo/Assets management APIs for Flutter without UI integration, you can get assets (image/video/audio) from Android, iOS and macOS. 提供相

FlutterCandies 526 Jan 4, 2023
Generate secure passwords, check for exposed passwords, get visual feedback for password strength or get form validation with a minimum password strength required.

password_strength_checker Generate secure passwords, check for exposed passwords, get visual feedback for password strength or get form validation wit

Dario Varriale 6 Aug 8, 2023
Contactus - a flutter package. The most common functionality added in any commercial app is the Developer's contact details

Contact Us The most common functionality added in any commercial app is the Developer's contact details!! So this package helps the developers to simp

Abhishek Doshi 19 Aug 4, 2022
FLUTTER API: Video Editor allows trim, crop, rotate and scale video with a super flexible UI Design

video_editor My other APIs Scroll Navigation Video Viewer Helpers Features Super flexible UI Design. Support actions: Crop Trim Scale Rotate Cover sel

Luis Felipe Murguia Ramos 214 Dec 26, 2022
Flutter App Build for the machine Learning model which shows sentiments of instagram user by analysing their captions

InstaKnow Front-end By @ketanchoyal Back-end By @namas191297 Front-end Application Flutter application that allows user to analyze sentiments of other

Ketan Choyal 40 Oct 28, 2022
Totally *legal* Instagram automation, crosses your user follower/following data to find who you follow, but doesnt follow you

untruth-instagram-followers Totally *legal* Instagram automation. Crosses a user follower/following data to find who he follows, but that doesn't foll

Olha o Robô 3 Oct 12, 2022
Flutter plugin to simply integrate Agora Video Calling or Live Video Streaming to your app with just a few lines of code.

Agora UI Kit for Flutter Instantly integrate Agora video calling or video streaming into your Flutter application. Getting started Requirements An Ago

Agora.io Community 106 Dec 16, 2022