fetch-instagram
A lightweight and universal Instagram API client for Node and your browser.
Installation & Usage
Install via npm or yarn:
npm install fetch-instagram --save# or via yarn yarn add fetch-instagram
Create an instance with your Instagram access token:
; const instagram = ;
Simple fetch of your user data and media:
// https://api.instagram.com/v1/users/selfconst users = instagram; users;// {// "data": {// "id": "1234567890",// "username": "my_user",// "profile_picture": "https://scontent.cdninstagram.com/..../file.jpg",// "full_name": "My Name",// "bio": "My Bio",// "website": "https://mysite.com/",// "counts": {// "media": 143,// "follows": 143,// "followed_by": 143// }// },// "meta": { "code":200 }// } // https://api.instagram.com/v1/users/self/media/recentconst media = instagrammedia;users;// {// "pagination": {},// "data": [// {// "id":"1234567890123456789_1234567890",// "user": { ... },// "images": {// "thumbnail": { ... },// "low_resolution": { ... },// "standard_resolution": { ... }// },// "created_time": "1234567890",// "caption": {// "id":"12345678901234567890",// "text": "My text",// "created_time": "1234567890",// "from": { ... }// },// "user_has_liked": false,// "likes": { ... },// "tags": [ ... ],// "filter": "Normal",// "comments": { ... },// "type": "image",// "link": "https://www.instagram.com/p/12345abcdef/",// "location": null,// "attribution": null,// "users_in_photo": [ ... ]// },// ...// ],// "meta":{ "code":200 }// }
API
ig()
; ;
users()
; ;
media()
; ;
License
Licensed under the MIT License, Copyright © 2017 Glenn Reyes. See LICENSE for more information.