Skip to main content
JxInsta is a Java SDK that wraps Instagram’s private mobile and web APIs, giving you full programmatic access to profiles, posts, stories, direct messages, and more — all without needing an official API key. It ships as two independent modules: web (session/CSRF-based) and mobile (auth-token-based), so you can choose the right fit for your use case.

Installation

Add JxInsta to your Gradle or Maven project via JitPack in minutes.

Quickstart

Authenticate and make your first API call with a working code example.

Authentication

Log in with username/password or reuse an existing session or auth token.

API Reference

Full reference for every class and method in both web and mobile modules.

What you can do with JxInsta

Profiles

Fetch user info, follow, unfollow, block, and scrape followers and followings.

Posts

Like, comment, fetch likers, download posts, and upload pictures.

Stories & Highlights

Read feed stories, user stories, and highlight reels.

Direct Messages

Read inbox threads, send text and images via the mobile API.

Feed & Pagination

Iterate through home feed and user post pages with cursor-based paginators.

Public APIs

Fetch posts, profiles, and hashtag results without any login.

Get started in three steps

1

Add the dependency

Add the JitPack repository and the web or mobile artifact to your build.gradle or pom.xml. See Installation for the full snippet.
2

Authenticate

Create an Instagram4j instance with your credentials or an existing session. See Login for all authentication options.
3

Make API calls

Call methods on Instagram4j, Profile, Post, and related classes to interact with Instagram. See the Quickstart for a complete working example.
JxInsta uses Instagram’s private API, which is not officially supported by Meta. Follow Instagram’s usage limits and add delays between requests to avoid rate limiting or account checkpoints.

Build docs developers (and LLMs) love