public-instagram
![unit test](https://img.shields.io/badge/test-passed-brightgreen.svg)
Tool to fetch Instagram's public content.
Features
- Fetch any pubic posts (images only)
- Search for hashtags and get information
- Fetch recent posts by hashtag
- Search for user's (public) information
- Fetch posts by (public) user
Installing
Using npm
npm i public-instagram
Using npm (& git):
npm i https://github.com/ivolimasilva/public-instagram.git
Examples
import instagram from 'public-instagram';
async function example() {
const info = await instagram.tags.info('instagram');
console.log(info);
const posts = await instagram.tags.recent('instagram', 1000);
console.log(posts.length);
const posts = await instagram.tags.top('instagram');
console.log(posts);
const hashtags = await instagram.tags.search('instagram');
console.log(hashtags);
const post = await instagram.media.get('BP-rXUGBPJa');
console.log(post);
const comments = await instagram.media.comments('BP-rXUGBPJa', 1000);
console.log(comments);
const user = await instagram.users.info('instagram');
console.log(user);
const posts = await instagram.users.posts('instagram');
console.log(posts.length);
};
example();
Async/Await
public-instagram
uses Async/Await. In order to use it as intended, you need atleast Node v7.6
.
Resources
License
GPL-3.0