Skip to content

ErrorxCode/JxInsta


Markdownify
JxInsta

An Object Oriented java library for Instagram Private API.

Markdownify

An Object Oriented Java library of Instagram Private API. This library is built as a replacement for old instagram4j since it is too old and is no longer maintained. If you still want to use instagram4j (as it has quite more features as of now), you can check out EasyInsta - A Easy2Use Instagram4j wrapper.

🎯Key Features

  • Lightweight and Easy 2 use, Object-oriented
  • No need API token
  • Supports Sending messages
  • Supports Getting/fetching messages
  • Supports Deleting message
  • Supports Realtime direct messages listener (Comming soon)
  • Supports Login using cache/saving sessions
  • Supports Posting (Picture)
  • Supports Adding stories (Photo)
  • Supports Following/Unfollowing
  • Supports Acception/Ignoring follow request (Comming soon)
  • Supports Scrapping followings and followers
  • Supports Getting profile data
  • Supports Liking/commenting on post
  • Supports Fetching feeds/users post
  • Supports Downloading posts and pfp
  • Supports Fetching Post, liking and commening
  • Supports Scrapping comments of a post
  • Supoorts Fetching reels, stories & highlight

Implimentation

Gradle

Step 1. Add the JitPack repository to your build file

	dependencyResolutionManagement {
		repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
		repositories {
			mavenCentral()
			maven { url 'https://jitpack.io' }
		}
	}

Step 2. Add the dependency

	dependencies {
	        implementation 'com.github.Errorxcode.jxinsta:mobile:2.0'   // If you want to use mobile API
          implementation 'com.github.Errorxcode.jxinsta:web:2.0'   // If you want to use web API
	}

Maven

Step 1. Add to pom.xml

	<repositories>
		<repository>
		    <id>jitpack.io</id>
		    <url>https://jitpack.io</url>
		</repository>
	</repositories>

Step 2. Add the dependency if you want Mobile API :

	<dependency>
	    <groupId>com.github.Errorxcode.jxinsta</groupId>
	    <artifactId>mobile</artifactId>
	    <version>2.0</version>
	</dependency>

or if you want Web API :

	<dependency>
	    <groupId>com.github.Errorxcode.jxinsta</groupId>
	    <artifactId>web</artifactId>
	    <version>2.0</version>
	</dependency>

Acknowledgements

Its easy :)

JxInsta insta = new JxInsta("username", "password");  
var profile = insta.getProfile("username");
profile.follow();
System.out.print("User Bio : " + profile.bio);

For detailed guide, check out User guide

FAQs

Can we use this library to make bots?

Answer. Yes. But Instagram doesn't allow them to make bots with their official graph APIs. Although this is not the official API, you should follow the usage limits to prevent detection.

Can we download stories or posts using this library?

Answer. Yes, and that too without login

Does the use of this library require any tokens or other keys?

Answer. No. You only need to have the username and password of the account. You can also log in using cookies and bearer tokens.

In Android, can we use Webview to log in?

Answer. Yes, check this example on how to use that

Contributing

Contributions are always welcome! There is a lot of scope for contribution in this library.

Please refer to Contribution guide. Also, see the code of conduct. To get started, you can check out "Projects" or "Issues" of the Repo. There are many thing left for implementation

Support

The fastest channel to contact me is Instagram, just DM me and I'll reply to you within 24 hours. My Instagram : x0.rahil You can show your support by giving a ⭐.

About

An object-oriented reverse engineered Instagram API in Java. This Project is continuation of instagram4j. Now build bots, scrap data, create Instagram apps, and a lot more in very few lines of code

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Contributors

Languages