Easy to use module to fetch data from instagram. NOTE! this returns a promise so you need to handle it.
Import the module: const instagramFetch = require('instagram-fetch')
yarn add instagram-fetch
npm install instagram-fetch --save
instagramFetch.getPost('somePostCode') // example Bq0gUSGgFv7
.then(data => console.log(data))
.catch(err => console.log(err))
const data = await instagramFetch.getPost('somePostCode') // example 'Bq0gUSGgFv7'
console.log(data)
instagramFetch.getProfile('someProfileUsername') // example 'instagram'
.then(data => console.log(data))
.catch(err => console.log(err))
const data = await instagramFetch.getProfile('someProfileUsername') // example 'instagram'
console.log(data)