Skip to main content
JxInsta is a lightweight, object-oriented Java library that wraps Instagram’s private API. It gives you programmatic access to profiles, posts, direct messages, stories, and more — without needing an official API token. The library ships as two independent modules: Mobile (token-based, supports DMs) and Web (session/cookie-based, includes public endpoints and hashtag search).

Installation

Add JxInsta to your Gradle or Maven project in minutes

Quickstart

Authenticate, fetch a profile, and interact with posts in a few lines of code

API Reference

Explore the full Mobile and Web API surface with parameters and return types

Guides

Detailed how-to guides for profiles, posts, DMs, stories, and more

Choose your module

JxInsta ships two Gradle/Maven artifacts. Pick the one that fits your use case:

Mobile API

Authenticates with a bearer token. Supports direct messages, feed, stories, posts, and social actions.

Web API

Authenticates with session cookies. Includes public (no-login) endpoints and hashtag search.

Get started in three steps

1

Add the dependency

Add the JitPack repository and your chosen module (mobile or web) to your Gradle or Maven build file.
2

Authenticate

Create a JxInsta instance with your Instagram username and password, or reuse a saved token/session for subsequent runs.
3

Start building

Fetch profiles, post pictures, send messages, scrape followers, or search hashtags — all in a few lines of Java.
Quickstart example
// Mobile API
JxInsta insta = new JxInsta("username", "password");
Profile profile = insta.getProfile("someuser");
profile.follow();
System.out.println("Bio: " + profile.biography);
JxInsta uses Instagram’s private (undocumented) API. Follow Instagram’s usage limits and add human-like delays between requests to avoid account checkpoints. See Rate Limits for guidance.