Skip to content

Public APIs

Rahil khan edited this page Mar 14, 2024 · 1 revision

This page is all about the main PublicAPI class and its methods. This class contains all the static methods that can be used directly without login. This means these are public Instagram APIs.

To get a profile:

Profile profile = PublicAPIs.getProfileInfo("x0.rahil");

To get a post from its URL:

Post post = PublicAPIs.getPostInfo("https://www.instagram.com/p/C3m9HnNukV1/");

To get posts of a user:

List<Post>  posts  =  PublicAPIs.getPosts(profile.pk,  null);

To get a post related to a hashtag:

List<Post> posts = PublicAPIs.hashtagSearch("clorabase");
Clone this wiki locally