Hosted Grist runs all formulas in a sandbox that has no access to the internet, so that users can open documents without needing to worry about malicious code. But if you run Grist on your own computer (see grist-core) then you are free to do anything you like, including installing the requests module and calling it. I tried your snippet, and it fetched data from instagram, but the result didn’t seem to be in the expected format?
Another option is to look for a service that does what you need that you can integrate - see a list at Integrator Services - Grist Help Center. Or to write a script using our API. But in neither of those options is Grist helping you a lot.