Instagram Java Scraper. Get account information, photos and videos without any authorization.
Instagram instagram = new Instagram();
Account account = instagram.getAccountByUsername("kevin");
System.out.println(account.mediaCount);
Instagram instagram = new Instagram();
Account account = instagram.getAccountById(3);
System.out.println(account.mediaCount);
List<Media> medias = instagram.getMedias("durov", 12);
System.out.println(medias.get(0).imageHighResolutionUrl);
Media media = instagram.getMediaByUrl("BGY0zB4r7X2");
System.out.println(media.owner.username);
Media media = instagram.getMediaByUrl("https://www.instagram.com/p/BGY0zB4r7X2/");
System.out.println(media.owner.username);
Media.getCodeFromId("1270593720437182847_3");
// OR
Media.getCodeFromId("1270593720437182847");
// Output: BGiDkHAgBF_
// So you can do like this: instagram.com/p/BGiDkHAgBF_
Media.getIdFromCode('BGiDkHAgBF_');
// Output: 1270593720437182847
PHP library: https://github.com/postaddictme/instagram-php-scraper