This builds over the Instagram's public API to provide more functionality and provides a CORS complaint reverse instagram proxy service. Try Here: https://igapi.ga/whizzzkid/media/?count=3
A user's public data on Instagram can be accessed on https://www.instagram.com/<user>/media/
but there are are a lot of problems with this service.
- The Service is not CORS compliant. i.e. You cannot fetch json directly and the services refuses to send you jsonp data.
- It does not support limiting the amount of data being sent. At any moment Instagram will send you 20 images, you cannot control this number.
- No pagination support. It get's you the first 20 images and leaves you in the dark to figure out what to do next.
As of now, the service is running on https://igapi.ga/(Heroku) I am not aware about limits, it's basically running on free tier. If it hits any limit, I'll have to figure that out. But the intended use is to replace http://www.instagram.com
with https://igapi.ga/
.
-
Getting Instagrams's data as is. The following will give you access to the same data instagram provides.
https://igapi.ga/<user>/media/
-
Limiting the amount of images to be sent.
https://igapi.ga/<user>/media/?count=10
-
Using jsonp
https://igapi.ga/<user>/media/?callback=foo
-
Using pagination: Each response has url links to the next and previous page, you can use that to traverse through the results.
You just need to replace http://www.instagram.com/
with https://igapi.ga/
and everything should just work as is.
NO AUTH REQUIRED, that's the best part, you can access all of instagram's public data without authentication or registering an app. Private data returns nothing. However private data maybe accessible using instagram's api if the user is logged in.
# The following returns data *only* if the user is logged in.
https://www.instagram.com/<private_user>/media/
# The following will always return nothing for private users.
https://igapi.ga/<private_user>/media/
Clone the repo and change to the cloned directory. Run:
$ npm install
$ npm run dev
To run prod instance, run:
$ npm run prod
The idea came into being after reading some discussion here.
All contributers are welcome, feel free to report issues and send PRs
GPLv3