How to take last n posts from instagram?

Hi. I want my page to display the last 6 photos from Instagram posts. So that I do not manually enter links and shortcodes. Is there some way in hugo to do this?

Hugo has the getJSON function that could be used to retrieve data from the Instagram Graph API.

Another way would be to use a tool like Instaloader to retrieve a post’s JSON response, store it under the /data/ folder and then call it in your project’s templates as needed. See: Data Templates