> ## Documentation Index
> Fetch the complete documentation index at: https://docs.duca.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Instagram Feed Fetch Script

> A script that once ran, fetches the latest posts from an Instagram account and saves them to a JSON file.

# Instagram Feed Fetch Script

## This should be ran in a browser

This script fetches the latest posts from an Instagram account and saves them to a JSON file. It uses the Instagram Basic Display API to fetch the posts and the `fs` module to save them to a JSON file.

```javascript theme={null}
let imageUrls = Array.from(
  document.querySelectorAll("._aagv img"),
  (img) => img.src
);
```

After that, you can go ahead and run

```javascript theme={null}
console.log({ imageUrls });
```

in order to see the image URLs in the console.
